merge queue: embarking main (c844ecb) and #11338 together#11343
Closed
mergify[bot] wants to merge 2 commits intomainfrom
Closed
merge queue: embarking main (c844ecb) and #11338 together#11343mergify[bot] wants to merge 2 commits intomainfrom
mergify[bot] wants to merge 2 commits intomainfrom
Conversation
Theme classes (theme-dark, dark) were lost on every navigation because ClientRouter swaps the <html> element and the server renders it with class="initial". The inline FOUC-prevention script only runs on initial page load (Astro deduplicates identical inline scripts across navigations), so nothing reapplied the theme after a swap. Re-run the theme detection on astro:before-swap, applying the classes to event.newDocument.documentElement so the swap completes with the correct theme and no flash. Also handle both `theme-dark` and `dark` classes for parity with ThemeToggleButton, since theme.css uses both selectors. Change-Id: I0b1115aac90e5944bac2d5ca6ea746b2273f1c05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ The merge conditions cannot be satisfied due to failing checks. ✨
Branch main (c844ecb) and #11338 are embarked together for merge.
This pull request has been created by Mergify to speculatively check the mergeability of #11338.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.
Required conditions of queue rule
defaultfor merge:schedule=Mon-Fri 09:00-17:30[Europe/Paris]check-success = test-broken-linkslabel = ignore-broken-linkscheck-success = buildcheck-success = lintcheck-success = testcheck-success=Cloudflare Pages-head-repo-full-name~=^Mergifyio/title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:#approved-reviews-by >= 2author = dependabot[bot]author = mergify-ci-botbody ~= (?ms:.{48,})#changes-requested-reviews-by = 0#review-requested = 0#review-threads-unresolved = 0Required conditions to stay in the queue:
author != dependabot[bot]author != mergify-ci-bottitle ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:#approved-reviews-by >= 2author = dependabot[bot]author = mergify-ci-botbody ~= (?ms:.{48,})#changes-requested-reviews-by = 0#review-requested = 0#review-threads-unresolved = 0check-success = buildcheck-success = lintcheck-success = testcheck-success = test-broken-linkslabel = ignore-broken-linkscheck-success=Cloudflare Pages-head-repo-full-name~=^Mergifyio/