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
Stylus by 陳柏穎
Search
kvzhuang
February 18, 2014
Education
800
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Stylus by 陳柏穎
kvzhuang
February 18, 2014
More Decks by kvzhuang
See All by kvzhuang
Immutable In JavaScript
kvzhuang
1
12k
F2E.tw in Developer Party 2014
kvzhuang
0
3.1k
人本設計 - by Akane Lee
kvzhuang
0
1.2k
JavaScript 程式設計
kvzhuang
0
200
My Pocket Monster
kvzhuang
0
120
CoffeeScript
kvzhuang
1
1.4k
Liferay Portal
kvzhuang
1
210
Introduction of TypeScript
kvzhuang
0
330
Other Decks in Education
See All in Education
HTTP APIs in Python
madhuri28
0
120
1014
cbtlibrary
0
240
1104
cbtlibrary
0
170
Session 4 - Teknik Lobby dan Negosiasi
adeputra13
0
680
[2026後期火5] 論理学(京都大学文学部 後期 第1回)「名前はあるのに、誰なのかわからない」
yatabe
0
180
BRIEF OUTLINE OF IMPORTANT PLANT CONSTITUENTS
pawan_pharm
0
270
DRUGS ACTING ON THE PERIPHERAL NERVOUS SYSTEM
pawan_pharm
0
230
Pharmacognosy_Chapter_-1.pdf , Definition, history & scope of pharmacognosy
ak679839
0
180
新型コロナ禍をともに「楽しみながら開いていこう!」 :中門 吉松 会員(2720 Japan O.K.ロータリーEクラブ)卓話 : 2026.10.19.例会・卓話
2720japanoke
0
720
SANG PENCIPTA BERBICARA (01ABSG-Q4-2026)
ssmedikasda
0
560
Before You Scale: Understand the Theory Behind the Simulation
pfn
PRO
1
200
The Dirty Dozen: 12 gala mistakes you don’t know you’re making
auctria
PRO
0
260
Featured
See All Featured
How to build a perfect <img>
jonoalderson
1
6.2k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
280
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
300
Google's AI Overviews - The New Search
badams
0
1.7k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
630
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
610
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
670
Chasing Engaging Ingredients in Design
codingconduct
0
390
The agentic SEO stack - context over prompts
schlessera
0
1k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
820
Transcript
易上⼿手的 CSS preprocessor Front-End Developers Taiwan Party - 5! DSL時代!把程式寫給⼈人看
http://poying.me/ 陳柏穎 http://github.com/poying
易上⼿手的 CSS preprocessor Stylus ❖ NodeJS! ❖ 可在瀏覽器上 compile! ❖
仿 Sass
特⾊色 ❖ 可使⽤用純 CSS 語法! ❖ “可”去除 {}! ❖ “可”去除
;! ❖ “可”去除 :! ❖ “少”強迫性的語法! ❖ Mixin / Transparent mixins! ❖ Block property access
語法彈性 不會有適應新語法的過渡期! 基本語法可以適應我們的個⼈人偏好
Stylus
Sass
不要強迫我 >< 在 sass 或 less 中不管是變數、︑mixin! 還是其他常⽤用的語法都會需要加⼀一些前綴 雖然⽴立意良好,但是被強迫的感覺真的不好 以
sass 為例! 變數前⾯面加上 $ 可以很明確知道他是個變數! 但想換其他前綴呢︖?不能
不要強迫我 >< 在 還是其他常⽤用的語法都會需要加⼀一些 雖然⽴立意良好,但是被強迫的感覺真的不好 以 sass 為例! 變數前⾯面加上 $
可以很明確知道他是個變數! 但想換其他前綴呢︖?不能
不要強迫我 >< 在 還是其他常⽤用的語法都會需要加⼀一些 雖然⽴立意良好,但是被強迫的感覺真的不好 以 sass 為例! 變數前⾯面加上 $
可以很明確知道他是個變數! 但想換其他前綴呢︖?不能
None
Mixins 以更 “css” 的⽅方式來使⽤用 mixin! 這是 stlyus 的最⼤大賣點之⼀一
Mixins 以更 “css” 的⽅方式來使⽤用 mixin! 這是 stlyus 的最⼤大賣點之⼀一
None
Block property access 另個 stylus 的殺⼿手級特點
None
Mixins + Block property access = 神器
None
其他功能 http://learnboost.github.io/stylus/docs
限制 雖然有很多優點,但不能算是完美! ! stylus 考慮了很多基本語法上⾯面的彈性,! 對於⼀一般網⾴頁開發⽽而⾔言非常⽅方便,! 但對於過於複雜的事情處理的不是很好雜! 所以不適合拿來玩奇技淫巧
None
宿命 因為使⽤用 NodeJS 所以 NodeJS 本身的問題也會是 Stylus 的問題! 在 Watch
部分 Stylus 無法知道有新檔案加入
安裝、使⽤用 $ npm install -g stylus! $ stylus -w ./styl
-o ./css
None