CSS contain Property Demo - Online Layout & Paint Isolation
Toggle contain: strict, content, paint, layout and see how it affects rendering. Understand isolation for faster pages.
UD5 Toolkit
appearance Property Demo
Compare native browser styles with appearance: none across form elements. See exactly what gets reset and learn how to build custom styles on top.
When you remove the native dropdown arrow with appearance: none, add a custom SVG background arrow to maintain usability.
appearance: nonebackground-image: url(...)background-positionpadding-right (space for arrow)
/* Reset a single select element */
select {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
/* Add custom arrow */
background-image: url("arrow.svg");
background-repeat: no-repeat;
background-position: right 0.75rem center;
padding-right: 2.25rem;
}
/* Reset all form elements */
input, select, textarea, button,
progress, meter {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
border: 1px solid #ccc;
border-radius: 0.25rem;
padding: 0.5rem 0.75rem;
font: inherit;
}
/* Checkbox/Radio need custom indicators */
input[type="checkbox"],
input[type="radio"] {
appearance: none;
-webkit-appearance: none;
width: 18px;
height: 18px;
border: 2px solid #666;
cursor: pointer;
}
input[type="checkbox"]:checked {
background: #6c5ce7;
border-color: #6c5ce7;
}
input[type="radio"] {
border-radius: 50%;
}
appearance: none
| Browser | Standard appearance |
-webkit-appearance |
-moz-appearance |
Notes |
|---|---|---|---|---|
| Chrome 84+ | Full | Supported | N/A | Both standard and -webkit- work |
| Firefox 80+ | Full | N/A | Supported | Use -moz- for older versions |
| Safari 15.4+ | Full | Required | N/A | Always include -webkit- for Safari |
| Edge 84+ | Full | Supported | N/A | Chromium-based, same as Chrome |
| iOS Safari 15.4+ | Partial | Required | N/A | Always include -webkit- prefix |
appearance: none and -webkit-appearance: none for maximum compatibility. Add -moz-appearance: none for older Firefox versions.
appearance property controls whether an element uses platform-native styling (browser default) or can be fully customized with CSS. It was originally introduced as a way to make elements look like native UI widgets (e.g., appearance: button makes a <div> look like a button). Today, its most common use is appearance: none to strip away all native browser styling, giving developers a clean slate for custom designs.
appearance: none ensures a uniform starting point.<select>. appearance: none removes these quirks.appearance: none, the native indicator is removed, but no replacement is provided. The input still exists (it's clickable and maintains its checked state), but visually there's nothing there. You must manually style the :checked state using CSS pseudo-elements or background images to create custom indicators. See the Checkbox/Radio Fix code example above.
appearance: none, the native dropdown arrow disappears. To add a custom arrow:
background-image (data URI).background-position: right 0.75rem center.padding-right so the text doesn't overlap the arrow.background-repeat: no-repeat.See the Best Practice example above for a working demonstration with complete CSS.
appearance: none specifically targets platform-native UI styling (the operating system's rendering of form controls). all: unset is much more aggressive—it resets every CSS property (color, font, margin, padding, border, etc.) to its inherited or initial value. Use appearance: none when you want to keep your existing styles but remove browser-specific chrome. Use all: unset (rarely) when you need a complete CSS reset on a specific element.
::-webkit-slider-runnable-track and ::-webkit-slider-thumb.::-moz-range-track and ::-moz-range-thumb.Apply appearance: none to the <input type="range"> itself, then style the pseudo-elements separately. Note that you'll need vendor-prefixed pseudo-elements for each browser engine.
appearance: none, always:
:focus-visible outline or ring.The underlying HTML semantics remain intact, so screen readers still recognize checkboxes, buttons, and selects correctly—even with custom styling.
appearance property accepts values like button, textfield, menulist-button, checkbox, radio, push-button, and more. For example, applying appearance: button to a <div> makes it render with native button styling. However, this usage is less common and somewhat inconsistent across browsers. The primary practical use today is appearance: none for resetting styles. If you need a button, just use a <button> element—it's semantically correct and accessible by default.
Toggle contain: strict, content, paint, layout and see how it affects rendering. Understand isolation for faster pages.
Manipulate CSS values as typed objects using attributeStyleMap. Convert between CSSUnitValue, CSSMathSum, etc. Futuristic CSS‑in‑JS.
Implement a dark/light theme toggle that respects prefers‑color‑scheme. Copy the complete JavaScript and CSS.
Define a set of colors for light and dark themes. Get the CSS custom properties snippet. Toggle live.
Swap between physical and logical properties (margin‑inline vs margin‑left). Live preview with writing‑mode. Internationalize your CSS.
Paste your CSS and see rules sorted by specificity. Find overrides and potential collisions. Understand your cascade.
Understand @layer by visually ordering style layers and seeing which rules win. Fix specificity battles. Modern CSS architecture.
Create a frosted glass card with background blur, border glow, and shadow. Adjust intensity. Copy the CSS.
Paste your stylesheet and get a clean list of all custom properties defined under :root. Copy the whole block. Local analysis.
Write slides in Markdown and instantly preview a web‑based presentation. Export as HTML. Pure frontend.
Mix sodium hypochlorite with water to get the correct % concentration for soft washing. Safety note.
Access the Paint Timing API and display First Paint, First Contentful Paint, and Largest Contentful Paint times. Quick perf check.
Enter your must volume and current Brix, TA, and pH to calculate additions of sugar, acid blend, or tannin. Standard winemaking formulas.
List all resources loaded by the current page and their detailed timing breakdown. In‑browser waterfall.
Set an alarm relative to today's sunset (e.g., 30 minutes before). Perfect for evening routines. Uses geolocation (optional).
See the current Service Worker registration, its state, and scope. Send 'skipWaiting' and update. PWA debug.
Enter total balance and limit to see utilization percentage. See how it affects credit score bands.
See how extra monthly or lump‑sum payments reduce your mortgage term and total interest. Dynamic chart. All local calculation.
Estimate curing time for UV resin based on lamp wattage and layer thickness. Avoid sticky finishes.
Enter a date and location (or use GPS) to see exact golden hour and blue hour times for perfect natural light.
Based on home and destination time zones, suggests a light exposure/avoidance schedule to reduce jet lag. Educational tool, local only.
Click to get a random, unique superpower with a description. Perfect for character creation or daydreaming.
A festive, full‑screen countdown showing the exact days, hours, and minutes until December 25th. Snow effect.
Estimate how long a battery will last given capacity (mAh/Wh) and load current. Also computes backup time for power banks. Quick and local.
Enter network name and password to generate a stylish printable card for visitors. Local, no data leak.
Build a renovate.json file to automate dependency updates. Choose schedule, automerge, and package rules. Local.
Calculate flour, water, starter amounts to achieve a target loaf hydration. Adjusts for starter hydration. Instant local calculation.
Connect to a BLE device and read its Battery Service characteristic. See the charge level in a gauge.
Log shedding events, note duration, and track humidity to optimize next cycle. Healthy scales.
Get a random, unique superpower with a detailed description and limit. Perfect for character creation or daydreaming.