Re: [csswg-drafts] [css-forms-1] Names of <input type=range> / <input type=checkbox switch> pseudo-elements (#9830)

The CSS Working Group just discussed `[css-forms-1] Names of <input type=range> / <input type=checkbox switch> pseudo-elements`, and agreed to the following:

* `RESOLVED: Keep the slider-* prefixes and close the issue`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> ntim: i put the issues in order of expected speed<br>
&lt;TabAtkins> ntim: we originally resolved on the speudo-elements for range, switch, and meter/progress to have ::slider-* prefix<br>
&lt;TabAtkins> ntim: but we realized it might be better to drop the slider prefix for authoring<br>
&lt;TabAtkins> ntim: since writing "slider-" might not be convenient<br>
&lt;TabAtkins> ntim: so wanted to see people's thoughts<br>
&lt;TabAtkins> q+<br>
&lt;astearns> ack TabAtkins<br>
&lt;fantasai> TabAtkins: I would prefer to keep the "slide-" prefix. I don't think it's very long. But it groups these clearly related pseudos together semantically -- and also in alphabetically ordered lists.<br>
&lt;lea> q?<br>
&lt;lea> q+<br>
&lt;fantasai> astearns: Would you keep that for &lt;meter> and &lt;progress> also?<br>
&lt;fantasai> TabAtkins: Fine with that. It's sliding.<br>
&lt;fantasai> TabAtkins: To the extent that &lt;meter>/&lt;progress> have a thumb.<br>
&lt;TabAtkins> fantasai: it might not be something you can grip, but it might be something styleable<br>
&lt;astearns> ack lea<br>
&lt;TabAtkins> lea: i have a weak preference towards not prefixing<br>
&lt;TabAtkins> lea: not just for verbosity, but just when do you group related pseudos together<br>
&lt;TabAtkins> lea: we're already talking about meter/progress, but what about switch?<br>
&lt;TabAtkins> lea: if you don't prefix, it's up to the author to group or separate them<br>
&lt;ntim> q+<br>
&lt;TabAtkins> lea: while if we decide how to prefix them, doing the oppsoite requires more complexity. locks us in as we have more elements with a shared structure<br>
&lt;astearns> ack ntim<br>
&lt;TabAtkins> ntim: more context, webkit implemented switch control. it always felt odd to write `switch::slider-thumb`/etc<br>
&lt;TabAtkins> ntim: they're a slider to some extent, but it felt weird<br>
&lt;TabAtkins> lea: so case in point, it's not the future we'll reach it, we're already there<br>
&lt;emilio> Slight preference for keeping `::slider-` fwiw, but...<br>
&lt;fantasai> TabAtkins: Switch looks like a slider. You're sliding it back and forth.<br>
&lt;astearns> q+<br>
&lt;bkardell> q+<br>
&lt;fantasai> TabAtkins: If you have a thumb and track etc. then you're describing a slider.<br>
&lt;fantasai> TabAtkins: these concepts are taken from the slider hierarchy of controls<br>
&lt;fantasai> lea: Meter and progress?<br>
&lt;fantasai> TabAtkins: yes. The value slides.<br>
&lt;bkardell> q-<br>
&lt;TabAtkins> astearns: the argument against taking the slider prefix off is that thumbs and tracks could possiblly be other things<br>
&lt;TabAtkins> astearns: would it make sense to use another prefix, like ::ui-track?<br>
&lt;astearns> ack astearns<br>
&lt;TabAtkins> fantasai: scrollbars are also UI and they have thumbs and tracks too<br>
&lt;bkardell> q+<br>
&lt;astearns> ack bkardell<br>
&lt;fantasai> bkardell: This doens't apply to the scrollbar thumb<br>
&lt;fantasai> TabAtkins: e.g. prefixed ::scrollbar-thumb and ::scrollbar-track<br>
&lt;fantasai> TabAtkins: a ::ui- prefix would be confusing, thos eare also ui<br>
&lt;fantasai> bkardell: If we name them generically, would they apply to those thumbs and tracks, too?<br>
&lt;astearns> ::form-thumb?<br>
&lt;fantasai> meter and progress aren't form inputs...<br>
&lt;TabAtkins> bkardell: [directing question to Lea]<br>
&lt;TabAtkins> lea: my argument depended on the idea that you coudl speialize them with the rest of the selector<br>
&lt;TabAtkins> lea: if there's a way to do that for a scrollbar, then sure, but if there isn't we definitely need a prefix then<br>
&lt;TabAtkins> lea: you need the ability to target both - generic and specific<br>
&lt;ntim> q+<br>
&lt;astearns> ack ntim<br>
&lt;TabAtkins> ntim: clarifying - right now there's no specified ::scrollbar-thumb or track, and that's intentional.<br>
&lt;TabAtkins> bkardell: the reason i asked is sometimes these also change over time what our mental model is<br>
&lt;TabAtkins> bkardell: some video players have thumbs and tracks<br>
&lt;emilio> Wouldn't that be a `&lt;progress>`?<br>
&lt;TabAtkins> bkardell: you were saying if you squint at this control it looks like a track, but i think if you look at it another way it might not be...<br>
&lt;lea> I think a core eigenquestion is: could the same element have two types of tracks/thumbs?<br>
&lt;TabAtkins> ntim: i think this is where Lea's argument applies, the author can always specify the selector before the pseudo-eleemtn to be specific<br>
&lt;TabAtkins> ntim: if the author puts `input::thumb` you know it's not for a video<br>
&lt;TabAtkins> lea: a core question we could ask is if we think the same element could have two types of thumbs/tracks?<br>
&lt;TabAtkins> lea: a slider with two thumbs, certainly, but those are of the same type of thing<br>
&lt;TabAtkins> ntim: we can add a functional version of the pseudo at that point to target idnviidual ones<br>
&lt;TabAtkins> ntim: straw poll?<br>
&lt;astearns> ack fantasai<br>
&lt;TabAtkins> fantasai: i think we should think aobut this - it's not just thumb/track, we also have fill, and possibly other things<br>
&lt;TabAtkins> fantasai: if these are pseudos we are dedicating to this purpose, that takes those names away from anything else<br>
&lt;TabAtkins> lea: do we have a list of the names?<br>
&lt;TabAtkins> fantasai: so far "thumb", "track", "fill"<br>
&lt;emilio> There's also the benefit of typing `::slider-` and seeing all of them together in your editor :-)<br>
&lt;TabAtkins> ntim: there's another issue to add something for color-swatch<br>
&lt;TabAtkins> bkardell: "ruler" or "meter", the tick marks<br>
&lt;astearns> 1: keeping the slider- prefixes for thumb and track<br>
&lt;astearns> 2: just use thumb and track<br>
&lt;TabAtkins> fantasai: i think we need to amke sure the prefix is consistent for all the parts, eithe rprefix all or none<br>
&lt;TabAtkins> fantasai: if we think prefixing some is okay and others aren't we ahve a problem<br>
&lt;TabAtkins> astearns: yes we need to think as a whole, but don't know that it's a bad result to have some as a prefix and some aren't, because some might be generic enough to not need one<br>
&lt;ydaniv> +1 to lea<br>
&lt;TabAtkins> lea: if we don't prefix these we can still name individual ones better<br>
&lt;TabAtkins> STRAW POLL TIME<br>
&lt;ntim> 2<br>
&lt;TabAtkins> 1<br>
&lt;ydaniv> 2<br>
&lt;lea> 2<br>
&lt;smfr> 1<br>
&lt;astearns> 1<br>
&lt;noamr> 1<br>
&lt;kurt> 1<br>
&lt;emilio> 1<br>
&lt;ChrisL> 2<br>
&lt;bkardell> 1.5<br>
&lt;oriol> 1<br>
&lt;alisonmaher> 1<br>
&lt;rachelandrew> 1<br>
&lt;kbabbitt> 1<br>
&lt;schenney> 1<br>
&lt;kizu> 1<br>
&lt;lea> s/we can still name individual ones better/we can still name individual ones better, e.g. we may decide `::track-fill` is a better name than `::fill`. That's not prefixing, just good naming./<br>
&lt;bkardell> q+<br>
&lt;bkardell> q-<br>
&lt;noamr> We have `:active-view-transition-type`, I think `:slider-fill` is short<br>
&lt;dbaron> emilio: I like the autocomplete aspects of the ::slider prefix.<br>
&lt;TabAtkins> I think slider-fill is *too* short, based on precedent. we need longer words<br>
&lt;bkardell> q+<br>
&lt;TabAtkins> astearns: looks like prefixes are winning<br>
&lt;TabAtkins> ntim: okay, prefixes are in the previous resolution<br>
&lt;TabAtkins> bkardell: each of those controls are sliders currently<br>
&lt;TabAtkins> bkardell: so nothing changes in terms of what the pseudo-element applies to<br>
&lt;lea> q+<br>
&lt;astearns> ack bkardell<br>
&lt;TabAtkins> ntim: it would apply to switch, range, meter, and progress<br>
&lt;bkardell> 2<br>
&lt;bkardell> since that is generic behavior, I think 2<br>
&lt;TabAtkins> lea: if we keep these prefixes it makes it harder to use descreptive names, becuase it's already long<br>
&lt;TabAtkins> lea: i think "fill" is confusing, "slider-fill" is still confusing, but "slider-track-fill" would be too long<br>
&lt;TabAtkins> astearns: so we'll take a resolution to keep the prefixes, based on straw poll<br>
&lt;TabAtkins> astearns: if we have better argumetns in the future we can revisit<br>
&lt;TabAtkins> astearns: proposed reoslution is keep slider prefixes and close the issue<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;TabAtkins> RESOLVED: Keep the slider-* prefixes and close the issue<br>
</details>


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


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

Received on Tuesday, 1 April 2025 17:53:22 UTC