Skip to main content

Surfaces

Open in ChatGPT

DWC defines three levels of surfaces which are used to organize the UI hierarchy combined with shadows. All palette colors are tested to have enough contrast with these surfaces.

Surfaces pick up a subtle tint from the primary hue and adapt automatically to light and dark modes.

Example

.element {
background: var(--dwc-surface-2);
}

Variables

VariableUsage
--dwc-surface-1Page and body background.
--dwc-surface-2Toolbars, menubars, cards.
--dwc-surface-3Windows, menus, popovers, dialogs.