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

Add enabled variant #7905

Merged
merged 3 commits into from
Mar 22, 2022
Merged

Add enabled variant #7905

merged 3 commits into from
Mar 22, 2022

Conversation

adamwathan
Copy link
Member

This PR adds a new enabled variant for the :enabled pseudo-class.

Originally we decided to skip this because it felt simpler to just let people make their default styles the enabled styles and explicitly style disabled styles using the disabled variant, but there are situations where it is more terse to use enabled, specifically when you want to target another pseudo-class but not when the element is disabled:

<!-- Before -->
<button class="bg-blue-500 active:bg-blue-600 disabled:active:bg-blue-500">

<!-- After -->
<button class="bg-blue-500 enabled:active:bg-blue-600">

Resolves #7903.

@holic
Copy link

holic commented Jul 20, 2022

🙏 I've wanted this for so long!

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.

2 participants