Skip to content

Skip escaped commas when splitting selector - #5239

Merged
adamwathan merged 1 commit into
masterfrom
fix-dark-commas
Aug 18, 2021
Merged

Skip escaped commas when splitting selector#5239
adamwathan merged 1 commit into
masterfrom
fix-dark-commas

Conversation

@bradlc

@bradlc bradlc commented Aug 17, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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