Re: [csswg-drafts] [css-forms-1] Define range slider datalist integration (#12963)

The CSS Working Group just discussed `[css-forms-1] Define range slider datalist integration`, and agreed to the following:

* `SUMMARY: This needs more work in HTML (to clone options) and CSS (to be able to style it), not part of appearance: base for now.`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> ntim: If you have input type=range and datalist, you get a bunch of tick marks that represent the different points in the data list<br>
&lt;emilio> ntim: if you use range inputs with datalists you get tickmarks that represent points in the datalist<br>
&lt;fantasai> ntim: as a guide where you can snap the lines to<br>
&lt;fantasai> ntim: We discussed a few alls ago to try to standardize for appearance:base<br>
&lt;fantasai> ntim: Takeaway from that conversation, that UI wasn't ideal to represent the datalist options<br>
&lt;fantasai> ntim: So I wonder how we should continue that discussion for appearance:base<br>
&lt;fantasai> ntim: Should we decide to not have those tickmarks at all for appearance:base?<br>
&lt;fantasai> ntim: Should we standardize something else?<br>
&lt;emilio> q+<br>
&lt;fantasai> ntim: leaving that open.<br>
&lt;astearns> ack emilio<br>
&lt;fantasai> emilio: I think I lean towards not including this in MVP of form controls<br>
&lt;fantasai> emilio: Feels very niche and also hard to define<br>
&lt;fantasai> emilio: Seems you need something to reflect the datalist into the DOM some other way<br>
&lt;fantasai> emilio: then you need to position them<br>
&lt;fantasai> emilio: If author is using range ... not clear what the best way is to have base styles<br>
&lt;fantasai> emilio: It seems pretty high effort for low value to me<br>
&lt;ntim> q+<br>
&lt;fantasai> emilio: Would rather get the other range pseudo-elements standardized and getting it to work cross-browser<br>
&lt;fantasai> emilio: if we figure out tick marks we can add an opt in<br>
&lt;fantasai> astearns: I suggested appearance:base iteration in the past, but told we need to have a single set of styles andnever change them once shipped<br>
&lt;fantasai> emilio: Single styles is good, but extending is ok<br>
&lt;fantasai> emilio: Main benefit of this would be proper cross-browser styling of track and inputs<br>
&lt;astearns> ack ntim<br>
&lt;fantasai> ntim: Emilio brought up HTML extensions<br>
&lt;fantasai> ntim: I wonder if the right way forward is to purse this in HTML with potentially some CSS extensions<br>
&lt;fantasai> ntim: but use new HTML elements to achieve the tick marks<br>
&lt;fantasai> ntim: And potentially those elements can cover more than just tick marks<br>
&lt;fantasai> ntim: like maybe they can reflect datalist options in different ways<br>
&lt;fantasai> ntim: and CSS can [missed]<br>
&lt;fantasai> emilio: I don't have a concrete idea of how to expose base styles in a way that doesn't require HTML magic<br>
&lt;fantasai> emilio: to reflect the datalist options into the range input's shadow tree<br>
&lt;fantasai> fantasai: Association of datalist and input?<br>
&lt;fantasai> emilio: yes<br>
&lt;emilio> (list attribute)<br>
&lt;fantasai> fantasai: can multiple inputs reference the same datalist?<br>
&lt;fantasai> fantasai: yes<br>
&lt;fantasai> s/fantasai/emilio<br>
&lt;fantasai> emilio: so need to create representation of the elements in the input tree<br>
&lt;fantasai> ntim: ...<br>
&lt;fantasai> emilio: Feels weird to require a wrapper element<br>
&lt;fantasai> emilio: but I think we shouldn't have it on appearance:base for now<br>
&lt;fantasai> emilio: This requires somewhat significant HTML magic, some of which has precedent<br>
&lt;fantasai> emilio: like the &lt;selectedcontent> stuff<br>
&lt;fantasai> emilio: but the effort required to get this to work seems significantly higher<br>
&lt;ntim> s/.../appearance: base should maybe not have tickmarks by default, and authors should maybe use new HTML features/<br>
&lt;fantasai> emilio: main benefits of standardized range inputs don't include datalist<br>
&lt;fantasai> emilio: this is something we could extend later<br>
&lt;fantasai> emilio: tried to brainstorm the right way to expose these<br>
&lt;fantasai> emilio: but if you expose N tickmark elements, that seems potentially useful<br>
&lt;fantasai> emilio: but also pretty wasteful<br>
&lt;fantasai> emilio: right now they're just a paint-time effect<br>
&lt;fantasai> emilio: so a lot more lightweight han an element<br>
&lt;fantasai> ntim: I don't think we should have pseudo-elements<br>
&lt;fantasai> ntim: having a wrapper doesn't seem unreasonable<br>
&lt;fantasai> ntim: Discussing extensions to range<br>
&lt;fantasai> ntim: could think of a future where people start to have HTML elements and want to have tick marks<br>
&lt;fantasai> ntim: and have fancy range features<br>
&lt;astearns> ack fantasai<br>
&lt;emilio> fantasai: The fact that you need to duplicate it means you need some HTML support to create these<br>
&lt;emilio> ... you need one per option<br>
&lt;emilio> ... and you also want labels on them<br>
&lt;emilio> ... so it's going to have to be pseudo-elements so that they can style the labels<br>
&lt;emilio> ... I'm not really sure how this would be styled, maybe with an anchor() function<br>
&lt;emilio> ... need the various start / end attributes and such to get the right position<br>
&lt;emilio> ... so definitely needs some work, but let's assume that we had the elements<br>
&lt;emilio> ... there's the option of how we generate the elements<br>
&lt;emilio> ... assuming we had them how would we style them?<br>
&lt;ntim> &lt;range>&lt;input type=range>&lt;indicators>&lt;/indicators>&lt;/range><br>
&lt;emilio> astearns: so punt for now?<br>
&lt;ntim> I had something like this in mind<br>
&lt;emilio> fantasai: the thing we need the most is taking a set of markup that represent a datalist input with html<br>
&lt;emilio> ... and determine how do you style it?<br>
&lt;emilio> ... what's missing that we need to add to CSS<br>
&lt;emilio> ... and what structure does the HTML need to have<br>
&lt;emilio> astearns: ntim just posted a markup mockup<br>
&lt;emilio> fantasai: with shadow dom it could be a children of the input<br>
&lt;ntim> with CSS extensions or inserted elements to support the &lt;indicators> element potentially<br>
&lt;fantasai> emilio: question is if we magically clone the datalist content<br>
&lt;fantasai> emilio: still need some sort of magic to communicate the datalist option value<br>
&lt;fantasai> emilio: maybe something like inset-start: control-value()/input-max()-input-min() ... that gets you your position, don't need anchoring<br>
&lt;fantasai> emilio: if you want labels, need some extra stuff<br>
&lt;fantasai> emilio: if you want only some labels<br>
&lt;ntim> indicators::label(...) {....}<br>
&lt;emilio> fantasai: if you duplicate the datalist content and can select based on that then the author can choose<br>
&lt;fantasai> emilio: But for me, I'd punt on this for the initial version, and explore wit HTMl bikeshedding how to make this work<br>
&lt;fantasai> emilio: And seeing if it would be really useful<br>
&lt;fantasai> emilio: And figure out cloning. The strings and tick marks etc.<br>
&lt;fantasai> astearns: Perhaps we should not include it for now<br>
&lt;fantasai> SUMMARY: This needs more work in HTML (to clone options) and CSS (to be able to style it), not part of appearance: base for now.<br>
&lt;ntim> Proposed SUMMARY: Let's not include tickmarks for appearance: base at the moment. Work with HTML to see if we can come up with markup that can address more use cases than tickmarks.<br>
&lt;fantasai> ntim: Other reason to work with HTML, last time we didn't hear that authors particularly needed it<br>
&lt;fantasai> ... so need to address more than just tickmarks<br>
</details>


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


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

Received on Wednesday, 1 April 2026 23:36:20 UTC