style: adopt CSS cascade layers + reduced-motion guard (Phase 2A)#50
Merged
Conversation
…ronicle-sync (Phase 2A) Three of four module CSS files wrapped in @layer chronicle-sync per 2026-05-22-ui-modernization-decisions.md Q7. Pair commit handles chronicle-sync.css separately (it gets the master @layer declaration + prefers-reduced-motion guard). No behavioral change. Cites: 2026-05-21-core-tenets §T-B2 §T-B3 2026-05-22-ui-modernization-decisions.md Q4 Q6 Q7
Master commit for FM-CSS-FREE-WINS: - Add `@layer foundry-host, chronicle-sync;` declaration (chronicle-sync.css loads first per module.json#/styles; declaring this once here covers the whole module). Foundry-host CSS arrives unlayered → forced below chronicle-sync layer. Future module CSS no longer needs .window-app specificity-stacking to win the cascade. - Add `prefers-reduced-motion` @media block (WCAG 2.1 SC 2.3.3 + T-B3 floor). Lives outside the chronicle-sync layer so it also tames Foundry-host animation when users have reduced-motion enabled. - Wrap entire content of chronicle-sync.css in `@layer chronicle-sync { ... }`. Pair commit handled the other 3 sidecars (import-wizard, map-viewer, sync-calendar-pr3). No behavioral change. node --test passes (250/250). node tools/check-package-descriptor.mjs passes locally. Cites: 2026-05-21-core-tenets §T-B2 §T-B3 2026-05-22-ui-modernization-decisions.md Q4 Q6 Q7 reports/coordinator/2026-05-22-modern-ui-patterns-discovery.md §3.3 §3.10
10 tasks
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.
Summary
Phase 2A free-wins CSS adoption for the Foundry module side. Adds disciplined cascade ordering and an accessibility floor across all four module CSS files. No behavioral change.
Cites:
2026-05-21-core-tenets §T-B2(plugin isolation at the CSS layer)2026-05-21-core-tenets §T-B3(production-grade UI / accessibility floor)2026-05-22-ui-modernization-decisions.mdQ4 (@layerhybrid), Q6 (reduced-motion total-disable), Q7 (Foundry-module flat layer)reports/coordinator/2026-05-22-modern-ui-patterns-discovery.md§3.3, §3.10, §5 Foundry phasedispatches/foundry/FM-CSS-FREE-WINS.mdreports/foundry/2026-05-21-fm-hygiene-audit.md§1 (D1/D6 — this PR is the Phase 2A free-wins precursor to the larger CSS organization decision)Changes
styles/chronicle-sync.css@layer foundry-host, chronicle-sync;master declaration (this file loads first permodule.json#/styles). Added globalprefers-reduced-motion@mediablock. Wrapped entire content in@layer chronicle-sync { … }.styles/import-wizard.css@layer chronicle-sync { … }.styles/map-viewer.css@layer chronicle-sync { … }.styles/sync-calendar-pr3.css@layer chronicle-sync { … }.What this enables
Foundry-host CSS arrives unlayered (effectively in the implicit highest layer). Declaring
foundry-hostas a named layer forces it belowchronicle-sync. Practical effect: any rule inside@layer chronicle-sync { … }wins over Foundry's.window-appcascade, without needing specificity hacks.Future module CSS no longer needs the
.window-app .my-thing .my-other-thingspecificity-stacking pattern; rules inside@layer chronicle-syncwin over Foundry's host CSS by virtue of layer ordering.Accessibility
@media (prefers-reduced-motion: reduce)block respects WCAG 2.1 SC 2.3.3 and the OS-level user preference. Total-disable approach per Q6 of the UI modernization decisions: animations + transitions + scroll-behavior + view-transition pseudo-elements all silenced when the user has opted in.The block lives outside the
chronicle-synclayer so it also tames Foundry-host animation, not just module CSS.Verification
node --test tools/test-*.mjs→ 250/250 pass (locally, against in-place edits before push)node tools/check-package-descriptor.mjs→ OK (0 warnings){-count ===}-count per file)module.json#/stylesdeclareschronicle-sync.cssfirst → master@layerdeclaration is the first thing the browser seesOut of scope
chronicle-sync.css(2531 lines) into sidecars — that'sFM-HYGIENE-AUDITChunk 6, separate decision (D1/D6)setTimeoutfix atscripts/sync-dashboard.mjs:1158— Phase 4Note on commit history
This PR has two commits instead of one because the local commit-signing path returned HTTP 400 "missing source" during the session (same infra issue documented in PR #49's status report). Workaround was the GitHub MCP
push_filespattern, which serializes large file contents per call. The two commits implement one logical change:7694775— wrap the three sidecar CSS files53ff2f1— chronicle-sync.css with the master@layerdeclaration + reduced-motion guard + wrapSquash-on-merge will collapse cleanly if desired.
Followups
Status report at
reports/foundry/2026-05-22-fm-css-free-wins.md(separate commit onclaude/setup-working-memory-vROh3) will include:🤖 Cites
dispatches/foundry/FM-CSS-FREE-WINS.md. Generated by Claude Code.Generated by Claude Code