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
82
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
80
Pug.pdf
darrenyaoyaoyao
0
100
jquery.pdf
darrenyaoyaoyao
1
110
0c8adb02-ade8-47bb-9939-4d45110ffefd.pdf
darrenyaoyaoyao
0
82
bootstrap.pdf
darrenyaoyaoyao
1
97
Javasrcipt_基礎一.pdf
darrenyaoyaoyao
0
100
Javascript_基礎二.pdf
darrenyaoyaoyao
0
150
HTML__CSS_基礎_.pdf
darrenyaoyaoyao
0
80
HTML__CSS_基礎_.pdf
darrenyaoyaoyao
0
58
Other Decks in Programming
See All in Programming
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
210
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
180
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
190
Crash Auto Pipelines
veronikapj
1
420
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
150
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
240
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
320
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
170
protojson における文字化けの扱い
kazuki1023
0
430
Modernizing iOS Apps
seyfoyun
0
160
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
570
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
310
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
490
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Music & Morning Musume
bryan
48
7.5k
A Soul's Torment
seathinner
9
3.9k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
570
The Language of Interfaces
destraynor
162
27k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
980
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
Being A Developer After 40
akosma
PRO
92
590k