Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure peer variants don't include multiple ~ characters #4757

Merged
merged 1 commit into from Jun 23, 2021

Conversation

RobinMalfait
Copy link
Contributor

@RobinMalfait RobinMalfait commented Jun 22, 2021

This PR will ensure that the peer variants are generated correctly.
Currently, the generated peer variants will result in something like:

.peer:disabled:focus:hover ~ ~ ~ .peer-disabled\\:peer-focus\\:peer-hover\\:border-blue-500 {}

But this PR will ensure that the result looks like this:

.peer:disabled:focus:hover ~ .peer-disabled\\:peer-focus\\:peer-hover\\:border-blue-500 {}

While testing, I noticed that prettier properly reduces ~ ~ ~ to a single ~. This sort of explains why the output in a production build for Next.js is "correct". The included minifiers will properly do this correctly as well, but it is incorrect in dev mode.

Fixes: #4726

@adamwathan adamwathan merged commit 0413b84 into master Jun 23, 2021
@adamwathan adamwathan deleted the improve-peer-variants branch June 23, 2021 00:40
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.

peer-focus:peer-valid:* generates wrong output
2 participants