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
70
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
65
Pug.pdf
darrenyaoyaoyao
0
85
jquery.pdf
darrenyaoyaoyao
1
97
0c8adb02-ade8-47bb-9939-4d45110ffefd.pdf
darrenyaoyaoyao
0
66
bootstrap.pdf
darrenyaoyaoyao
1
86
Javasrcipt_基礎一.pdf
darrenyaoyaoyao
0
97
Javascript_基礎二.pdf
darrenyaoyaoyao
0
140
HTML__CSS_基礎_.pdf
darrenyaoyaoyao
0
69
HTML__CSS_基礎_.pdf
darrenyaoyaoyao
0
43
Other Decks in Programming
See All in Programming
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
4
2.3k
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
210
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
380
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
210
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
530
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
640
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
510
New "Type" system on PicoRuby
pocke
1
770
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
230
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
Mind Mapping
helmedeiros
PRO
1
240
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
320
The SEO identity crisis: Don't let AI make you average
varn
0
490
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
310
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
The untapped power of vector embeddings
frankvandijk
2
1.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
KATA
mclloyd
PRO
35
15k
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; }