#1010: CSS :open pseudo-class

Visit on Github.

Opened Oct 28, 2024

こんにちは TAG-さん!

I'm requesting a TAG review of CSS :open pseudo-class.

This pseudo-class applies to HTML elements which have an "open" state. For <details>, this is when the element is expanded. For <dialog>, this is when the element is showing. For <select>, this is when the picker is showing.

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • Relevant time constraints or deadlines:
  • The group where the work on this specification is currently being done: CSSWG
  • The group where standardization of this work is intended to be done (if different from the current group):
  • Major unresolved issues with or opposition to this specification: https://github.com/w3c/csswg-drafts/issues/11039
  • This work is being funded by: Google

Discussions

Discussed Nov 11, 2024 (See Github)

Peter: Do we really need :closed in addition to :not(:open)?

Jeffrey: Asked in https://github.com/w3c/csswg-drafts/issues/11039, which says we should remove :closed.

Comment by @plinss Nov 13, 2024 (See Github)

We looked at this in a breakout today and don't see any issues. Closing as satisfied.

We did note https://github.com/w3c/csswg-drafts/issues/11039 and agree that if :not(:open) is equivalent to :closed then :closed isn't necessary and probably should be removed. However if it's possible that an element could be in a state that's neither open or closed, then they're not exactly equivalent and :closed has a purpose.

Thanks for flying TAG.