Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Stylus by 陳柏穎
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
kvzhuang
February 18, 2014
Education
730
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
3k
人本設計 - by Akane Lee
kvzhuang
0
1.1k
JavaScript 程式設計
kvzhuang
0
150
My Pocket Monster
kvzhuang
0
97
CoffeeScript
kvzhuang
1
1.3k
Liferay Portal
kvzhuang
1
200
Introduction of TypeScript
kvzhuang
0
320
Other Decks in Education
See All in Education
Visionary Initiative: Future Intelligence 「未来の知性と社会の礎を築く」|Science Tokyo(東京科学大学)
sciencetokyo
PRO
0
210
Interaction - Lecture 10 - Information Visualisation (4019538FNR)
signer
PRO
0
2.6k
アントレプレナーシップ教育機構 概要
sciencetokyo
PRO
0
3.8k
View Manipulation and Reduction - Lecture 9 - Information Visualisation (4019538FNR)
signer
PRO
1
2.7k
Managing Complexity: India’s Semiconductor Ambitions & New Industrial Policy
vyadav
0
170
Human-AI Interaction - Lecture 11 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
1.1k
現場最前線から教えるデータサイエンス1 -ITベンダーにおけるデータサイエンティスト-
hidetoshikawaguchi
0
110
LinkedIn
matleenalaakso
0
4.2k
良い塩梅を実現する、AWSネットワーク3分クッキング
masakiokuda
1
260
✅ レポート採点基準 / How Your Reports Are Assessed
yasslab
PRO
0
360
2026年度春学期 統計学 第6回 データの関係を知る(1)ー 相関関係 (2026. 5. 14)
akiraasano
PRO
0
110
Laura Wilson - The Quarterly PR Pivot
laurawilsonbseo1
1
330
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
22k
GitHub's CSS Performance
jonrohan
1033
470k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
240
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
140
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Balancing Empowerment & Direction
lara
6
1.1k
Fireside Chat
paigeccino
42
3.9k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
720
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
160
Large-scale JavaScript Application Architecture
addyosmani
515
110k
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