Native by design
One shared material. Your existing theme, accent and shape.
- Surface backing
- 32%
- Action backing
- 90%
- Backdrop blur
- 12px + 145% saturation
THEMES / MATERIAL
Translucent surfaces with directional highlights, soft elevation and a visible backdrop. Configure the material once on a parent, then build with native HTML and minimal component classes.
DARK GLASS / LIVE COMPONENTS
Colour and detail sit behind the frosted layer. Your content stays clear in front.
One shared material. Your existing theme, accent and shape.
Glass surfaces now use 32% tint with 12px blur and 145% saturation. Directional highlights and inset rim lighting suggest thickness without changing the HTML. Shared data-depth selects flat, subtle or pronounced elevation; data-border still controls border width and data-fill controls the decorative surface sheen. Buttons and small status surfaces retain 90% backing in this first refinement; text controls retain their existing backing.
This preview sets dark colours locally. The examples below show light, dark and solid exceptions.
Load the core first, then the optional glass stylesheet. Set material and theme on html for site-wide defaults, or on a section for a local interface.
The extension changes supported surfaces; it does not add a background image. Supply the page background in your own CSS. Glass needs colour or detail behind it to show its translucent treatment. The coloured backdrops here belong to the documentation demos.
The cards and actions inherit their parent settings. No repeated material attributes are needed on each component.
The card and its button inherit the material and accent.
Use headings, paragraphs and links for their meaning.
Read about inheritanceGlass is a material, not a separate colour mode. Use light, dark or auto with the same HTML. Explicit local themes remain independent of the documentation theme switch.
A pale surface with a dark foreground.
A deep surface with a light foreground.
Actions use stronger backing. The fieldset receives glass; text fields and switches keep their normal control backing. These example buttons do not perform application actions.
data-variant keeps its shared meaning for actions, badges and alerts. A local variant changes an exception. outline and ghost are button presentation classes; data-appearance remains specific to badges and alerts.
Existing alerts, badges and list groups follow the material scope. Use visible status text; a static message needs no automatic live-region role.
Active All services available
A nearer solid value ends glass treatment without resetting other settings. A nested glass value can restart it. Avoid stacking several blurred surfaces directly over one another.
The parent starts the material scope.
Only material changes. Theme and shape still inherit.
A nearer glass value starts a new material scope.
| Components | Material treatment |
|---|---|
| Cards, fieldsets, details, dialogs and popovers | Frosted surface backing and blur. Surface opacity defaults to 32%. |
| Top navigation, its panels and standalone dropdown panels | Frosted surfaces. Menu toggles and dropdown rows keep neutral navigation styling. |
| Buttons, .button links and native action inputs | Stronger coloured backing and blur. Action opacity defaults to 90%. |
| Badges, alerts, pagination items, list items and choice-panel labels | Stronger backing and blur, with their existing states and semantic variants. |
| Text fields, selects, textareas and switches | Keep their normal control backing and native behaviour. |
| Icons, breadcrumbs, toolbars and layout wrappers | Keep their normal foreground or layout behaviour; no extra glass surface is painted. |
Core and glass must use matching global or scoped builds. The extension alone does not supply component structure or interaction.
data-theme selects light, dark or system colours.data-material selects glass or solid surface treatment.data-shape, data-density, data-border and data-depth retain their existing meanings.data-fill="solid" removes decorative gradients; it does not remove translucency. Use data-material="solid" for that.Defaults are a starting point. This example increases surface and action backing instead of making the material more transparent.
Optional custom properties apply from the parent.
| Property | Default | Meaning |
|---|---|---|
--re-glass-opacity | 32% | Surface backing. Use a percentage, not a decimal alpha. |
--re-glass-button-opacity | 90% | Action and supporting small-surface backing. |
--re-glass-shadow | Shared subtle depth | Outer elevation and inset rim shadows. Follows data-depth; flat removes shadows. |
--re-glass-filter | blur(12px) saturate(145%) | Backdrop filter on supported glass surfaces. |
data-contrast="more" requests opaque backing. Supported reduced-transparency and increased-contrast preferences also remove translucency. Forced colours use system colours; print uses opaque component fallbacks and hides navigation popovers.
Without backdrop-filter support, surfaces retain the normal opaque core styling. Preference treatment respects local solid boundaries. Shared motion settings and reduced-motion preferences still apply to any optional decoration.
Readability depends on the actual backdrop, foreground and opacity together. Blur alone cannot guarantee contrast. Keep essential content readable, avoid unnecessary nested blur, and review real-device performance before release. Browser and assistive-technology validation remains pending.
Choose the scoped core and its matching glass extension. Keep overlay markup inside the configured .reva boundary so inheritance is preserved.
CSS token reference · Inheritance and local overrides · Behaviour and accessibility