Home

Site Review

Usage

The site review component uses shared semantic tokens for layout and UI chrome, but defines custom tokens for highlight colors. Start with:

  • --site-review-highlight-* tokens for comment and suggestion highlights

  • Dark mode variants to tune contrast when the page is in dark mode

Tokens

Highlight Tokens

TokenDescriptionDefault Value
--site-review-highlight-commentComment highlight backgroundcolor-mix(in srgb, var(--color-yellow-400) 30%, transparent)
--site-review-highlight-comment-activeActive comment highlightcolor-mix(in srgb, var(--color-yellow-400) 50%, transparent)
--site-review-highlight-suggestionSuggestion highlight backgroundcolor-mix(in srgb, var(--color-green-400) 25%, transparent)
--site-review-highlight-suggestion-activeActive suggestion highlightcolor-mix(in srgb, var(--color-green-400) 45%, transparent)

Dark Mode Tokens

These are mapped automatically when dark mode is active.

TokenDescriptionDefault Value
--site-review-highlight-comment-darkComment highlight in dark modecolor-mix(in srgb, var(--color-amber-400) 25%, transparent)
--site-review-highlight-comment-active-darkActive comment highlight in dark modecolor-mix(in srgb, var(--color-amber-400) 40%, transparent)
--site-review-highlight-suggestion-darkSuggestion highlight in dark modecolor-mix(in srgb, var(--color-green-400) 20%, transparent)
--site-review-highlight-suggestion-active-darkActive suggestion highlight in dark modecolor-mix(in srgb, var(--color-green-400) 35%, transparent)

Examples

Softer Highlight Palette

:root {
  --site-review-highlight-comment: color-mix(in srgb, var(--color-yellow-300) 20%, transparent);
  --site-review-highlight-suggestion: color-mix(in srgb, var(--color-green-300) 20%, transparent);
}

Strong Active States

:root {
  --site-review-highlight-comment-active: color-mix(in srgb, var(--color-amber-500) 60%, transparent);
  --site-review-highlight-suggestion-active: color-mix(in srgb, var(--color-green-500) 55%, transparent);
}

Tips

Keep contrast subtle: Highlights should support text selection without overpowering content.

Match dark mode: Adjust dark variants to avoid neon-like glow against dark surfaces.

© 2026 Stencila