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
Praise Song
July 31, 2012
Technology
330
4
Share
SASS 让你更爽的编写 CSS
SASS 让你更爽的编写 CSS
Praise Song
July 31, 2012
Other Decks in Technology
See All in Technology
Building a Study Buddy AI Agent from Scratch: From Passive Chatbots to Autonomous Systems
itchimonji
0
140
ハーネスエンジニアリング入門
hatyibei
0
110
生成AIはソフトウェア開発の革命か、ソフトウェア工学の宿題再提出なのか -ソフトウェア品質特性の追加提案-
kyonmm
PRO
2
850
VespaのParent Childを用いたフィードパフォーマンスの改善
taking
0
270
雑談は、センサーだった
bitkey
PRO
2
200
Oracle Cloud Infrastructure:2026年4月度サービス・アップデート
oracle4engineer
PRO
0
360
AI駆動開発で生産性を追いかけたら、行き着いたのは品質とシフトレフトだった
littlehands
0
390
Agent Skillsで実現する記憶領域の運用とその後
yamadashy
2
1.3k
AIの揺らぎに“コシ”を与える階層化品質設計
ickx
0
260
カオナビに Suspenseを導入するまで / The Road to Suspense at kaonavi
kaonavi
1
430
大学職員のための生成AI最前線 :最前線を、AIガバナンスとして読み直すためのTips
gmoriki
2
3.7k
OWASP APTSを眺めてみた
su3158
0
130
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
340
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
540
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Prompt Engineering for Job Search
mfonobong
0
290
The Invisible Side of Design
smashingmag
302
52k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
350
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
140
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
170
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
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 @知托付-‐颂赞