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
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
7
Introduction to Remix
silvenon
0
140
Cypress vs. Playwright
silvenon
0
160
Studying Strapi: an open source head headless CMS
silvenon
0
41
CSS Specificity
silvenon
0
32
Make your JavaScript projects more accessible to newcomers
silvenon
0
76
React Hooks
silvenon
0
76
CSS Custom Properties
silvenon
0
40
Maintainable Integration Testing in React
silvenon
0
35
Other Decks in Programming
See All in Programming
『HOWはWHY WHATで判断せよ』 〜『ドメイン駆動設計をはじめよう』の読了報告と、本質への探求〜
panda728
PRO
1
590
CSC509 Lecture 10
javiergs
PRO
0
170
Researchlyの開発で参考にしたデザイン
adsholoko
0
120
Core MIDI を勉強して作曲用の電子ピアノ作ってみた!
hypebeans
0
100
What's New in Web AI?
christianliebel
PRO
0
120
퇴근 후 1억이 거래되는 서비스 만들기 | 내가 AI를 사용하는 방법
maryang
2
550
SUZURIの規約違反チェックにおけるクリエイタフィードバックの試⾏錯誤/Trial and Error in Creator Feedback for SUZURI's Terms of Service Violation Checks
ae14watanabe
1
140
組織もソフトウェアも難しく考えない、もっとシンプルな考え方で設計する #phpconfuk
o0h
PRO
10
4k
「正規表現をつくる」をつくる / make "make regex"
makenowjust
1
120
自動テストのアーキテクチャとその理由ー大規模ゲーム開発の場合ー
segadevtech
2
940
Claude Code on the Web を超える!? Codex Cloud の実践テク5選
sunagaku
0
470
AI 時代だからこそ抑えたい「価値のある」PHP ユニットテストを書く技術 #phpconfuk / phpcon-fukuoka-2025
shogogg
1
400
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
The Cult of Friendly URLs
andyhume
79
6.7k
Automating Front-end Workflow
addyosmani
1371
200k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Unsuck your backbone
ammeep
671
58k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
1.8k
A better future with KSS
kneath
239
18k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
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