Skip to content

v0.1.5 — theme: :inherit

Latest

Choose a tag to compare

@alexdont alexdont released this 14 May 21:36
· 24 commits to main since this release

One additive feature — a fourth :theme value, :inherit, that lets the parent app drive Fresco's palette via the six --fresco-* CSS custom properties. Use it to wire the viewer to a parent theme system (daisyUI, Tailwind, custom palettes) so background, dot grid, and nav buttons follow the parent theme as it changes.

Fully backwards compatible — :system, :light, and :dark viewers behave exactly as in 0.1.4.

Added

  • :inherit value on Fresco.viewer's :theme attribute. Emits data-fresco-theme="inherit" on the host div and skips Fresco's own var declarations for that viewer. The parent app supplies the variables on .fresco-viewer[data-fresco-theme="inherit"].

Changed

  • The base .fresco-viewer { --fresco-bg: …; … } rule is now scoped to .fresco-viewer:not([data-fresco-theme="inherit"]) so it doesn't fight the parent's vars. The @media (prefers-color-scheme: dark) branch picks up the same :not() exclusion.