-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
What version of astro are you using?
^2.9.1
Are you using an SSR adapter? If so, which one?
Vercel
What package manager are you using?
npm
What operating system are you using?
Windows
What browser are you using?
Brave
Describe the Bug
I have a script that toggles the .dark class on the html element. However, using view transitions, the html class is reset to its original state (ie. class specified in the layout) but the script is not re-run.
To reproduce:
- The page background will be red if your os is in dark mode
- navigate to another page, the background will be white again
What's the expected result?
I'd expect one of the following:
- html attributes are not reset to default because scripts are not re-run
- scripts re-run
I think 1. makes more sense to avoid flashes
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-8a4stc
Participation
- I am willing to submit a pull request for this issue.
dotnize, fflaten, Cherry, Plumpernickel, Jezda1337 and 1 more
Metadata
Metadata
Assignees
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)