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
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.6k
Datadog Workflow Automation で圧倒的価値提供
showwin
1
280
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
240
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
260
ソフトウェアエンジニアの成長
masuda220
PRO
12
2.1k
Formの複雑さに立ち向かう
bmthd
1
940
Rubyと自由とAIと
yotii23
6
1.8k
5分で理解する SOLID 原則 #phpcon_nagoya
shogogg
1
390
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
9
2.5k
iOSでQRコード生成奮闘記
ktcryomm
2
110
Swift Testingのモチベを上げたい
stoticdev
2
150
sappoRo.R #12 初心者セッション
kosugitti
0
280
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Docker and Python
trallard
44
3.3k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
52k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
380
Building an army of robots
kneath
303
45k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Automating Front-end Workflow
addyosmani
1369
200k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
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