--content-max-width
Max width for primary page content.
Use for: main layout container, nav header
Value: supplied by your design.
Modern CSS toolset
Share content widths and a deliberate stacking order. Z-index values only compare within their stacking context, and do not override the browser’s top layer.
.container {
max-width: var(--content-max-width);
margin-inline: auto;
}
.sticky-header {
position: sticky;
top: 0;
z-index: var(--z-sticky);
}
These examples show how to consume the tokens. Assign values before using them.
--content-max-widthMax width for primary page content.
Use for: main layout container, nav header
Value: supplied by your design.
--overlay-max-widthMax width for overlays such as dialogs.
Use for: modals, dialogs
Value: supplied by your design.
--z-menuZ-index for menus and dropdowns.
Starter value: 100
--z-stickyZ-index for sticky headers or bars.
Starter value: 110
--z-fixedZ-index for fixed-position chrome.
Starter value: 120
--z-drawerZ-index for drawers and side panels.
Starter value: 130
--z-dialogZ-index for modal dialogs.
Starter value: 140
--z-popoverZ-index for tooltips and popovers.
Starter value: 150
--z-tooltipZ-index for tooltips.
Starter value: 160
--z-toastZ-index for toasts and global notifications.
Starter value: 170