Skip to content

Commit 9549bb8

Browse files
lukewarlownt1m
authored andcommitted
[css-forms-1] Add slider- prefix to slider pseudo-element names
Also correct markup for indeterminate progress element.
1 parent e098776 commit 9549bb8

File tree

1 file changed

+22
-24
lines changed

1 file changed

+22
-24
lines changed

css-forms-1/Overview.bs

+22-24
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
196196
<td>`<progress>`</td>
197197
<td rowspan=4>
198198
<pre>
199-
├─ ''::track''
200-
│ └─ ''::fill''
201-
└─ ''::thumb''
199+
├─ ''::slider-track''
200+
│ └─ ''::slider-fill''
201+
└─ ''::slider-thumb''
202202
</pre>
203203
</td>
204204
</tr>
@@ -345,44 +345,42 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
345345
<pre class="lang-css">:indeterminate::checkmark { background-image: url(...) }</pre>
346346
</div>
347347

348-
## Styling Parts of [=Slider-Like Controls=]: the ''::thumb'', ''::track'' and ''::fill'' pseudo-elements ## {#slider-pseudos}
349-
350-
ISSUE(9830): Naming is still under discussion.
348+
## Styling Parts of [=Slider-Like Controls=]: the ''::slider-thumb'', ''::slider-track'' and ''::slider-fill'' pseudo-elements ## {#slider-pseudos}
351349

352350
<dfn>Slider-like controls</dfn> are form controls that represent progress.
353351
That progress may be adjustable by the user.
354352

355353
The following pseudo-elements are provided to style their different parts:
356354

357355
<dl export>
358-
<dt><dfn>::thumb</dfn>
356+
<dt><dfn>::slider-thumb</dfn>
359357
<dd>
360-
The ''::thumb'' pseudo-element represents
358+
The ''::slider-thumb'' pseudo-element represents
361359
the portion that allows the user to adjust the progress of the control.
362360

363361
NOTE: It is typically natively rendered as a circle in most user agents.
364362

365-
<dt><dfn>::track</dfn>
363+
<dt><dfn>::slider-track</dfn>
366364
<dd>
367-
The ''::track'' pseudo-element represents the portion containing
365+
The ''::slider-track'' pseudo-element represents the portion containing
368366
both the progressed and unprogressed portions of the control.
369367

370-
<dt><dfn>::fill</dfn>
368+
<dt><dfn>::slider-fill</dfn>
371369
<dd>
372-
The ''::fill'' pseudo-element represents
370+
The ''::slider-fill'' pseudo-element represents
373371
the portion containing the progressed portion of the control.
374372

375-
When the progress of control is undetermined (like with ''&lt;progress indeterminate>''),
373+
When the progress of control is indeterminate (like with ''&lt;progress>''),
376374
the user agent must give this portion an inline-size of zero.
377375
</dl>
378376

379377
These pseudo-elements are [=fully styleable pseudo-elements=] and their structure is the following:
380378

381379
```
382380
<input type="range">
383-
├─ ::track
384-
│ └─ ::fill
385-
└─ ::thumb
381+
├─ ::slider-track
382+
│ └─ ::slider-fill
383+
└─ ::slider-thumb
386384
```
387385

388386
The list of [=slider-like controls=] depends on the host language. For HTML, this corresponds to:
@@ -636,19 +634,19 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
636634

637635
<dt><dfn>left-to-right</dfn></dt>
638636
<dd>
639-
The [=slider-like control=] is rendered horizontally and ''::fill'' is left-aligned within the control.
637+
The [=slider-like control=] is rendered horizontally and ''::slider-fill'' is left-aligned within the control.
640638

641639
<dt><dfn>right-to-left</dfn></dt>
642640
<dd>
643-
The [=slider-like control=] is rendered horizontally and ''::fill'' is right-aligned within the control.
641+
The [=slider-like control=] is rendered horizontally and ''::slider-fill'' is right-aligned within the control.
644642

645643
<dt><dfn>top-to-bottom</dfn></dt>
646644
<dd>
647-
The [=slider-like control=] is rendered vertically and ''::fill'' is top-aligned within the control.
645+
The [=slider-like control=] is rendered vertically and ''::slider-fill'' is top-aligned within the control.
648646

649647
<dt><dfn>bottom-to-top</dfn></dt>
650648
<dd>
651-
The [=slider-like control=] is rendered vertically and ''::fill'' is bottom-aligned within the control.
649+
The [=slider-like control=] is rendered vertically and ''::slider-fill'' is bottom-aligned within the control.
652650

653651
</dl>
654652

@@ -683,7 +681,7 @@ input:not([type=file], [type=range]),
683681
textarea,
684682
button,
685683
::file-selector-button,
686-
::track,
684+
::slider-track,
687685
select,
688686
meter,
689687
progress {
@@ -697,16 +695,16 @@ progress {
697695
ISSUE: Refine meter, progress, switch and range input styling.
698696

699697
```css
700-
::track {
698+
::slider-track {
701699
height: 1em;
702700
}
703701

704-
::fill {
702+
::slider-fill {
705703
height: 100%;
706704
background-color: currentColor;
707705
}
708706

709-
::thumb {
707+
::slider-thumb {
710708
border-radius: 0;
711709
border: none;
712710
background-color: currentColor;

0 commit comments

Comments
 (0)