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

Parent state modifier without explicit parent (in-*) #13912

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

eloyesp
Copy link

@eloyesp eloyesp commented Jun 28, 2024

I'm doing a follow up on #13751 where I propose a new modifier, that is a simplified "group-*" without an explicit parent.

There are many times when the styling is based on the parent state, but it is not important which parent, there are many examples of that on the tests with the form of: [.checked &]:underline, but there are many other cases, for example:

  • in-aria-busy: If any parent is busy is enough, we don't care which parent it is.
  • in-data-active: This is part of an active element.

The syntax is quite simple, the implementation is clean and the generated css is shorter than using group-* or [.checked_&]:underline, and it also allows using variants like data- and aria-.

Hope you like the idea.

Add support for "in" that works like the group variant, but use any
parent (so it does not require an explicit group element).
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.

None yet

1 participant