Rewrite for Zen 1.21+ settings redesign (moz-page-nav) - #1
Closed
nordstern wants to merge 1 commit into
Closed
Conversation
The Firefox settings redesign shipped in Zen 1.21 replaced the about:preferences sidebar markup (vbox.navigation, richlist #categories, sidebar-footer-list) with the shadow-DOM <moz-page-nav> component, so none of the previous selectors matched and the mod had no effect on the settings page. preferences.css: - Target the moz-page-nav host (#categories). It exports no CSS parts, so shadow internals are styled indirectly: labels stay rendered and the host width does the collapsing (clipped by overflow: hidden), keeping row heights identical in both states. font-size: 0 compresses rows and color: transparent kills the icons (fills ride currentColor); both traps are documented in comments. - Collapsed strip stays wider than the heading row's natural width so the logo never flex-shrinks (its centered background otherwise drifts between states). The label sliver past the icons is hidden with a mask-image fade; the heading is hidden via --font-size-xlarge (custom properties inherit across the shadow boundary but cannot be transitioned from outside). - Expand on :hover only: :focus-within pins the flyout open after a category is clicked, and the component does not delegate focus, so keyboard-only detection cannot cross the shadow boundary. addons.css: - Sidebar rebuilt to match the settings treatment. about:addons markup is unchanged, but .category is a light-DOM button whose label is its text and whose icon is a background-image with fill: currentColor - labels are hidden with color: transparent while the fill is pinned to a concrete color, giving labels a real fade with solid icons. Selected split by state: icon accent always, label accent on hover. - Footer (settings/support links) aligned to the same icon column with labels fading via opacity; header divider slimmed from 4px to 1px. - Flat selector topology: deeply nested &-rules inside @-moz-document silently failed to apply in the user-sheet context. userContent.css: - Shared design tokens (--cs-strip-w, --cs-flyout-w, --cs-content-offset, --cs-anim, --cs-elevation, --cs-accent) so both sidebars stay in sync; each file keeps literal fallbacks and works standalone. prefers-reduced-motion zeroes --cs-anim in one place. Both pages: 54px collapsed strip, 250px hover flyout, 180ms decelerate curve, elevation shadow on the expanded flyout.
|
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.
Problem
The Firefox settings redesign shipped in Zen 1.21 replaced the
about:preferencessidebar markup (vbox.navigation, richlist#categories,sidebar-footer-list) with the shadow-DOM<moz-page-nav>component. None of the mod's selectors match anymore, so the mod has no effect on the settings page (current store version included).Changes
preferences.css
moz-page-navhost (#categories). The component exports no CSS parts, so shadow internals are styled indirectly: labels stay rendered and the host width does the collapsing (clipped byoverflow: hidden), keeping row heights identical in both states.font-size: 0compresses rows (label line box is taller than the icon, list crawls during the animation) andcolor: transparentkills the icons (fills ridecurrentColor).mask-imagefade; the heading is hidden via--font-size-xlarge(custom properties inherit across the shadow boundary but can't be transitioned from outside).:hoveronly —:focus-withinpins the flyout open after a category is clicked, and the component doesn't delegate focus, so keyboard-only detection can't cross the shadow boundary.addons.css
about:addonsmarkup is unchanged, but.categoryis a light-DOM button whose label is its text and whose icon is a background-image withfill: currentColor— labels hide withcolor: transparentwhile the fill is pinned to a concrete color: solid icons, real label fade. Selected state split: icon accent in both states, label accent on hover.&-rules inside@-moz-documentsilently failed to apply in the user-sheet context.userContent.css
--cs-strip-w,--cs-flyout-w,--cs-content-offset,--cs-anim,--cs-elevation,--cs-accent) keep both sidebars in sync; each file carries literal fallbacks and still works standalone.prefers-reduced-motionzeroes--cs-animin one place.Result
Both pages: 54px collapsed icon strip, 250px hover flyout, 180ms decelerate curve, elevation shadow on the expanded flyout. All four existing mod preferences keep working (enable, animations, compact addons, grid).
Tested on Zen 1.21.7b (macOS, Sine).