Skip to content

Add group-focus variant #1577

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

Merged
merged 1 commit into from
Apr 17, 2020
Merged

Add group-focus variant #1577

merged 1 commit into from
Apr 17, 2020

Conversation

adamwathan
Copy link
Member

This PR adds support for a new group-focus variant that works just like group-hover, except for focus.

This is useful when you want to add custom focus style to a button or link that has some nested child you want to style in a specific way, for example, changing the color of an icon inside of a button when the button is focused:

<button class="group text-gray-600 focus:bg-gray-100 focus:text-gray-700 ...">
  <svg class="h-6 w-6 text-gray-400 group-focus:text-gray-500 ...">
    <!-- ... -->
  </svg>
  Submit
</button>

This variant is currently not enabled by default for any utilities, but can be enabled in the variants section of your config file.

@sampotts
Copy link

Cheers for doing this 👍

@adamwathan adamwathan merged commit ee14892 into master Apr 17, 2020
@adamwathan adamwathan deleted the group-focus branch April 17, 2020 12:11
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