Skip to content

fix: theme flashes: share URL and applied visitor theme paint the default theme first #618

Closed

Description

@mvilacad

Two flashes, owner wants zero:

  1. Opening `/theme/#t=v1.` paints the default sketchbook theme (skeleton-like state), then switches to the shared theme. The hash is decoded only in `ThemeStudio`'s `onMount`.
  2. After "Apply to site" (`ca-site-studio`), every page load first paints the original theme and then the visitor theme a moment later.

Expected: the first frame already has the target theme's surface and brand colours, no skeleton, CLS 0 from font swaps, and the same on `` navigations (`astro:before-swap`). Also check `colorScheme.setTokens` runtime tokens against the package's own anti-FOUC path.

Test first: Playwright at 6x CPU throttle and Slow 3G, first-frame colour assertions.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions