Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Sass_基礎篇.pdf
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
darrenyaoyao
October 25, 2020
Programming
32
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Sass_基礎篇.pdf
darrenyaoyao
October 25, 2020
More Decks by darrenyaoyao
See All by darrenyaoyao
HTML__CSS_基礎_.pdf
darrenyaoyao
0
27
HTML__CSS_基礎_.pdf
darrenyaoyao
0
32
HTML__CSS基礎二.pdf
darrenyaoyao
0
25
Javascript進階.pdf
darrenyaoyao
0
21
Javasrcipt_基礎一.pdf
darrenyaoyao
0
75
Bootstrap.pdf
darrenyaoyao
0
33
Github_介紹.pdf
darrenyaoyao
0
120
Javascript_基礎二.pdf
darrenyaoyao
0
22
CSS_Flex_基礎二.pdf
darrenyaoyao
0
28
Other Decks in Programming
See All in Programming
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
630
ChromeでローカルLLM
ryu1013
0
140
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
3
670
sbt 2.0: takeoff
eed3si9n
0
160
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.7k
AWSに止められる覚悟してますか?
morizo_1984
2
540
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
140
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
How GitHub (no longer) Works
holman
316
150k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
The Language of Interfaces
destraynor
162
27k
Mobile First: as difficult as doing things right
swwweet
225
10k
Music & Morning Musume
bryan
48
7.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Designing for Performance
lara
612
70k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
We Have a Design System, Now What?
morganepeng
55
8.4k
Automating Front-end Workflow
addyosmani
1369
210k
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; }