appearance
Turns off the system appearance of form controls so they can be styled from scratch.
- Initial value
none (form controls have auto from the browser stylesheet)- Inherited
- No
- Animatable
- no
- Applies to
- all elements, the effect is visible in form controls
- JavaScript
element.style.appearance = "none"
Example
#.select {
appearance: none;
padding: 8px 32px 8px 12px;
border: 1px solid #444;
border-radius: 8px;
background: #111 url("chevron.svg") no-repeat right 10px center / 12px;
}<select style="appearance: none; padding: 8px 32px 8px 12px; border: 1px solid #444; border-radius: 8px; color: #fff; background: #111 linear-gradient(45deg, transparent 50%, #a78bfa 50%) no-repeat right 14px center / 8px 8px;">
<option>Choose a course</option><option>HTML and CSS</option><option>Python</option>
</select>Definition and usage
#Form fields, buttons, and dropdowns by default have an appearance that depends on the operating system. The appearance: none property removes that appearance, leaving a plain element you can style your own way.
After turning off the system appearance, you have to take care of everything yourself: the border, background, the dropdown arrow, the checked state of a checkbox, and focus. The control’s functionality remains unchanged.
Before reaching for appearance: none, check whether accent-color is enough. Native controls are accessible and familiar to users.
Syntax
#appearance: none | auto;Values
#Values in practice
#auto
.demo { appearance: auto; }none
.demo { appearance: none; border: 1px solid #a78bfa; border-radius: 6px; background: #1f1f23; color: #fff; }Browser support
#Widely available
Works in all modern browsers, phones included. You can use it without worry.
- Chrome
- Edge
- Firefox
- Safari
Good practices
#- After
appearance: none, always restore a clear focus style, for example with:focus-visible. - For just the colour of checkboxes and sliders,
accent-coloris enough, without rebuilding the whole control.
Related entries
#Practise it in lessons
#Spotted a mistake or missing an example? Write to us.