Property appearance
The appearance
CSS property is used to display UI
elements with platform-specific styling, based on
the operating system’s theme.
Syntax
/* CSS Basic User Interface Module Level 4 values */
appearance: none;
appearance: auto;
appearance: menulist-button;
appearance: textfield;
/* Global values */
appearance: inherit;
appearance: initial;
appearance: revert;
appearance: revert-layer;
appearance: unset;
/* <compat-auto> values have the same effect as 'auto' */
appearance: button;
appearance: checkbox;
Values
none
Hides certain features of widgets, such as arrow
displayed in select element, indicating that list
can be expanded.
auto
Acts as none on elements with no special styling.
<compat-special>
One of menulist-button or textfield. Both of these
values are equivalent to auto on elements with no
special styling.
<compat-auto>
Possible values are button, checkbox, listbox,
menulist, meter, progress-bar, push-button, radio,
searchfield, slider-horizontal, square-button, and
textarea. Keywords which are the equivalent of
auto for maintaining compatibility with older
browsers.
Examples
<input type="checkbox" />
<input type="checkbox" checked />
<select>
<option>default</option>
<option>option 2</option>
</select>
<select class="none">
<option>appearance: none</option>
<option>option 2</option>
</select>
input {
appearance: none;
width: 1em;
height: 1em;
display: inline-block;
background: red;
}
input:checked {
border-radius: 50%;
background: green;
}
select {
border: 1px solid black;
font-size: 1em;
}
select.none {
appearance: none;
}