Skip to content

Theming

All colors are driven by 10 CSS custom properties. Override them in themes.css.

Surface tokens

TokenRole
--fap-color-primaryPrimary brand color
--fap-color-bgPage background
--fap-color-textDefault text color
--fap-color-mutedSubdued text, captions
--fap-color-borderBorders, dividers

Semantic tokens

TokenRole
--fap-color-successPositive actions
--fap-color-warningCaution indicators
--fap-color-dangerDestructive actions, errors
--fap-color-secondarySecondary accents
--fap-color-primary-inverseInverse of primary

Tokens in context

Highlight Inserted Deleted

Usage

<link rel="stylesheet" href="fap.min.css">
<link rel="stylesheet" href="fap.themes.css">

:root {
  --fap-hue: 260;
  --fap-color-primary: hsl(260 65% 50%);
  --fap-color-success: hsl(150 50% 40%);
  --fap-color-danger:  hsl(0 65% 50%);
}

Theme toggle

<button data-theme-toggle data-outline>
  <span class="fabcons-moon" aria-hidden="true"></span>
  <span class="fabcons-sun" aria-hidden="true"></span>
  Toggle theme
</button>