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.pdf
Search
darrenyaoyaoyao
November 13, 2020
Programming
71
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Sass.pdf
darrenyaoyaoyao
November 13, 2020
More Decks by darrenyaoyaoyao
See All by darrenyaoyaoyao
HTML__CSS_基礎二.pdf
darrenyaoyaoyao
0
67
Pug.pdf
darrenyaoyaoyao
0
87
jquery.pdf
darrenyaoyaoyao
1
98
0c8adb02-ade8-47bb-9939-4d45110ffefd.pdf
darrenyaoyaoyao
0
68
bootstrap.pdf
darrenyaoyaoyao
1
88
Javasrcipt_基礎一.pdf
darrenyaoyaoyao
0
99
Javascript_基礎二.pdf
darrenyaoyaoyao
0
140
HTML__CSS_基礎_.pdf
darrenyaoyaoyao
0
71
HTML__CSS_基礎_.pdf
darrenyaoyaoyao
0
46
Other Decks in Programming
See All in Programming
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
150
Embedded SREと共に達成した会員管理システムのAWS移行 - SRE NEXT 2026 ランチスポンサーセッション
niftycorp
PRO
1
2.4k
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
120
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
170
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
350
共通化で考えるべきは、実装より公開する型だった
codeegg
0
210
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.4k
初めてのKubernetes 本番運用でハマった話
oku053
0
120
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
360
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
200
Performance Engineering for Everyone
elenatanasoiu
0
270
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
Paper Plane
katiecoart
PRO
2
52k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
600
Producing Creativity
orderedlist
PRO
348
40k
The Pragmatic Product Professional
lauravandoore
37
7.4k
How to Ace a Technical Interview
jacobian
281
24k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
190
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
230
Code Reviewing Like a Champion
maltzj
528
40k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
170
Transcript
Sass 基礎篇 簡化你的 CSS
CSS 在 Code 很多時 會變得很難讀 Sass 是⼀種 CSS 的進化語法 更容易閱讀
Nesting:降低⽗元素重複性 .parent { color: blue; .child { font-size: 12px; }
} .parent { color: blue; } .parent .child { font-size: 12px; }
Codepen ⽀援 Sass 的語法表⽰
屬性也可以使⽤ Nesting .parent { font : { family: Roboto, sans-serif;
size: 12px; decoration: none; } } .parent { font-family: Roboto, sans- serif; font-size: 12px; font-decoration: none; }
屬性模組化 @mixin important-text { color: red; font-size: 25px; font-weight: bold;
border: 1px solid blue; } .danger { @include: important-text; background-color: green; } .danger { color: red; font-size: 25px; font-weight: bold; border: 1px solid blue; background-color: green; }
@mixin 傳入參數 @mixin bordered($color, $width) { border: $width solid $color;
} .myArticle { @include bordered(blue, 1px); } .myNotes { @include bordered(red, 2px); } .myArticle { border: 1px solid blue; } .myNotes { border: 2px solid red; }
@mixin 參數預設值 @mixin bordered($color: blue, $width: 1px) { border: $width
solid $color; } .myTips { @include bordered($color: orange) }
@extend 屬性繼承 .button-basic { border: none; padding: 15px 30px; text-align:
center; } .button-report { @extend .button-basic; background-color: red; } .button-submit { @extend .button-basic; background-color: green; } .button-basic .button- report .button-submit { border: none; padding: 15px 30px; text-align: center; } .button-report { background-color: red; } .button-submit { background-color: green; }