Re: [csswg-drafts] [selectors-4] Should we have :open and :closed? (#11039)

The CSS Working Group just discussed `[selectors-4] Should we have :open and :closed?`.

<details><summary>The full IRC log of that discussion</summary>
&lt;gregwhitworth> jarhar: I was hoping this will be quick<br>
&lt;brecht_dr> q+<br>
&lt;gregwhitworth> jarhar: I tried to spec the open and closed pseudo classes in HTML that are in CSS and I was informed that they are redundant and remove the :closed pseudo selector<br>
&lt;gregwhitworth> ack brecht_dr<br>
&lt;gregwhitworth> brecht_dr: one benefit of having :closed is you can select a sibling in CSS with that state and you can make that default and only do it on open<br>
&lt;gregwhitworth> brecht_dr: I see some benefit to having this as well and we have this with disabled and almost no one uses enabled<br>
&lt;gregwhitworth> anne: in those cases you can use :not(:open)<br>
&lt;gregwhitworth> anne: if there are controls we might provide a picker; :close would not always match unless there is an open state<br>
&lt;gregwhitworth> anne: at least until we have a better handle on that open is easier and in the scenario where you'll know there is a picker you can do :not(:open)<br>
&lt;gregwhitworth> ack dbaron<br>
&lt;gregwhitworth> dbaron: I think historically CSS has pairs is so that you can distinguish between the ones they apply and those they don't<br>
&lt;gregwhitworth> dbaron: :close only matches things that could be :open<br>
&lt;gregwhitworth> dbaron: could definition could be non-trivial to be defined and as we talk about inputs that "could" have a picker is not a trivial thing and :close would only apply to a picker like "color", "date" would match if they have a picker and they are closed now<br>
&lt;gregwhitworth> q+<br>
&lt;jarhar> gregwhitworth: i feel like david you agreed with anne, you can do that with not<br>
&lt;gregwhitworth> ack gregwhitworth<br>
&lt;masonf> q+<br>
&lt;jarhar> dbaron: with input its harder to do that with not because you need to write input type= and get the selector for type exactly right and then put not open<br>
&lt;gregwhitworth> dbaron: it's harder to do with :not on inputs is you need to get the type attribute correct<br>
&lt;gregwhitworth> anne: I don't think we want to expose which controls have a picker<br>
&lt;masonf> q-<br>
&lt;gregwhitworth> anne: :closed would expose which controls have a picker<br>
&lt;jarhar> q+<br>
&lt;gregwhitworth> tim: the reason that is an issue is that the picker is not set and it may vary<br>
&lt;gregwhitworth> anne: iOS select multiple has a picker vs inline compared with Desktop<br>
&lt;gregwhitworth> ack jarhar<br>
&lt;ntim> ntim: the set of elements that have a picker is not finalized*<br>
&lt;gregwhitworth> jarhar: I really would like to move this forward and I'm fine with removing closed for now, does someone have strong feelings to keep closed right out of the gate<br>
&lt;masonf> proposed resolution: support :open for now, leave :closed for later.<br>
&lt;gregwhitworth> argyle: yeah, it seems obvious to include them and we think :not(:open) is the same then it seems solvable and they should be provided<br>
&lt;gregwhitworth> anne: :closed would only match an element that HAS a picker and that capability may change over time<br>
&lt;gregwhitworth> anne: :open will only match if the picker is shown and that will require a user action<br>
&lt;gregwhitworth> argyle: we can determine that today correct?<br>
&lt;ntim> q+<br>
&lt;gregwhitworth> anne: whether it's web observable or not<br>
&lt;gregwhitworth> argyle: isn't that a pseudo element of picker() making it web observable?<br>
&lt;gregwhitworth> argyle: as someone coming into this we have :open but not :close?<br>
&lt;gregwhitworth> ntim: the main problem here is someone uses :close selector on the web page and we expand the set of things that have pickers then :close will apply to more things with no action<br>
&lt;masonf> q+<br>
&lt;gregwhitworth> ntim: it's a compat hazard and it doesn't require any action for it to apply<br>
&lt;gregwhitworth> ack ntim<br>
&lt;gregwhitworth> argyle: can we teach "closed" to be to :not(:open)<br>
&lt;gregwhitworth> ntim: there is a difference<br>
&lt;gregwhitworth> masonf: this is akin to appearance: base in that there is compat concerns and once we have all the controls that have pickers we may come back and address them?<br>
&lt;gregwhitworth> anne: maybe, we have to figure out the platform "thing"<br>
&lt;gregwhitworth> anne: there was TAG feedback on whether these should be feasible or not<br>
&lt;gregwhitworth> anne: so I think that would be TBD<br>
&lt;gregwhitworth> q?<br>
&lt;gregwhitworth> ack masonf<br>
&lt;jarhar> proposed resolution: remove :closed for now and keep :open<br>
&lt;gregwhitworth> argyle: I'm in agreement with jarhar that sympathises and I'll not blocking it<br>
&lt;masonf> +1<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11039#issuecomment-2491673891 using your GitHub account


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

Received on Thursday, 21 November 2024 16:15:15 UTC