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
47
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
10
Introduction to Remix
silvenon
0
150
Cypress vs. Playwright
silvenon
0
170
Studying Strapi: an open source head headless CMS
silvenon
0
50
CSS Specificity
silvenon
0
48
Make your JavaScript projects more accessible to newcomers
silvenon
0
81
React Hooks
silvenon
0
85
CSS Custom Properties
silvenon
0
47
Maintainable Integration Testing in React
silvenon
0
51
Other Decks in Programming
See All in Programming
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
120
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
1k
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
440
安いハードウェアでVulkan
fadis
0
350
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
210
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.2k
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.4k
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
160
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
2
280
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
140
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
500
Claude Code Skill入門
mayahoney
0
400
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2.3k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
310
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
73
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
160
Balancing Empowerment & Direction
lara
5
950
For a Future-Friendly Web
brad_frost
183
10k
We Have a Design System, Now What?
morganepeng
55
8k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
110
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