5 min read
2026-02-25
Tools like PurgeCSS and UnCSS parse HTML and remove styles that are not applied to any element.
If several selectors have the same properties, combine them separated by commas.
`margin: 10px 20px` instead of four separate properties
`background: url(...) no-repeat center` instead of separate announcements
`font: bold 16px/1.5 Arial` instead of three properties
`#ffffff` → `#fff`
`rgb(0, 0, 0)` → `#000`
`rgba(255,255,255,1)` → `#fff`
Group styles within a single media query instead of duplicating `@media` blocks.
CSS variables reduce duplicate values and make them easier to maintain.
Minification + Gzip provides maximum traffic savings.
See also: Flexbox Playground, Grid Playground, Color Picker