linkedin / css-blocks

High performance, maintainable stylesheets.
http://css-blocks.com/
BSD 2-Clause "Simplified" License
6.33k stars 152 forks source link

Detect Generated Classname Conflicts #496

Closed chriseppstein closed 3 years ago

chriseppstein commented 3 years ago

We need to raise an error if a generated classname from opticss conflicts with a css class used in a stylesheet that isn't from css-blocks.

We should scan all css files that aren't from us to make sure their classnames aren't used by the optimizer. (ideally we'd register these with the optimizer so that it avoids it but it seems like it's too late to do that in the ember-cli build process).

This should only run during production builds, when opticss is enabled. we can skip this whenever opticss is disabled.