Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PostCSS
Search
Matija Marohnić
May 21, 2019
Programming
0
45
PostCSS
Matija Marohnić
May 21, 2019
Tweet
Share
More Decks by Matija Marohnić
See All by Matija Marohnić
Goodbye jsdom/happy-dom, hello Vitest Browser Mode!
silvenon
0
9
Introduction to Remix
silvenon
0
140
Cypress vs. Playwright
silvenon
0
160
Studying Strapi: an open source head headless CMS
silvenon
0
44
CSS Specificity
silvenon
0
33
Make your JavaScript projects more accessible to newcomers
silvenon
0
76
React Hooks
silvenon
0
79
CSS Custom Properties
silvenon
0
40
Maintainable Integration Testing in React
silvenon
0
42
Other Decks in Programming
See All in Programming
TypeScript 5.9 で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
1k
UIデザインに役立つ 2025年の最新CSS / The Latest CSS for UI Design 2025
clockmaker
17
6.6k
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
120
関数の挙動書き換える
takatofukui
4
770
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
140
スタートアップを支える技術戦略と組織づくり
pospome
8
15k
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
310
エディターってAIで操作できるんだぜ
kis9a
0
650
CSC305 Lecture 15
javiergs
PRO
0
250
dnx で実行できるコマンド、作ってみました
tomohisa
0
130
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
260
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.3k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
527
40k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Raft: Consensus for Rubyists
vanstee
140
7.2k
Balancing Empowerment & Direction
lara
5
780
Producing Creativity
orderedlist
PRO
348
40k
How STYLIGHT went responsive
nonsquared
100
5.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
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