Skip to content

Commit 2f08a43

Browse files
committed
[css-forms-1] Explicitly restrict new pseudo-elements to basic appearance
Except for `::placeholder` and `::file-selector-button` which are allowed in other appearance modes for compatability.
1 parent c6df6e8 commit 2f08a43

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

css-forms-1/Overview.bs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,11 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
313313

314314
It typically targets the <{button}> inside an <{input}> element with `type=file`.
315315

316+
It is generated when the [=originating element=] has [=basic appearance=]. It
317+
can also be generated for other ''appearance'' values.
318+
319+
NOTE: This is allowed in non [=basic appearance=] modes for compatability purposes.
320+
316321
<div class="example" id="file-selector-button-example">
317322
For example, the following example should show a green border around the
318323
file selector button:
@@ -358,18 +363,24 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
358363
The ''::slider-thumb'' pseudo-element represents
359364
the portion that allows the user to adjust the progress of the control.
360365

366+
It is only generated when the [=originating element=] has [=basic appearance=].
367+
361368
NOTE: It is typically natively rendered as a circle in most user agents.
362369

363370
<dt><dfn>::slider-track</dfn>
364371
<dd>
365372
The ''::slider-track'' pseudo-element represents the portion containing
366373
both the progressed and unprogressed portions of the control.
367374

375+
It is only generated when the [=originating element=] has [=basic appearance=].
376+
368377
<dt><dfn>::slider-fill</dfn>
369378
<dd>
370379
The ''::slider-fill'' pseudo-element represents
371380
the portion containing the progressed portion of the control.
372381

382+
It is only generated when the [=originating element=] has [=basic appearance=].
383+
373384
When the progress of control is indeterminate (like with ''&lt;progress>''),
374385
the user agent must give this portion an inline-size of zero.
375386
</dl>
@@ -398,11 +409,18 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
398409
The ''::placeholder'' pseudo-element represents
399410
the portion of the <{input}> that contains the placeholder text.
400411

412+
It is generated when the [=originating element=] has [=basic appearance=]. It
413+
can also be generated for other ''appearance'' values.
414+
415+
NOTE: This is allowed in non [=basic appearance=] modes for compatability purposes.
416+
401417
<dt><dfn>::field-text</dfn>
402418
<dd>
403419
The ''::field-text'' pseudo-element represents
404420
the portion of the <{input}> that contains the editable text.
405421

422+
It is only generated when the [=originating element=] has [=basic appearance=].
423+
406424
<dt><dfn>::clear-icon</dfn>
407425
<dd>
408426
The ''::clear-icon'' pseudo-element represents
@@ -429,10 +447,17 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
429447
The ''::placeholder'' pseudo-element represents
430448
the portion of the <{textarea}> that contains the placeholder text.
431449

450+
It is generated when the [=originating element=] has [=basic appearance=]. It
451+
can also be generated for other ''appearance'' values.
452+
453+
NOTE: This is allowed in non [=basic appearance=] modes for compatability purposes.
454+
432455
<dt><span>''::field-text''</span>
433456
<dd>
434457
The ''::field-text'' pseudo-element represents
435458
the portion of the <{textarea}> that contains the editable text.
459+
460+
It is only generated when the [=originating element=] has [=basic appearance=].
436461
</dl>
437462

438463
ISSUE(11850): Define something for the resizer.
@@ -448,16 +473,22 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
448473
<dd>
449474
The ''::step-control'' pseudo-element represents
450475
the portion of a number input that contains the up and down buttons.
476+
477+
It is only generated when the [=originating element=] has [=basic appearance=].
451478

452479
<dt><dfn>::step-up</dfn>
453480
<dd>
454481
The ''::step-up'' pseudo-element represents
455482
the button that increments the value inside a number input when activated.
456483

484+
It is only generated when the [=originating element=] has [=basic appearance=].
485+
457486
<dt><dfn>::step-down</dfn>
458487
<dd>
459488
The ''::step-down'' pseudo-element represents
460489
the button that decrements the value inside a number input when activated.
490+
491+
It is only generated when the [=originating element=] has [=basic appearance=].
461492
</dl>
462493

463494
Their structure is defined as follows:
@@ -512,11 +543,15 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
512543
<dd>
513544
The ''::field-component'' pseudo-element represents
514545
the portions of the control that contain the date/time component values.
546+
547+
It is only generated when the [=originating element=] has [=basic appearance=].
515548

516549
<dt><dfn>::field-separator</dfn>
517550
<dd>
518551
The ''::field-separator'' pseudo-element represents
519552
the portions of the control that separate the date/time component values if the user agent provides those portions.
553+
554+
It is only generated when the [=originating element=] has [=basic appearance=].
520555
</dl>
521556

522557
Those pseudo-elements are siblings. The exact structure of the control is determined by internationalization and by the host language,
@@ -549,6 +584,8 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
549584

550585
The <dfn>::color-swatch</dfn> pseudo-element represents the portion of the control that displays the chosen color value.
551586

587+
It is only generated when the [=originating element=] has [=basic appearance=].
588+
552589
<div class="example" id="color-swatch-example">
553590
For example, the following example should make the input and its color swatch rounded:
554591

0 commit comments

Comments
 (0)