Sanctuary

    Flavor
    Accent
    Glazing
    Window

    Reference

    Accessibility

    The contrast and motion guarantees of the tokens, and what stays your job.

    Sanctuary keeps two promises in every flavor and with every accent: text and accent colors are legible against the stone they sit on, and motion stops when the visitor asks for less. The core’s tests check both on every build, and this page computes them again from the published palette.

    Contrast

    WCAG 2 asks for a contrast ratio of at least 4.5:1 for normal text (level AA) and 3:1 for focus indicators. For each pairing below, the table shows the lowest ratio across every pigment and every stone it covers, and the pair that gives it. <p> stands for any pigment, and the stones run from surface-sunken to surface-raised-4.

    PairingMinimumLaudsVespersComplineMatins
    text, text-muted and text-subtle on every stone4.50:14.83:1text-subtle on surface-sunken4.51:1text-subtle on surface-raised-44.60:1text-subtle on surface-raised-44.64:1text-subtle on surface-raised-4
    glass-<p> on every stone but surface-sunken4.50:14.51:1glass-verdure on surface6.19:1glass-murrey on surface-raised-46.75:1glass-murrey on surface-raised-45.87:1glass-murrey on surface-raised-4
    glass-<p>-ink on every stone4.50:16.14:1glass-verdure-ink on surface-sunken8.30:1glass-murrey-ink on surface-raised-49.05:1glass-murrey-ink on surface-raised-48.29:1glass-murrey-ink on surface-raised-4
    glass-<p>-ink on its pane4.50:16.51:1glass-verdure-ink on glass-verdure-pane8.22:1glass-verdure-ink on glass-verdure-pane8.22:1glass-verdure-ink on glass-verdure-pane8.14:1glass-murrey-ink on glass-murrey-pane
    glass-<p>-on on its glass4.50:14.77:1glass-verdure-on on glass-verdure9.57:1glass-murrey-on on glass-murrey9.57:1glass-murrey-on on glass-murrey6.78:1glass-murrey-on on glass-murrey
    glass-<p>-on-pane on its pane4.50:19.57:1glass-verdure-on-pane on glass-verdure-pane9.57:1glass-verdure-on-pane on glass-verdure-pane9.57:1glass-verdure-on-pane on glass-verdure-pane10.80:1glass-amber-on-pane on glass-amber-pane
    The focus halo: glass-<p> against surface3.00:14.51:1glass-verdure on surface9.21:1glass-murrey on surface9.66:1glass-murrey on surface7.42:1glass-murrey on surface

    Each pigment’s ramp fixes the lightness of every tone across hues, which is why swapping the accent never breaks these ratios.

    What the guarantees do not cover

    • lume is light, not text. glass-<p>-lume and accent-lume have no text guarantee. Use them for glows, hover and gradients, never for words.
    • Glass on sunken stone. On surface-sunken (inputs, wells), accent text uses ink, not the glass itself.
    • Disabled text. text-disabled is deliberately faint. WCAG exempts inactive controls, but never put content a visitor needs in it.
    • Your own colors. Colors mixed outside the tokens, text over images, and the named windows as backgrounds are not checked. Test what you build.
    • Color alone. Contrast makes color legible, not meaningful: a state shown only by color still needs a label, an icon or a shape.

    Focus

    --san-halo draws the focus ring: a band of stone, then a ring of the accent. The accent clears 3:1 against surface in every flavor (the last row above). Use it on :focus-visible, so a ring appears for keyboard visitors without flashing on every click:

    .button:focus-visible {
      outline: none;
      box-shadow: var(--san-halo);
    }
    

    Reduced motion

    When the visitor asks for reduced motion (prefers-reduced-motion: reduce), the stylesheet sets these tokens, read from it at build time:

    • --san-duration-instant: 0ms
    • --san-duration-fast: 0ms
    • --san-duration-base: 0ms
    • --san-duration-slow: 0ms
    • --san-duration-slower: 0ms
    • --san-duration-procession: 0ms

    Anything timed with the duration tokens then changes instantly. Animations and durations written without the tokens are not covered: time them with the tokens, or stop them yourself under the same media query. See the motion foundations for the details.