Skip to content

[selectors-4] Introduce :popovertarget-open pseudo class #9547

Open
@ggedde

Description

@ggedde

Looks like :popover-open is landing, but it only applies to the popover element itself.
We also need a way to style the Trigger element for the popover element when the popover element is open.

consider the following:

<button popovertarget="my-popover">Open Popover</button>
...
<div popover id="my-popover">Greetings, one and all!</div>

I would like a way to style the button when the popover is open.
This would need to apply to all elements that have the same 'popovertarget'
Ex.

<button popovertarget="my-popover">Open Popover</button>
...
<div popover id="my-popover">Greetings, one and all!</div>
...
<button popovertarget="my-popover">Open Popover From another button</button>

It would be ideal to have something like:

button:popovertarget-open {
   ...
}

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions