Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Extend CSS tree shaking to remove selectors for non-existent IDs and elements #1142
If a CSS selector contains a reference to an ID, like
On Twenty Fifteen without these changes, the CSS is 42421 bytes. With this branch, the CSS is 35114 bytes. So about 20% smaller.
This also removes trailing semicolons from rules to save additional bytes.
kienstra left a comment
There were similar decreases in CSS size when testing with Twenty Sixteen in Paired Mode. Before, there were 37005 bytes of CSS, and with this PR there were 30747 bytes.