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
41
PostCSS
Matija Marohnić
May 21, 2019
Tweet
Share
More Decks by Matija Marohnić
See All by Matija Marohnić
Introduction to Remix
silvenon
0
130
Cypress vs. Playwright
silvenon
0
150
Studying Strapi: an open source head headless CMS
silvenon
0
33
CSS Specificity
silvenon
0
25
Make your JavaScript projects more accessible to newcomers
silvenon
0
69
React Hooks
silvenon
0
67
CSS Custom Properties
silvenon
0
37
Maintainable Integration Testing in React
silvenon
0
28
Writing Codemods with jscodeshift
silvenon
0
26
Other Decks in Programming
See All in Programming
エンジニアが挑む、限界までの越境
nealle
1
320
note の Elasticsearch 更新系を支える技術
tchov
9
3.5k
flutter_kaigi_mini_4.pdf
nobu74658
0
150
Bedrock×MCPで社内ブログ執筆文化を育てたい!
har1101
7
1.5k
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
810
SwiftDataのカスタムデータストアを試してみた
1mash0
0
140
The Implementations of Advanced LR Parser Algorithm
junk0612
2
1.4k
AIコーディングエージェントを 「使いこなす」ための実践知と現在地 in ログラス / How to Use AI Coding Agent in Loglass
rkaga
4
1.2k
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
130
プロダクト横断分析に役立つ、事前集計しないサマリーテーブル設計
hanon52_
3
550
大LLM時代にこの先生きのこるには-ITエンジニア編
fumiyakume
8
3.3k
Amazon CloudWatchの地味だけど強力な機能紹介!
itotsum
0
240
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.6k
A better future with KSS
kneath
239
17k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
Building Applications with DynamoDB
mza
94
6.4k
Docker and Python
trallard
44
3.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.4k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
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