Lessons Learned from Building a CSS Minifier • Stoyan Stefanov • GOTO 2014
541 views · Published 9 January 2015 · 39:41 · Indexed 12 November 2026
Channel: GOTO Conferences · 2015 · Science & Technology
This presentation was recorded at GOTO Aarhus 2014. #gotocon http://gotocon.com Stoyan Stefanov - Facebook, Author of "JavaScript Patterns" by O'Reilly ABSTRACT In today’s abundance of CSS pre-processors that make the developer’s life easy, it’s equally important to pay attention to the post-processing. Fixing syntax errors, removing duplications, reducing bytes, and sending the bare minimum you possibly can – these all make a difference in the user experience. In this session Stoyan will talk about the state of currently available CSS parsers and introduce you to a new modern best-of-breed open-source CSS minifier called cssshrink.com. He will teach you the details about the process of parsing, understanding and reducing CSS code, as well as how to write code that lends itself to better compression. From key-value parsing to full AST parsing, from delivering BSCSS (browser-specific stylesheets) to writing your own pre/post-processor to add missing or newly proposed CSS features, Stoyan will have your thirst for CSS processing knowledge covered. TIMECODES 0:00 Introduction 1:05 Agenda 3:21 Motivation 6:58 CSS is hard 8:22 Crockford on CSS 9:43 Solution 10:53 Partial parsing 11:54 How about 13:22 Next: write a parser 14:06 Next: use a parser 17:54 Space, comments 18:41 Colors 20:14 Zeros, numbers 20:49 Quotes 23:02 Pseudo 24:39 font-weight 24:50 Lowercase 25:46 Duplicate declarations 26:51 Duplicate selectors 27:01 Adjacent selectors 27:21 Adjacent blocks 28:00 Random nonsense 30:18 Shorthands 31:00 Unit conversions 31:43 Duplicate keyframes 32:22 Rename 33:31 Supporting tools https://twitter.com/gotocon https://www.facebook.com/GOTOConference http://gotocon.com #CSS Looking for a unique learning experience? Attend the next GOTO conference near you! Get your ticket at https://gotopia.tech Sign up for updates and specials at https://gotopia.tech/newsletter
More from this channel
-
21:24
Jeff Sutherland & Ken Schwaber at ESE Conference Part II • GOTO 2011
-
51:03
Mature Legacy Seeking New Technology: Extracting Gold from Legacy Code • Dave Thomas • GOTO 2011
-
39:32
Reasons Node.js Submissions Get Rejected by SoundCloud • Phil Calçado • GOTO 2012
-
31:56
Engineering Culture • Alexander Grosse • GOTO 2012
-
2:30
Interview with Brian LeRoux • GOTO 2012
-
5:29
Interview with Simon Brown • GOTO 2012
-
19:00
Interview with Rich Hickey • GOTO 2012
-
23:48
Interview with Don Reinertsen • GOTO 2012