Skip to content

Bug: Reordering breaks 'before' + nested class selector#70

Open
ftes wants to merge 1 commit into100phlecs:masterfrom
ftes:fix/before-arbitrary-child-class
Open

Bug: Reordering breaks 'before' + nested class selector#70
ftes wants to merge 1 commit into100phlecs:masterfrom
ftes:fix/before-arbitrary-child-class

Conversation

@ftes
Copy link

@ftes ftes commented May 28, 2025

Example: https://play.tailwindcss.com/jpSQGTUxkw

Given

<div class="[&_.nested]:before:content-['hello_']"><span class="nested">world</span></div>

I expect to see
image

But after formatting I see
image

Because the class name was formatted (before: was moved to front):

<div class="before:[&_.nested]:content-['hello_']"><span class="nested">world</span></div>

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.

1 participant