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
1
710
Stylus by 陳柏穎
kvzhuang
February 18, 2014
Tweet
Share
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
1k
JavaScript 程式設計
kvzhuang
0
130
My Pocket Monster
kvzhuang
0
71
CoffeeScript
kvzhuang
1
1.3k
Liferay Portal
kvzhuang
1
190
Introduction of TypeScript
kvzhuang
0
310
Other Decks in Education
See All in Education
子どもが自立した学習者となるデジタルの活用について
naokikato
PRO
0
190
【ベテランCTOからのメッセージ】AIとか組織とかキャリアとか気になることはあるけどさ、個人の技術力から目を背けないでやっていきましょうよ
netmarkjp
2
2.9k
Postcards
gabrielramirezv
0
110
HTML5 and the Open Web Platform - Lecture 3 - Web Technologies (1019888BNR)
signer
PRO
2
3.2k
令和エンジニアの学習法 〜 生成AIを使って挫折を回避する 〜
moriga_yuduru
0
240
LotusScript でエージェント情報を出力してみた
harunakano
0
120
Chapitre_2_-_Partie_3.pdf
bernhardsvt
0
150
Adobe Express
matleenalaakso
2
8.1k
HyRead2526
cbtlibrary
0
200
MySmartSTEAM 2526
cbtlibrary
0
190
Flinga
matleenalaakso
3
15k
JavaScript - Lecture 6 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
Featured
See All Featured
How GitHub (no longer) Works
holman
316
140k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
240
The Pragmatic Product Professional
lauravandoore
37
7.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Believing is Seeing
oripsolob
1
58
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Building an army of robots
kneath
306
46k
We Have a Design System, Now What?
morganepeng
54
8k
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
Google's AI Overviews - The New Search
badams
0
910
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