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
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
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
360
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6.2k
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1.1k
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.3k
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
270
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
230
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
470
Proxmox x Talos Linux x Terraform で実現するなんかいい感じの Kubernetes クラスタ / A Sleek Kubernetes Cluster Powered by Proxmox, Talos Linux, and Terraform
nnaka2992
0
300
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
180
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.6k
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
660
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
260
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
850
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
410
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
610
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
360
Writing Fast Ruby
sferik
630
63k
Six Lessons from altMBA
skipperchong
29
4.6k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
370
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Paper Plane (Part 1)
katiecoart
PRO
3
12k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
How to build a perfect <img>
jonoalderson
1
6.3k