blakeembrey / free-style

Make CSS easier and more maintainable by using JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minimize built CSS size

blakeembrey opened this issue · comments

We can easily get the entire built CSS size down to by implementing some straightforward changes:

  • Nested syntax automatically extends matching hashes
  • Always sort keys by alphabetical order before hashing
  • Remove nested syntax from objects before hashing

Added sorted keys, but the nesting is a little trickier since it should only extend when it's in the root and not a media query or other nested object.