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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
darrenyaoyaoyao
November 13, 2020
Programming
84
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Sass.pdf
darrenyaoyaoyao
November 13, 2020
Transcript
9 slides
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; }
More Decks by darrenyaoyaoyao
See All by darrenyaoyaoyao
HTML__CSS_基礎二.pdf
darrenyaoyaoyao
0
81
Pug.pdf
darrenyaoyaoyao
0
100
jquery.pdf
darrenyaoyaoyao
1
120
0c8adb02-ade8-47bb-9939-4d45110ffefd.pdf
darrenyaoyaoyao
0
84
bootstrap.pdf
darrenyaoyaoyao
1
99
Javasrcipt_基礎一.pdf
darrenyaoyaoyao
0
110
Javascript_基礎二.pdf
darrenyaoyaoyao
0
160
HTML__CSS_基礎_.pdf
darrenyaoyaoyao
0
81
HTML__CSS_基礎_.pdf
darrenyaoyaoyao
0
59
Other Decks in Programming
See All in Programming
AIエージェントの「テストは通るのに本番で壊れる」を減らす
shibuiwilliam
3
110
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.6k
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
610
Agentic AI with the Power of Jakarta EE
ivargrimstad
0
180
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
将来の標準フォーマッター?ktfmtを深堀る
t45k
0
250
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
360
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
700
Debian JP Projectのサーバー構成
uwabami
1
180
AI駆動TDD ― 2026年10月版
hrmstrsmgs
0
110
AppFunctionsの内部実装を紐解く
hiroaki404
0
120
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1.1k
Featured
See All Featured
Scaling GitHub
holman
464
140k
Unsuck your backbone
ammeep
672
58k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
500
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
A Modern Web Designer's Workflow
chriscoyier
699
190k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
470
Building Adaptive Systems
keathley
44
3.3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
BBQ
matthewcrist
90
10k
Between Models and Reality
mayunak
4
610