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
65
0
Share
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
29
Goodbye jsdom/happy-dom, hello Vitest Browser Mode!
silvenon
0
19
Introduction to Remix
silvenon
0
160
Cypress vs. Playwright
silvenon
0
170
Studying Strapi: an open source head headless CMS
silvenon
0
55
CSS Specificity
silvenon
0
62
Make your JavaScript projects more accessible to newcomers
silvenon
0
91
React Hooks
silvenon
0
93
CSS Custom Properties
silvenon
0
52
Other Decks in Programming
See All in Programming
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
120
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
5.2k
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
Moments When Things Go Wrong
aurimas
3
140
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
140
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.5k
3Dシーンの圧縮
fadis
1
590
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
430
AIとRubyの静的型付け
ukin0k0
0
520
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
130
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
2k
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.4k
Featured
See All Featured
Optimizing for Happiness
mojombo
378
71k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Agile that works and the tools we love
rasmusluckow
331
21k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
190
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
Building Applications with DynamoDB
mza
96
7.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
260
Music & Morning Musume
bryan
47
7.2k
Site-Speed That Sticks
csswizardry
13
1.2k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
230
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
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