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
PostCSS
Search
Matija Marohnić
May 21, 2019
Programming
0
37
PostCSS
Matija Marohnić
May 21, 2019
Tweet
Share
More Decks by Matija Marohnić
See All by Matija Marohnić
Introduction to Remix
silvenon
0
120
Cypress vs. Playwright
silvenon
0
140
Studying Strapi: an open source head headless CMS
silvenon
0
30
CSS Specificity
silvenon
0
22
Make your JavaScript projects more accessible to newcomers
silvenon
0
66
React Hooks
silvenon
0
64
CSS Custom Properties
silvenon
0
34
Maintainable Integration Testing in React
silvenon
0
23
Writing Codemods with jscodeshift
silvenon
0
23
Other Decks in Programming
See All in Programming
もう僕は OpenAPI を書きたくない
sgash708
5
1.6k
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
2
450
SpringBoot3.4の構造化ログ #kanjava
irof
2
990
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
0
190
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
150
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
150
WebDriver BiDiとは何なのか
yotahada3
1
140
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
250
GoとPHPのインターフェイスの違い
shimabox
2
190
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
210
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
2
220
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
74
9.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
174
51k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
How to train your dragon (web standard)
notwaldorf
91
5.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
The Cult of Friendly URLs
andyhume
78
6.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
240
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Fireside Chat
paigeccino
34
3.2k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Transcript
PostCSS
PostCSS • like Babel, but for CSS • what it
basically does: 1. “understands” CSS code 2. changes it using plugins
Autoprefixer .postcssrc.yml plugin configuration
Autoprefixer
Autoprefixer
Easing gradients
Easing gradients
Easing gradients
Easing gradients
Sass? Less? Stylus? • you can combine them with PostCSS
• or create a subset of their features using plugins
Nesting
Nesting
Nesting
How PostCSS works • reads CSS file content • converts
it to an abstract syntax tree (AST) • plugins perform transformations on the AST • new AST is converted back into CSS file content
CSS syntax selector property value declaration rule etc.
Abstract syntax tree (AST)
A good PostCSS plugin • follows a specification (ideally) •
makes your code better without you being aware of it • isn’t magic, doesn’t invent new syntax
Other use cases for PostCSS
stylelint • like ESLint, but for CSS • used for
detecting mistakes and discouraging patterns
stylelint-a11y
stylelint-a11y
postcss.org