Re: [csswg-drafts] [css-pseudo] Petition to change the "active" pseudo-class to "pressed" (#12769)

What would constitute an element being "selected"? A text selection within it? Around it? Would the selected option in a <select> dropdown be :selected? What about a ticked checkbox/radio button or a text field that is currently being edited?

Yes, the selected option would be :selected and I believe the checkbox and radio button get the ["checked" pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:checked). The confusion really is around the word "active" itself. Changing the nomenclature to "pressed" further intimates the [intended use](https://developer.mozilla.org/en-US/docs/Web/CSS/:active) for the class and clarifies where it should be used especially when it comes to stacked states. Especially considering that folks often conflate the two (active and selected) in terms of how it might be designed and implemented.


-- 
GitHub Notification of comment by shaolinkitty
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12769#issuecomment-3276661152 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 10 September 2025 21:51:58 UTC