The same token can hold different values: the condition of the page picks one. Each
condition is a class or an attribute on <html>, written by the mds-pref-* components,
which also remember the user’s choice; mds-pref groups them in one panel. Your code
changes nothing: it paints with the roles, and the roles move.Modepref-mode-light, pref-mode-dark, pref-mode-systemmds-pref-modeNamed themedata-theme-name="cool" or "warm"mds-pref-themeContrastpref-contrast-moremds-pref-contrastCorner shapedata-corner-shape="round" or "squircle"mds-pref-themeDepthdata-theme-depth="flat"The tables below are computed from the token data, one condition per column, and list
only the tokens that change; so their swatches are fixed colors, not the ones of this
page.
Dark mode
The palette flips and the roles with it: the dark value of every role is in its table in
Color. Never write dark: variants or dark-mode media queries for them.
Tailwind’s dark: follows the system only, not the pref-mode-* classes.
Named themes and contrast
A named theme retints the neutral roles at once: surfaces, washes, borders, text, the
inverse chip, on the porcelain family for cool and the bisque one for warm. The
status roles never change with the theme. The contrast preference promotes text and
borders, and turns the page into the paper of the mode. Under a named theme the
promotions are restated in the theme’s family, so the two go together.
The shape and the radius scale tuned for it move together. --magma-radius-full, the
pill, is the same under every shape.--magma-radius-3xs6px4px
--magma-radius-2xs10px6px
--magma-radius-xs14px8px
--magma-radius-sm16px10px
--magma-radius-md20px12px
--magma-radius-lg28px16px
--magma-radius-xl36px20px
--magma-radius-2xl40px24px
--magma-radius-3xl56px32px
--magma-radius-4xl80px48px
--magma-radius-5xl112px64px
Depth
A flat theme sets the depth to 0, which takes the shadows of the elevations away. The
depth axis is in styles/dist/css/theme.css, outside the documented setup: it works only
where a project imports that file.--depth10