CSS Styles
Base colors
Put theme-root on the app's body and import your stylesheet after Jhana's. The root sets four base colors, then derives the intermediate shades with color-mix(). Override only the colors your app needs.
For raised and recessed surfaces, interaction states and effect strength, see Shading & glow.
| Token | Role |
|---|---|
--cAcc | Selected controls, primary actions and selected-card text |
--cDark | Page, form-container and dialog background |
--cLight | Ordinary text and icons |
--cErr | Error text and the accent used by theme-error |
The error token is --cErr, not --cError. Use text-err for error text. The built-in theme-error class changes the local accent, so a primary button becomes an error-colored action while ordinary text stays light.
Derived shades
DL means dark mixed with light. AD means accent mixed with dark. The number is the percentage of the second color, not opacity. Larger DL values are lighter; larger AD values are darker.
| Token | Mixture and use |
|---|---|
--cDL05 | Dark with 5% light for input surfaces, passive cards and light-button text |
--cDL10 … --cDL70 | 10%, 20%, 30%, 40% and 70% light for neutral shades |
--cLighter | Light with 50% white for hover, focus and tooltip foregrounds |
--cDarker | Dark with 30% black for deeper surfaces |
--cAD30 / --cAD40 | Accent with 30% or 40% dark for darker accent shades |
--cAD90 | Accent with 90% dark for primary-button text and selected-card backgrounds |
Keep form containers on cDark behind their cDL05 input surfaces. Light buttons use cDL05 text: 95% dark and 5% light, matching Infinipose's plus icons. Primary buttons use an accent background with cAD90 text: 90% dark and 10% accent, matching its import and export icons. Selected cards mix 75% accent with 25% white for their foreground on a subtly tinted dark background, as in the Infinipose rotation-card example. Icon follows the text automatically through its currentColor default. The border retains the original accent.
Local machine accent
Any class beginning with theme- creates a local theme scope. It inherits the root's base colors and recalculates shades for its overrides. These are Infinipose's machine choices and accent colors. Selecting one changes this group's accent without replacing the surrounding palette.
Use the theme class together with the override. Setting only --cAcc on an ordinary descendant leaves inherited shades such as cAD30 computed from the ancestor's accent. A theme scope recalculates them locally. It only sets variables: a custom surface still needs color and background-color when changing its own foreground and background.
Production status colors
Print Meter uses green for online, yellow for offline and red for busy. Its production indicators need bright backgrounds visible across a room. Keep that styling in an app-owned class when upgrading, using the same local theme mechanism. These samples preserve its foreground and background mixtures. The primary card selection style remains available for ordinary choices.
Online
Offline
Busy
Sample themes
Try these accents across the documentation. The sample updates only the chosen root variables and restores them when leaving this page. In an app, use a CSS rule for a fixed palette or bind style:--cAcc to state on the theme container, as in the machine example above.