--bg-body
Page or application canvas behind main content.
Use for: html/body background
Value: supplied by your design.
Modern CSS toolset
Give each surface a role, from the page canvas to raised cards and inset fields. Map these roles to your own palette, and choose text colors for the surface they appear on.
.card {
background: var(--bg-raised);
color: var(--text-primary);
}
These examples show how to consume the tokens. Assign values before using them.
--bg-bodyPage or application canvas behind main content.
Use for: html/body background
Value: supplied by your design.
--bg-mainPrimary content surface.
Use for: main column, article, panel
Value: supplied by your design.
--bg-insetRecessed surface below the main background.
Use for: asides, wells, form fields, inputs
Value: supplied by your design.
--bg-raisedSurface elevated above the main background.
Use for: cards, menus, dropdowns, raised panels
Value: supplied by your design.
--bg-inset-strongDeeper inset than inset when two recessed levels are needed.
Value: supplied by your design.
--bg-raised-strongStronger elevation than raised when two raised levels are needed.
Value: supplied by your design.
--bg-brandBackground filled with the primary brand color.
Use for: call-to-action buttons
Value: supplied by your design.
--bg-brand-secondaryBackground filled with a secondary brand color.
Value: supplied by your design.
--bg-successBackground for success state regions.
Use for: banners, badges
Value: supplied by your design.
--bg-warningBackground for warning state regions.
Value: supplied by your design.
--bg-dangerBackground for danger/error state regions.
Value: supplied by your design.
--bg-infoBackground for informational state regions.
Value: supplied by your design.
--bg-disabledBackground for disabled controls or inert regions.
Value: supplied by your design.
--bg-inverseContrasting surface inverted from the current theme (e.g. dark on light themes).
Value: supplied by your design.