Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
`_conflict` should get handled differently #110
Sometimes in JS files things get concatenated like:
const myAwesomeNumber = 200; const newDistanceBetween = myAwesomeNumber + 'px';
So when there was already a selector which got renamed to
const myAwesomeNumber = 200; const newDistanceBetween = myAwesomeNumber + 'px_conflict';
Which is not really correct and would end up breaking the code. I have three suggestions:
@X-Ryl669 do you have any suggestions on this?
What I did in my case (almost similar, and due to, for example:
I don't know if you remember the
Typically, I think it might be worth to exclude all known conflicting patterns, and they are not legion. Typically, it's HTML tag's name + CSS unit's name. We'll loose a bit of potential compression, but safety goes up and likely justify them.
So instead of creating an empty exclude list, we can just populate a default exclude list and let the user remove them if she wants to (most won't).
It's sad there is no possible comment in the file, but basically, the first group of words are HTML5 tagname and the second group are CSS units, the last group is a CSS specific word referring to the current color (never used that myself, but included for sake of completeness).
Please notice that, contrary to HTML4, HTML5 allow any tag name so this list can not be exhaustive but at least, it covers ~99% of use cases