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

Skip escaped commas when splitting selector #5239

Merged
merged 1 commit into from
Aug 18, 2021
Merged

Conversation

bradlc
Copy link
Contributor

@bradlc bradlc commented Aug 17, 2021

Fixes #5006

This PR ensures that escaped commas within selectors are not considered the end of a selector and the start of a new one.

Currently if you have a prefix (e.g. tw-) a class like dark:tw-bg-[rgb(255,0,0)] can end up generating CSS like this:

.dark .dark\:tw-bg-\[rgb\(255\\,, {
  --tw-text-opacity: 1;
  background-color: rgba(255, 0, 0, var(--tw-bg-opacity));
}

@adamwathan adamwathan merged commit e1160e3 into master Aug 18, 2021
@adamwathan adamwathan deleted the fix-dark-commas branch August 18, 2021 00:06
@adamwathan
Copy link
Member

❤️

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.

JIT + dark + arbitrary value is not working
2 participants