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
67
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PostCSS
Matija Marohnić
May 21, 2019
More Decks by Matija Marohnić
See All by Matija Marohnić
oxlint & oxfmt: linting and formatting from the future
silvenon
0
36
Goodbye jsdom/happy-dom, hello Vitest Browser Mode!
silvenon
0
29
Introduction to Remix
silvenon
0
170
Cypress vs. Playwright
silvenon
0
180
Studying Strapi: an open source head headless CMS
silvenon
0
58
CSS Specificity
silvenon
0
64
Make your JavaScript projects more accessible to newcomers
silvenon
0
98
React Hooks
silvenon
0
98
CSS Custom Properties
silvenon
0
59
Other Decks in Programming
See All in Programming
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
130
信頼性の目標を誰も求めてない
shubox
0
230
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
390
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
3.8k
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
7.9k
仕様駆動開発の消費期限
watany
20
9.1k
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
370
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
580
typoなんかねぇよ
raspython3
0
610
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
120
Cloudflare is Agents
chimame
0
180
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
200
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
The Curse of the Amulet
leimatthew05
2
14k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
670
Believing is Seeing
oripsolob
1
200
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Everyday Curiosity
cassininazir
0
300
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