Lessons Learned from Building a CSS Minifier
Offered By: GOTO Conferences via YouTube
Course Description
Overview
Explore the intricacies of building a CSS minifier in this 40-minute conference talk from GOTO Aarhus 2014. Delve into the world of CSS post-processing with Stoyan Stefanov, Facebook engineer and author of "JavaScript Patterns." Learn about the challenges of parsing CSS, current available parsers, and the introduction of cssshrink.com, a modern open-source CSS minifier. Discover techniques for parsing, understanding, and reducing CSS code, as well as writing code that is more compression-friendly. Cover topics ranging from key-value parsing to full AST parsing, delivering browser-specific stylesheets, and creating pre/post-processors for missing or proposed CSS features. Gain insights into various optimization techniques, including handling spaces and comments, color optimization, number formatting, quote management, pseudo-element handling, and dealing with duplicates in declarations, selectors, and keyframes.
Syllabus
Introduction
Agenda
Motivation
CSS is hard
Crockford on CSS
Solution
Partial parsing
How about
Next: write a parser
Next: use a parser
Space, comments
Colors
Zeros, numbers
Quotes
Pseudo
font-weight
Lowercase
Duplicate declarations
Duplicate selectors
Adjacent selectors
Adjacent blocks
Random nonsense
Shorthands
Unit conversions
Duplicate keyframes
Rename
Supporting tools
Taught by
GOTO Conferences
Related Courses
Addressing Algorithmic BiasGOTO Conferences via YouTube Empowering Consumers - Evolution of Software in the Future
GOTO Conferences via YouTube Why Static Typing Came Back
GOTO Conferences via YouTube Higher Kinded Types in a Lower Kinded Language - Functional Programming in Kotlin
GOTO Conferences via YouTube It's Not Hard to Test Smart - Delivering Customer Value Faster
GOTO Conferences via YouTube