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
72
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
72
Pug.pdf
darrenyaoyaoyao
0
89
jquery.pdf
darrenyaoyaoyao
1
100
0c8adb02-ade8-47bb-9939-4d45110ffefd.pdf
darrenyaoyaoyao
0
73
bootstrap.pdf
darrenyaoyaoyao
1
91
Javasrcipt_基礎一.pdf
darrenyaoyaoyao
0
99
Javascript_基礎二.pdf
darrenyaoyaoyao
0
150
HTML__CSS_基礎_.pdf
darrenyaoyaoyao
0
77
HTML__CSS_基礎_.pdf
darrenyaoyaoyao
0
53
Other Decks in Programming
See All in Programming
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
380
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
720
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
260
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
120
FastAPI の並行処理モデルを完全に理解する
hoto17296
8
3k
プロポーザルを書いてもらう
pvcresin
0
580
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
280
Hono + Inertia + React で LP を構築した話
oukayuka
2
160
Android CLI
fornewid
0
230
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
340
Go 1.27 における memory allocation の高速化
andpad
0
320
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
3
1.9k
Featured
See All Featured
Abbi's Birthday
coloredviolet
3
9.5k
ラッコキーワード サービス紹介資料
rakko
1
4.5M
Designing Experiences People Love
moore
143
24k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
660
Optimising Largest Contentful Paint
csswizardry
37
3.9k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
310
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.9k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.1k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
450
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
360
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
210
Paper Plane (Part 1)
katiecoart
PRO
1
10k
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; }