Skip to content

Conversation

devongovett
Copy link
Member

@devongovett devongovett commented Sep 27, 2023

I noticed that some states like focus-visible were overriding others like selected. That is because of the extra [data-rac] part of the selector, which raises a rule like .focus-visible\:bg-red[data-rac][data-focus-visible] to a specificity of (0, 3, 0) whereas .selected\:bg-red[data-selected] only has (0, 2, 0).

This PR uses :where([data-rac]) instead to ensure that is not taken into account in the specificity.

@rspbot
Copy link

rspbot commented Sep 27, 2023

@rspbot
Copy link

rspbot commented Sep 27, 2023

## API Changes

unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }

Copy link
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@devongovett devongovett merged commit fa1b469 into main Sep 27, 2023
@devongovett devongovett deleted the tailwind-specificity branch September 27, 2023 20: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.

4 participants