First Public Working Draft · css-forms

CSS Form Control Styling

3 properties, 20 selectors, 1 function, 1 type defined by this specification, 8 of them known to at least one browser (the others are badged Not in any browser yet).

Each feature in detail

field-sizing

Property Baseline: newly availablesince June 2026 Modern CSS: field-sizing

MDN The field-sizing CSS property enables you to control the sizing behavior of elements that are given a default preferred size, such as form control elements. This property enables you to override the default sizing behavior, allowing form controls to adjust in size to fit their contents.

Live preview Example from MDN
body {
  box-sizing: border-box;
  padding: 20px;
}

div {
  margin-bottom: 20px;
  display: flex;
}

input,
textarea {
  field-sizing: content;
  min-width: 50px;
  max-width: 350px;
}

label {
  width: 150px;
  margin-right: 20px;
  text-align: right;
}

Syntax

fixed | content

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
fixed
Applies to
elements with default preferred size
Inherited
no
Percentages
N/A
Computed value
as specified
Canonical order
per grammar
Animation type
discrete

Browser support

First browser version supporting field-sizing
Chrome 123
Edge 123
Firefox 152
Safari 26.2
Chrome Android 123
Safari iOS 26.2

First version with support, from MDN browser-compat-data.

input-security

Property Not in any browser yet

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

auto | none

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
auto
Applies to
sensitive text inputs
Inherited
no
Percentages
N/A
Computed value
as specified
Canonical order
per grammar
Animation type
by computed value type

slider-orientation

Property Not in any browser yet

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

auto | left-to-right | right-to-left | top-to-bottom | bottom-to-top

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
auto
Applies to
all elements
Inherited
no
Percentages
n/a
Computed value
as specified
Canonical order
per grammar
Animation type
discrete

::checkmark

Selector Limited availability Modern CSS: Customizable <select>

Spec The ::checkmark pseudo-element represents an indicator of whether the item is checked, and is present on checkboxes, radios, and option elements.

MDN The ::checkmark CSS pseudo-element targets the checkmark placed inside the currently-selected <option> element of a customizable select element. It can be used to provide a visual indication of which option is selected.

Live preview Example from MDN
option::checkmark {
  color: orange;
  font-size: 1.5rem;
}

select,
::picker(select) {
  appearance: base-select;
  width: 200px;
}

select {
  border: 2px solid #dddddd;
  background: #eeeeee;
  padding: 10px;
}

::picker(select) {
  border: none;
}

option {
  border: 2px solid #dddddd;
  background: #eeeeee;
  padding: 10px;
}

option:first-of-type {
  border-radius: 8px 8px 0 0;
}

option:last-of-type {
  border-radius: 0 0 8px 8px;
}

option:nth-of-type(odd) {
  background: white;
}

option:not(option:last-of-type) {
  border-bottom: none;
}

Syntax

::checkmark

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Browser support

First browser version supporting ::checkmark
Chrome 133
Edge 133
Firefox No
Safari 27
Chrome Android 133
Safari iOS 27

First version with support, from MDN browser-compat-data.

::clear-icon

Selector Not in any browser yet

Spec The ::clear-icon pseudo-element represents the portion of the input that allows the user to clear the input when clicked if provided by the user agent. With appearance: textfield, the user agent must not generate this part.

Syntax

::clear-icon

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

::color-swatch

Selector Not in any browser yet

Spec The ::color-swatch pseudo-element represents the portion of the control that displays the chosen color value.

Syntax

::color-swatch

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

::field-component

Selector Not in any browser yet

Spec The ::field-component pseudo-element represents the portions of the control that contain the date/time component values.

Syntax

::field-component

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

::field-content

Selector Experimental

Spec The ::field-content pseudo-element represents the portion of the input that contains the editable text.

Syntax

::field-content

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Browser support

First browser version supporting ::field-content
Chrome No
Edge No
Firefox No
Safari 27.2
Chrome Android No
Safari iOS No

First version with support, from MDN browser-compat-data.

::field-separator

Selector Not in any browser yet

Spec 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.

Syntax

::field-separator

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

::file-selector-button

Selector Baseline: widely availablesince October 2023

Spec The ::file-selector-button pseudo-element represents the button used to open a file picker, if the UA renders such a button.

MDN The ::file-selector-button CSS pseudo-element represents the button of an <input> of type="file".

Live preview Example from MDN
input {
  margin-top: 1rem;
}

input::file-selector-button {
  font-weight: bold;
  color: dodgerblue;
  padding: 0.5em;
  border: thin solid grey;
  border-radius: 3px;
}

Syntax

::file-selector-button

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Browser support

First browser version supporting ::file-selector-button
Chrome 89
Edge 89
Firefox 82
Safari 14.1
Chrome Android 89
Safari iOS 14.5

First version with support, from MDN browser-compat-data.

::picker-icon

Selector Limited availability Modern CSS: Customizable <select>

Spec The ::picker-icon pseudo-element represents the part of the control that represents the icon denoting the presence of the picker. It is only generated when the originating element has basic appearance and if it opens a picker. It is a fully styleable pseudo-element and inherits from its originating element.

MDN The ::picker-icon CSS pseudo-element targets the picker icon inside form controls that have an icon associated with them. In the case of a customizable select element, it selects the arrow icon shown on the <select> element that points down when it is closed.

Syntax

::picker-icon

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Browser support

First browser version supporting ::picker-icon
Chrome 133
Edge 133
Firefox No
Safari 27
Chrome Android 133
Safari iOS 27

First version with support, from MDN browser-compat-data.

::picker()

Selector Limited availability Modern CSS: Customizable <select>

Spec The ::picker() pseudo-element represents the part of the form control that pops out of the page.

MDN The ::picker() CSS pseudo-element targets the picker part of an element, for example the drop-down picker of a customizable select element.

Syntax

::picker( <form-control-identifier>+ )

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Browser support

First browser version supporting ::picker()
Chrome 135
Edge 135
Firefox No
Safari 27
Chrome Android 135
Safari iOS 27

First version with support, from MDN browser-compat-data.

::placeholder

Selector Baseline: widely availablesince July 2022

Spec The ::placeholder pseudo-element represents the portion of the input that contains the placeholder text.

MDN The ::placeholder CSS pseudo-element represents the placeholder text in an <input> or <textarea> element.

Live preview Example from MDN
input {
  margin-top: 0.5rem;
}

input::placeholder {
  font-weight: bold;
  opacity: 0.5;
  color: red;
}

Syntax

::placeholder

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Browser support

First browser version supporting ::placeholder
Chrome 57
Edge 79
Firefox 51
Safari 10.1
Chrome Android 57
Safari iOS 10.3

First version with support, from MDN browser-compat-data.

::reveal-icon

Selector Not in any browser yet

Spec The ::reveal-icon pseudo-element represents the portion of the input that allows the user to temporarily disable obscuring of sensitive text input when clicked if provided by the user agent. User agents providing ::reveal-icon may choose to remove it in some circumstances to help protect sensitive text input from being revealed unintentionally.

Syntax

::reveal-icon

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

::slider-fill

Selector Not in any browser yet

Spec The ::slider-fill pseudo-element represents the portion containing the progressed portion of the control. When the progress of control is indeterminate (like with <progress>), the user agent must give this portion an inline-size of zero.

Syntax

::slider-fill

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

::slider-thumb

Selector Not in any browser yet

Spec The ::slider-thumb pseudo-element represents the portion that allows the user to adjust the progress of the control.

Syntax

::slider-thumb

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

::slider-track

Selector Not in any browser yet

Spec The ::slider-track pseudo-element represents the portion containing both the progressed and unprogressed portions of the control.

Syntax

::slider-track

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

::step-control

Selector Not in any browser yet

Spec The ::step-control pseudo-element represents the portion of a number input that contains the up and down buttons.

Syntax

::step-control

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

::step-down

Selector Not in any browser yet

Spec The ::step-down pseudo-element represents the button that decrements the value inside a number input when activated.

Syntax

::step-down

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

::step-up

Selector Not in any browser yet

Spec The ::step-up pseudo-element represents the button that increments the value inside a number input when activated.

Syntax

::step-up

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

:high-value

Selector Not in any browser yet

Spec The :high-value pseudo-class matches on a meter element when its value is over the value specified by the high HTML attribute.

Syntax

:high-value

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

:low-value

Selector Not in any browser yet

Spec The :low-value pseudo-class matches on a meter element when its value is under the value specified by the low HTML attribute.

Syntax

:low-value

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

:optimal-value

Selector Not in any browser yet

Spec The :optimal-value pseudo-class matches on a meter element when its value is in the range determined by the optimum / low / high HTML attributes.

Syntax

:optimal-value

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

control-value()

Function Not in any browser yet

Spec The control-value() function computes to the current value of the form control it is on. If it is used on an element that is not a form control, it returns an empty string.

Syntax

control-value( <type>? )

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

<type>

Type Limited availability Experimental

MDN The type() CSS function allows you to specify a particular data type, and is used by the following CSS features:

Live preview Example from MDN
@function --combine-strings(--strings type(<string>+)) {
  result: var(--strings) " ❤️";
}

section {
  font-family: system-ui;
  background-color: lime;
  padding: 20px;
}

section::after {
  content: --combine-strings("hello" "goodbye");
}

Syntax

'<' [ number | string ] '>'

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Browser support

First browser version supporting <type>
Chrome 139
Edge 139
Firefox No
Safari No
Chrome Android 139
Safari iOS No

First version with support, from MDN browser-compat-data.