CSS appearance
Property
The appearance
property in CSS is used to control the native styling of form elements, such as buttons, checkboxes, and input fields. It allows you to either keep or remove the default browser styles.
1. Syntax
2. Accepted Values
Value | Description |
---|---|
auto (default) | Uses the browser’s default styling for the element. |
none | Removes all default browser styles, allowing full customization. |
textfield , button , etc. | Forces an element to look like a specific form control. (Browser support is limited.) |
3. Example – Removing Default Browser Styles (appearance: none
)
✅ The button loses its default style and can be fully customized.
4. Example – Customizing a Select Dropdown
✅ The dropdown loses its default styling, allowing for a custom design.
5. Best Practices
✔ Use appearance: none
when designing custom buttons or form controls.
✔ Combine with border
, background
, and padding
for a full custom look.
✔ Test across browsers, as some do not fully support appearance
.