Include :popover-open in open variant
#13331
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Inspired by #12148.
This PR extends the existing
openvariant to target:popover-openas well as the[open]attribute.This was suggested by @una that I thought was really clever because there's no situation where you actually need to differentiate between these states on the same element (dialogs use
[open], popovers use:popover-open, nothing uses both) and it keeps the name nice and short.Since
:isaccepts a forgiving selector list, this is safe to do without worrying about browser support for:popover-openimpacting people who are using this for dialogs.If someone ever needed an escape hatch here where they really specifically only wanted to target
:popover-openor[open], they can always use an arbitrary variant: