mrnocreativity / postcss-critical-split

A PostCSS plugin that takes existing CSS files and splits out the annotated critical styles into a seperate file.
MIT License
89 stars 6 forks source link

Improvement: Make it work with nested rules #5

Closed podlebar closed 5 years ago

podlebar commented 7 years ago

Hi.. would be great if this plugin would work with https://github.com/postcss/postcss-nested. This would be a huge benefit because nesting rules seems to be something very often used when writing BEM syntax for example.

Currently the ciritical:start/end comments get removed because of that and some rules don't end up in the critical css file.

would b reallllly nice :)

mrnocreativity commented 7 years ago

Hey Podlebar,

I'm afraid this is a flow/priority issue. I'd suggest to first split your CSS files and then run other PostCSS tasks as you are in fact creating multiple CSS files which are supposed to be further processed.

I do it like that in my own gulp setup as well. I don't really know how I could make it work with that specific plugin. I'll look into it but I can't make any promises...

mrnocreativity commented 6 years ago

Hey @podlebar, I know it's been a while since you reported this issue, but I just fixed https://github.com/mrnocreativity/postcss-critical-split/issues/11. Do you think, this could help your approach?

mrnocreativity commented 5 years ago

Closing this as it seems this is no longer an issue. Feel free to ping me if this should be looked at after all.