From 2411e2ed18fd0b1b847dbb501ba182201b7fcb33 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Wed, 18 Jun 2025 20:16:30 +0100 Subject: [PATCH] [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. --- css-forms-1/Overview.bs | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/css-forms-1/Overview.bs b/css-forms-1/Overview.bs index 3cfd5c67a49..bccdb4e456a 100644 --- a/css-forms-1/Overview.bs +++ b/css-forms-1/Overview.bs @@ -313,6 +313,11 @@ spec:css-forms-1; type:value; for:/; text:::placeholder It typically targets the <{button}> inside an <{input}> element with `type=file`. + It is generated when the [=originating element=] has [=basic appearance=]. It + can also be generated for other ''appearance'' values. + + NOTE: This is allowed in non [=basic appearance=] modes for compatability purposes. +
For example, the following example should show a green border around the file selector button: @@ -358,6 +363,8 @@ spec:css-forms-1; type:value; for:/; text:::placeholder The ''::slider-thumb'' pseudo-element represents the portion that allows the user to adjust the progress of the control. + It is only generated when the [=originating element=] has [=basic appearance=]. + NOTE: It is typically natively rendered as a circle in most user agents.
::slider-track @@ -365,11 +372,15 @@ spec:css-forms-1; type:value; for:/; text:::placeholder The ''::slider-track'' pseudo-element represents the portion containing both the progressed and unprogressed portions of the control. + It is only generated when the [=originating element=] has [=basic appearance=]. +
::slider-fill
The ''::slider-fill'' pseudo-element represents the portion containing the progressed portion of the control. + It is only generated when the [=originating element=] has [=basic appearance=]. + When the progress of control is indeterminate (like with ''<progress>''), the user agent must give this portion an inline-size of zero. @@ -398,11 +409,18 @@ spec:css-forms-1; type:value; for:/; text:::placeholder The ''::placeholder'' pseudo-element represents the portion of the <{input}> that contains the placeholder text. + It is generated when the [=originating element=] has [=basic appearance=]. It + can also be generated for other ''appearance'' values. + + NOTE: This is allowed in non [=basic appearance=] modes for compatability purposes. +
::field-text
The ''::field-text'' pseudo-element represents the portion of the <{input}> that contains the editable text. + It is only generated when the [=originating element=] has [=basic appearance=]. +
::clear-icon
The ''::clear-icon'' pseudo-element represents @@ -429,10 +447,17 @@ spec:css-forms-1; type:value; for:/; text:::placeholder The ''::placeholder'' pseudo-element represents the portion of the <{textarea}> that contains the placeholder text. + It is generated when the [=originating element=] has [=basic appearance=]. It + can also be generated for other ''appearance'' values. + + NOTE: This is allowed in non [=basic appearance=] modes for compatability purposes. +
''::field-text''
The ''::field-text'' pseudo-element represents the portion of the <{textarea}> that contains the editable text. + + It is only generated when the [=originating element=] has [=basic appearance=]. ISSUE(11850): Define something for the resizer. @@ -448,16 +473,22 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
The ''::step-control'' pseudo-element represents the portion of a number input that contains the up and down buttons. + + It is only generated when the [=originating element=] has [=basic appearance=].
::step-up
The ''::step-up'' pseudo-element represents the button that increments the value inside a number input when activated. + It is only generated when the [=originating element=] has [=basic appearance=]. +
::step-down
The ''::step-down'' pseudo-element represents the button that decrements the value inside a number input when activated. + + It is only generated when the [=originating element=] has [=basic appearance=]. Their structure is defined as follows: @@ -512,11 +543,15 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
The ''::field-component'' pseudo-element represents the portions of the control that contain the date/time component values. + + It is only generated when the [=originating element=] has [=basic appearance=].
::field-separator
The ''::field-separator'' pseudo-element represents the portions of the control that separate the date/time component values if the user agent provides those portions. + + It is only generated when the [=originating element=] has [=basic appearance=]. 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 The ::color-swatch pseudo-element represents the portion of the control that displays the chosen color value. + It is only generated when the [=originating element=] has [=basic appearance=]. +
For example, the following example should make the input and its color swatch rounded: