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
kvzhuang
February 18, 2014
Education
750
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
160
My Pocket Monster
kvzhuang
0
99
CoffeeScript
kvzhuang
1
1.3k
Liferay Portal
kvzhuang
1
200
Introduction of TypeScript
kvzhuang
0
320
Other Decks in Education
See All in Education
現場最前線から教えるデータサイエンス1 -ITベンダーにおけるデータサイエンティスト-
hidetoshikawaguchi
0
130
Soluciones al examen de Geografía 2026. JULIO (Convocatoria Extraordinaria)
juanmartin2026
0
4k
LinkedIn
matleenalaakso
0
4.4k
遊ぶかね欲しさの犯行(ルビ:労働)です
shirayanagiryuji
0
130
!コスパよくインターンに受かる方法!
ruribou
1
290
Examen de Selectividad. Geografía junio 2026 (Convocatoria Ordinaria). UCLM
juanmartin2026
1
1.4k
良書紹介08_ 頭のいい子がやっているすごいグラフの読み方
bunnchinn3
0
110
「機械学習と因果推論」入門 ③ 漸近効率な推定量と二重機械学習
masakat0
0
730
アラムコSTEAMチャレンジ 実践報告書
codeforeveryone
0
170
[2026前期火5] 論理学(京都大学文学部 前期 第4回)「 ならば(→)の導入と証明ネット」
yatabe
0
500
면접관 눈에 띄는 데이터 분석 포트폴리오 만드는 법 | 2026년 5월 세미나
datarian
0
870
Estimating Group × Time Interaction in Scale-Transformed CEFR-J Self-Assessment Scores: A Case in Study-Abroad Research
uranoken
0
130
Featured
See All Featured
Making Projects Easy
brettharned
120
6.7k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
410
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
310
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Navigating Team Friction
lara
192
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Automating Front-end Workflow
addyosmani
1370
210k
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