Re: [csswg-drafts] "Single content, multiple renderings" feature for `<selectlist>` (#9284)

The CSS Working Group just discussed `Select List`.

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: Select List<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/9284<br>
&lt;fantasai> jarhar: Joey from Google<br>
&lt;fantasai> jarhar: in Open UI we've been working on new HTML element called &lt;selectlist>, intended to be more customizable select<br>
&lt;fantasai> jarhar: ran into issue of wanting render one piece of user markup in two different places at the same time<br>
&lt;fantasai> jarhar: and make them independently styleable<br>
&lt;past> Selectlist element explainer for more context: https://open-ui.org/components/selectlist/<br>
&lt;fantasai> jarhar: this is an example of a select list, one of the common desires is adding icons for each item<br>
&lt;fantasai> jarhar: so you can use an option, and see the button<br>
&lt;fantasai> jarhar: entire contents of option, not just text<br>
&lt;fantasai> jarhar: do this with &lt;selectedoption/><br>
&lt;fantasai> jarhar: currently implemented via cloneNode()<br>
&lt;fantasai> jarhar: replace content with selected option<br>
&lt;fantasai> jarhar: chose this solution because not much better option<br>
&lt;fantasai> jarhar: considered shadow DOM, but hard to style<br>
&lt;fantasai> jarhar: considered requiring authors to add script, but want declarative<br>
&lt;fantasai> jarhar: several others<br>
&lt;fantasai> jarhar: I mentioned styling differently, here's another example<br>
&lt;fantasai> jarhar: button renders content differently from options in the list box<br>
&lt;fantasai> jarhar: shows symbol, not the text<br>
&lt;fantasai> jarhar: accomplished with CSS rule that sets text to 'display: none' but only when inside selectoption element<br>
&lt;fantasai> jarhar: wanted to ask if CSS has a better way to do this<br>
&lt;fantasai> jarhar: cloning the user DOM into another part of HTML spec is unusual, there's no precedent<br>
&lt;fantasai> jarhar: concerned might be error-prone<br>
&lt;fantasai> annevk: also creates synchronization issues<br>
&lt;fantasai> annevk: HTML elements are expected to be ???<br>
&lt;astearns> s/???/live/<br>
&lt;fantasai> annevk: you'd have to clone, and gets very messy very quickly<br>
&lt;TabAtkins> s/???/live/<br>
&lt;fantasai> annevk: wanted to have two sets of render ???<br>
&lt;TabAtkins> q+<br>
&lt;fantasai> TabAtkins: only one spot in the DOM, but render twice<br>
&lt;fantasai> jarhar: idk what part of rendering or which tree this might exist in<br>
&lt;past> s/???/boxes/<br>
&lt;fantasai> jarhar: [something about Shadow DOM]<br>
&lt;bkardell_> q+<br>
&lt;fantasai> jarhar: Here's the problem, if anyone wnats to comment in the CSSWG issue we opened, that would be helpful<br>
&lt;TabAtkins> ack TabAtkins<br>
&lt;astearns> ack TabAtkins<br>
&lt;astearns> ack bkardell_<br>
&lt;fantasai> bkardell_: Similar thing [fades out]<br>
&lt;masonf> cna't hear brian<br>
&lt;masonf> s/cna't/can't<br>
&lt;astearns> s/[fades out]/have been requested<br>
&lt;fantasai> bkardell_: this has been asked for in several ways at different times<br>
&lt;masonf> jarhar can you stop presenting so we can see people?<br>
&lt;fantasai> bkardell_: e.g. elements() in CSS<br>
&lt;fantasai> bkardell_: issue on Open UI 616, cgives use cases and rationale<br>
&lt;fantasai> bkardell_: March 2021 HTML 6607 asking for an element like &lt;slot> but called &lt;mirror> for similar needs<br>
&lt;fantasai> bkardell_: clear desire for something like this<br>
&lt;fantasai> astearns: then let's leave this as Yes, we want to do this<br>
&lt;fantasai> astearns: ask CSSWG to review<br>
</details>


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


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

Received on Thursday, 14 September 2023 14:05:35 UTC