- Docs
- Foundations
- 04 of 05
Elevation
Shadows for floating layers, ruled borders, the stacking order, opacity and the focus ring.
- Shadows
- 5For floating layers only
- Border widths
- 3Rules, not shadows
- Layers
- 10One stacking order
- Focus ring
- 2pxOn every control
01
Shadows
Floating layers only. Each pairs a tight contact shadow with a soft ambient one.
02
Anatomy
Each shadow, layer by layer: a tight contact shadow, a soft ambient one, and a hairline edge.
y 1 · blur 2 · spread -1 · 8%y 1 · blur 3 · 4%spread 1 · 3%raisedy 2 · blur 4 · spread -2 · 8%y 8 · blur 16 · spread -6 · 10%spread 1 · 3%raised-hovery 4 · blur 8 · spread -4 · 8%y 12 · blur 24 · spread -8 · 12%spread 1 · 5%overlayy 8 · blur 16 · spread -8 · 12%y 24 · blur 48 · spread -12 · 20%spread 1 · 5%modal03
In both schemes
The same shadows on a light and a dark canvas. In dark, each layer is also a step lighter, so height reads by tone as well.
04
Borders
Three widths: hairline rules, emphasis lines, and the accent bar on the current item.
05
Layers
From the top layer down. Popovers sit above modals, so one opened from a dialog shows.
All 10 layers in order: popovers above modals, tooltips above both, the skip link on top
1900SkipLink1800Guided tours1700Tooltip1600ToastProvider1500Popover, Menu, Select, Combobox1400Dialog, Drawer, CommandPalette1300Dialog and Drawer backdrops1000No component yet100Table header, AppShell0Page content
06
Opacity
One opacity, for content with no disabled colour of its own, and the state layers.
07
Focus ring
2px in the focus colour: inside the edge of filled controls, 2px outside small ones.
2px08
In code
Rules first; a shadow only when something floats. Qeetrix's components set all of this for you.
/* A card: ruled, no shadow until it lifts. */
.member-card {
border: var(--qx-border-width-default) solid var(--qx-color-border-subtle);
border-radius: var(--qx-radius-surface);
background: var(--qx-color-surface-raised);
}
.member-card:hover {
box-shadow: var(--qx-shadow-raised-hover);
}
/* A menu floats: its own layer, its own shadow. */
.row-menu {
position: absolute;
z-index: var(--qx-z-popover);
border-radius: var(--qx-radius-overlay);
background: var(--qx-color-surface-overlay);
box-shadow: var(--qx-shadow-overlay);
}
.row-menu-item:focus-visible {
outline: var(--qx-focus-ring-width) solid var(--qx-color-border-focus);
outline-offset: calc(-1 * var(--qx-focus-ring-width));
}