Skip to content

fix(themes): align narrow drawer top with wide header - #8783

Closed
polybjorn wants to merge 2 commits into
FreshRSS:edgefrom
polybjorn:fix/themes-narrow-aside-header-alignment
Closed

polybjorn wants to merge 2 commits into
FreshRSS:edgefrom
polybjorn:fix/themes-narrow-aside-header-alignment

Conversation

@polybjorn

@polybjorn polybjorn commented May 4, 2026 •

Copy link
Copy Markdown
Contributor

When the sidebar is open and the viewport crosses 840px into narrow view, the "Subscription management" button shifts down by about 12px:

  • The X close button at the top of the drawer is taller than the wide header (about 58px vs 56px).
  • The vertical space above the X is counted twice: once by .aside.aside_feed { padding: 10px 0 }, once by .configure-feeds { margin-top: 10px }.

Two tokens at base-theme :root:

  • --height-header: 56px is used by the narrow .header > .item min-height and the narrow .aside .toggle_aside height. The X button row matches the header row.
  • --aside-padding-y: 10px is used by the narrow .configure-feeds margin-top. Themes with non-default aside padding override the token at :root.

Two supporting changes in the narrow @media:

  • .aside .toggle_aside rewritten from padding: 1rem 0; display: block to flex centering with box-sizing: border-box; height: var(--height-header). The X icon is vertically centered without relying on padding math.
  • .aside.aside_feed { padding: 0 } bumped to :root .aside.aside_feed. Same specificity declarations in per-theme files (loaded after base-theme) were shadowing the original.

Per-theme overrides

  • Origine/origine.css: --aside-padding-y: 0.5rem. Cascades to Dark and Origine-compact, which load Origine via metadata.json.
  • Origine-compact/origine-compact.css: --height-header: 37.6px. Smaller logo, measured wide header is 37.6px.

Test plan

Verified on edge:

  • #btn-subscription top matches across wide and narrow drawer-open per theme: Nord/Alt-Dark/Dark/Pafat/Flat/Dark-pink at 66px, Origine and Dark at 64px, Origine-compact at 45.6px.
  • X button vertically centered, height matches each theme's wide header.
  • npm run stylelint passes.
  • npm run rtlcss produces no further diff.

polybjorn added 2 commits May 4, 2026 12:26
When the sidebar is open and the viewport crosses 840px into narrow
view, the "Subscription management" button shifts down by ~12px
because the X close button (padding: 1rem 0) is taller than the wide
header row, and the vertical space above the X is counted twice
(`.aside.aside_feed { padding: 10px 0 }` plus
`.configure-feeds { margin-top: 10px }`).

Introduce two tokens at base-theme :root:

- `--height-header: 56px` is consumed by the narrow `.header > .item`
  min-height and the narrow `.aside .toggle_aside` height. The X
  button row matches the header row.
- `--aside-padding-y: 10px` is consumed by the narrow
  `.configure-feeds` margin-top. Themes with non-default aside
  padding override the token at :root.

Two supporting changes in the narrow @media:

- `.aside .toggle_aside` rewritten to box-sizing: border-box +
  height: var(--height-header) + flex centering. The X icon is
  vertically centered without relying on padding math.
- `.aside.aside_feed { padding: 0 }` bumped to
  `:root .aside.aside_feed`. Same-specificity declarations in
  per-theme files (loaded after base-theme) were shadowing it.

Per-theme overrides:

- Origine: --aside-padding-y: 0.5rem (cascades to Dark and
  Origine-compact via metadata.json).
- Origine-compact: --height-header: 37.6px (smaller logo).
@polybjorn
polybjorn marked this pull request as ready for review May 4, 2026 09:34
@Alkarex Alkarex added UI 🎨 User Interfaces Theme 🖌 labels May 4, 2026
@Alkarex Alkarex modified the milestones: 1.30.0, 1.29.0 May 4, 2026
Alkarex pushed a commit that referenced this pull request May 4, 2026
Alt-Dark, Dark, Origine, and Pafat use `border-bottom: 1px solid` on
`.header > .item`, making their wide-view header 57px tall (56px
content + 1px border). Other shipped themes have no such border and
render at 56px.

Replace `border-bottom` with `box-shadow: inset 0 -1px 0`. Visually
identical (same colour, same position at the bottom of each header
cell), but the shadow doesn't add to the box height. Wide-view
header outerHeight becomes 56px across themes, which lets the
shared `--height-header: 56px` token introduced in #8783 produce
pixel-perfect alignment between the wide header and the narrow
drawer X button. Without this PR, those four themes carry a 1px
residual offset under #8783's alignment fix.

Co-authored-by: Bjørn A. Andersen <[email protected]>
@Alkarex Alkarex modified the milestones: 1.29.0, 1.30.0 May 4, 2026
@polybjorn polybjorn closed this May 6, 2026
@Alkarex Alkarex modified the milestones: 1.30.0, 1.29.1 May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Theme 🖌 UI 🎨 User Interfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants