Closed
Description
The transform function currently allows you to make optimizations on specific properties, but it would also be really helpful to be able to drop rules based on selectors in situations where you can't easily shape parts of the css that you're including in your app like including libraries, common-style-repos, etc. I'm not sure if this could be fit into the current transform callback as a third argument.
An example of this would be having a lot of selectors like .theme-light .button
and .theme-light .card
, and it'd be great to be able to test selectors and drop all selectors that include .theme-light
in some way, leading to possible selector-less rule blocks that could then be omitted entirely from the resulting output.
Activity
jakubpawlowicz commentedon May 18, 2017
Sure, we can have it. 👍
Fixes #947 - selector based filtering.
jakubpawlowicz commentedon Jun 17, 2017
Fixed in master & due in 4.2.0.
merrywhether commentedon Jun 20, 2017
Awesome! Looking forward to it.