Public: anyone can read this; nobody can change it.
Boot style follows data-theme so a theme toggle repaints the ground #32
Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.
Mason's fix for the fork's #1240, carried upstream as written (fork pull #1241, commit 9e44960e), reviewed by the owner's steward.
shipped merged
Sign in to join this conversation.
new above
offline
Mason's fix for the fork's #1240, carried upstream as written (fork pull #1241, commit 9e44960e), reviewed by the owner's steward.
The owner: "the background isn't changing with the theme change anymore… it requires a refresh."
The nonce'd boot style painted the ground from the theme the server saw, or from the OS:
html,body{background-color:…}plus aprefers-color-schememedia rule. The theme menu flipsdata-themeon the root without a reload, and nothing in the boot style looked at it, so the ground stayed put until the next full render.The boot style is one constant for every page: the system pair, then one
html[data-theme="…"],html[data-theme="…"] bodyrule per theme, which outranks the media rule. A toggle repaints at once; a page rendered with a chosen theme paints right on first frame because the root carries the attribute from the server.Tests:
test/themes.test.ts(the boot css has a rule per theme and the system pair) andtest/web.test.tsupdated for the constant.🤖 Generated with Claude Code