Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SASS 让你更爽的编写 CSS
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Praise Song
July 31, 2012
Technology
4
320
SASS 让你更爽的编写 CSS
SASS 让你更爽的编写 CSS
Praise Song
July 31, 2012
Tweet
Share
Other Decks in Technology
See All in Technology
【Oracle Cloud ウェビナー】データ主権はクラウドで守れるのか?NTTデータ様のOracle Alloyで実現するソブリン対応クラウドの最適解
oracle4engineer
PRO
3
120
Bref でサービスを運用している話
sgash708
0
200
OpenClawでPM業務を自動化
knishioka
2
330
AI時代のIssue駆動開発のススメ
moongift
PRO
0
300
スケーリングを封じられたEC2を救いたい
senseofunity129
0
120
Oracle Cloud Infrastructure:2026年3月度サービス・アップデート
oracle4engineer
PRO
0
200
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
qa
0
440
PostgreSQL 18のNOT ENFORCEDな制約とDEFERRABLEの関係
yahonda
0
150
タスク管理も1on1も、もう「管理」じゃない - KiroとBedrock AgentCoreで変わった“判断の仕事”
yusukeshimizu
0
140
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
77k
契約書からの情報抽出を行うLLMのスループットを、バッチ処理を用いて最大40%改善した話
sansantech
PRO
3
320
AI時代のシステム開発者の仕事_20260328
sengtor
0
310
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
WCS-LA-2024
lcolladotor
0
500
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
340
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
480
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
690
Leo the Paperboy
mayatellez
5
1.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
The SEO Collaboration Effect
kristinabergwall1
0
410
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
460
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
600
Transcript
颂赞 h#p://qiqicartoon.com
What is SASS?
SASS 是一个 CSS3 扩展,为 CSS 扩展了嵌套规则、变量、混入、继承、函数 等强大的功能。SASS 的使命是让 CSS 更有趣味 J • CSS 超集 • CSS3 扩展 • 使 CSS 更有趣 • SCSS and SASS • Hampton Catlin、Nathan Weizenbaum、Chris Eppstein h#p://sass-‐lang.com/
Features 1、Fully CSS3-‐compaFble 2、Language extensions such as variables,
nesFng, and mixins 3、Many useful funcFons for manipulaFng colors and other values 4、Advanced features like control direcFves for libraries 5、Well-‐forma#ed, customizable output 6、Firebug integraFon
Welcome to the SASS world J
Install SASS $ gem install sass
Variables 从 $ 开始 $variables name : vaiables value;
SCSS SASS
Compile
Compile
Nested SCSS SASS CSS
Mixins SCSS SASS CSS
Selector Inheritance SCSS SASS CSS
Reference Parent 使用 & 语法糖引用父层
Comments 双斜线注释将被忽略
SASSScript Data Types
SASSScript OperaFons
SASSScript OperaFons
SASS Script Oper aFon s-‐ Color
@import SASS CSS • @import “common.css”;
• @import “common” screen; • @import h#p://alipay.com/common.css; • @import url(); • @import “common.scss/sass”; • @import “common”;
@media
Control DirecFves • @if • @while •
@for • @each
@funcFon
回过头来再看 SASS • 大型样式表 • 制定样式规范 •
团队开发 优点 缺点 适用于 • 学习成本低 • 降低样式表维护成本 • 适用于多人开发 • 性能优越 OMG,我无缺点 J
SASS VS LESS • 实现原理不同 • 创建变量的方式不同
• 预编绎机制不同 • 作用域表现不同 • mixin 方式不同 • SASS 比 LESS 的数学运算能力更强 • LESS 没有 SASS 的 Control DirecFve
Hi,Let’s wriFng SASS J @知托付-‐颂赞