zgreen / postcss-critical-css

PostCSS plugin to define and output critical CSS using custom atRules, and/or custom CSS properties. Critical CSS may be output to one or more files, as defined within the plugin options or within the CSS.
MIT License
86 stars 11 forks source link

Custom destination #1

Closed ostowe closed 8 years ago

ostowe commented 8 years ago

Updates:

Note/Question: The scope value has the effect of dragging in related, but unnecessary group selectors. For example, if you use critical-selector: scope on .news-item, it may drag in a selector like .container:after, .news-item:after, .third-selector:after, ... {...}. I considered pulling out only the relevant selector, but wasn't sure if that might have unintended consequences or simply be a Bad Idea™. Currently it brings in the entire selector; I felt like transforming the selector without warning is not a good plan.

The other option here is to only bring in selectors that begin with the parent: so no combo selectors.

zgreen commented 8 years ago

Merging this! Better late than never, hopefully—this was a rad update. ⌛