Skip to content

Conversation

Andarist
Copy link

@Andarist Andarist commented Apr 5, 2020

The whitespace in & :hover has a semantic value - this is not equal to &:hover and thus this whitespace should not be removed when minifying quasis.

The problem is that compressSymbols is just too simplistic - parsing a language like CSS with RegExp is IMHO not the best idea in the long run as it loses the context in which particular symbols have been used and it's hard to develop further.

I've prepared a fix for this problem in Emotion: emotion-js/emotion#1836 , we maybe could think of sharing the solution for this as the job is pretty much the same for both libraries. I'm afraid though that I won't have much time to abstract this away and port the solution here, but if you would like to do it I'm open for collaboration.

@agriffis
Copy link
Contributor

agriffis commented Apr 5, 2022

Oh cool, this should be merged after #376.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants