Conversation
Converts the topnav's rem sizing to calc(N * var(--topnavUnit--)), where --topnavUnit-- is keyed off the browser's default font size (font-size: var(--topnavFontSize, medium) + CSS.registerProperty) rather than the page's html root font-size. Includes a JS fallback for browsers without CSS.registerProperty, and tests proving the registration is load-bearing against compounding. WIP checkpoint: lint/typecheck/tests all green, third diff-review pass in flight. Not yet squashed/finalized; PR not yet opened. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jbuckner
marked this pull request as ready for review
October 1, 2026 23:55
jbuckner
added this pull request to stack #126
October 1, 2026 23:55
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## WEBDEV-9221-localize-topnav-menus #137 +/- ##
=====================================================================
- Coverage 89.69% 89.54% -0.16%
=====================================================================
Files 83 84 +1
Lines 3009 3022 +13
Branches 717 722 +5
=====================================================================
+ Hits 2699 2706 +7
- Misses 135 138 +3
- Partials 175 178 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Converts the topnav's rem sizing (every size assumed a 10px html root, so it only rendered right on pages that set
html { font-size: 10px }like archive.org and offshoot) tocalc(N * var(--topnavUnit--)).--topnavUnit--is keyed off the browser's own default font size, not the page's root font-size:ia-topnav's:hostsetsfont-size: var(--topnavFontSize, medium)(mediumis the browser default, ignoring anyhtmlrem reset) and--topnavUnit--: calc(1em / 16), registered as a typed<length>custom property so it resolves once and inherits as a fixed px value through nested shadow roots instead of compounding. A JS fallback covers browsers withoutCSS.registerProperty(old Firefox/Safari).Result: the topnav renders pixel-identical to today at the browser's 16px default, with no consumer override needed anywhere, and it grows when the user raises their default font size (confirmed in Chromium, Firefox and WebKit). Neither petabox nor offshoot needs a change for this.
Jira: https://webarchive.jira.com/browse/WEBDEV-9250
🤖 Generated with Claude Code