Skip to content

Improved: Frss.css - font size + line height with 'rem' values - #4671

Merged
Alkarex merged 26 commits into
FreshRSS:edgefrom
math-GH:frss.css-font-size-line-height
Oct 3, 2022
Merged

Alkarex merged 26 commits into
FreshRSS:edgefrom
math-GH:frss.css-font-size-line-height

Conversation

@math-GH

@math-GH math-GH commented Oct 1, 2022 •

Copy link
Copy Markdown
Contributor

Step 3 of #4642 is done for frss.css (formerly known as template.css)
(Close #3733)

Changes proposed in this pull request:

  • CSS: font-size lines have now rem units
  • CSS: line-height lines are now unit less
  • PHTML: to remove some CSS lines, the close "icon" (it was a UTF-8 icon) was replaced by the common close icon

Information: I checked (hopefully everywhere that the 'rem' values are (more or less) equal to the previous values.

How to test the feature manually:

  1. general everywhere ;)

Pull request checklist:

  • clear commit messages
  • code manually tested

@math-GH math-GH added UI 🎨 User Interfaces System care Everything related to system care labels Oct 1, 2022
@Alkarex Alkarex added this to the 1.21.0 milestone Oct 1, 2022
@Alkarex
Alkarex requested a review from Frenzie October 1, 2022 19:50
@Alkarex

Alkarex commented Oct 1, 2022

Copy link
Copy Markdown
Member

Quick test with Pafat theme:
In normal view, hovering over article titles make the lines jump a bit.
The line height is slightly different in Pafat (but not necessarily a problem - looks actually a tad better to me)

@math-GH

math-GH commented Oct 2, 2022

Copy link
Copy Markdown
Contributor Author

Quick test with Pafat theme: In normal view, hovering over article titles make the lines jump a bit. The line height is slightly different in Pafat (but not necessarily a problem - looks actually a tad better to me)

Fixed

Comment thread p/themes/base-theme/frss.css Resolved
Comment thread p/themes/base-theme/frss.rtl.css Resolved

@Frenzie Frenzie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm in principle, left a couple quick remarks

@Alkarex
Alkarex merged commit 01a8c37 into FreshRSS:edge Oct 3, 2022
@math-GH
math-GH deleted the frss.css-font-size-line-height branch October 3, 2022 15:05
@math-GH math-GH mentioned this pull request Oct 4, 2022
2 tasks done
@Alkarex Alkarex modified the milestones: 1.21.0, 1.20.1 Oct 9, 2022
@Alkarex

Alkarex commented Oct 11, 2022

Copy link
Copy Markdown
Member

See regression probably coming from this PR: #4712

@nicofrand

nicofrand commented Nov 4, 2022 •

Copy link
Copy Markdown
Contributor

Hi,

FYI this also fixes an issue on FreshRSS 1.20.0 where .flux_header on hover did not have position: relative and the title just kinda disappears, on origine compact at least.

math-GH added a commit to math-GH/FreshRSS that referenced this pull request Nov 15, 2022
…RSS#4671)

* headlines h1-h3

* delete for <sup> trust the browser

* .icons = 1rem

* line-height WIP

* .flux .item

* paragraphs

* kbd

* button.as-link

* .form-advanced-title

* set line-height 1.5 as default

* .flux .item.title .summary

* .flux .item.title .author

* .content > header, .content > footer

* popup

* last lines

* RTL CSS

* imrpove jumpy line

* Origine Compact

* Swage

* FRSS CSS RTL

* deleted: br

* deleted: font-size: 16px

* RTL CSS
Alkarex pushed a commit that referenced this pull request May 1, 2026
Fixes a cluster of bugs in the Swage theme. Most are nav-bar related and reproducible in narrow viewports (≤840px); one affects the article list at any viewport.

1. **Horizontal page overflow.** `.nav_menu` had `width: 100%` plus `padding-left: 2rem` with default `box-sizing: content-box`, making it 32px wider than the viewport. The whole page side-scrolled. Fixed with `box-sizing: border-box`.

2. **Article title jumps down on hover.** `.flux:not(.current):hover .item .title { top: auto !important }` overrode the base-theme `top: 0`, dropping the absolutely-positioned title to its in-flow position on hover. The override was added in #4671 (a broad font-size/line-height refactor) and looks like collateral; no other Swage rule depends on it. Removed.

3. **Settings/sort buttons drift on scroll.** Both used `position: fixed` without an explicit `top`, so they resolved to their static document position and drifted with scroll. Compounded by being inside `position: sticky` parents (Firefox bug). Fixed by:
   - Making `.header` sticky so `.item.configure` (now `position: absolute; top: 0`) anchors to it.
   - Splitting `#nav_menu_sort .dropdown-menu` from its siblings and making it `position: absolute` (the only one that needs to float when open).

4. **Logo hidden selector typo.** Narrow-view rule used `.item .title` (descendant) but the actual element is `.item.title` (combined class), so the logo was never hidden in narrow view. Fixed.

5. **Logo overlaps nav buttons when sidebar is collapsed.** At any viewport, collapsing the sidebar leaves the absolutely-positioned logo overlapping the now-wider nav. Added `body:has(.aside:not(.visible)) .header .item.title { display: none }` to hide the logo whenever the sidebar isn't expanded. Trade-off: the logo is no longer visible when the sidebar is collapsed at any width. Keeping it visible would require repositioning or resizing the logo itself, which is a redesign rather than a bug fix.

6. **Forced two-row nav at narrow widths even when one row would fit.** Narrow layout used absolute positioning to pin a second row of buttons at `top: 36px`. Replaced with `display: flex; flex-wrap: wrap`, scoped to article-list bodies (`body:is(.normal, .reader, .global)`) so the settings-page custom layout is untouched.

## Screenshots
**Wide viewport, before:**
<img width="950" height="32" alt="Screenshot 2026-04-30 at 18 26 49" src="https://github.com/user-attachments/assets/58635491-3d36-46af-b4ed-45ff8893bf5a" />

**Narrow viewport, before:**
<img width="738" height="72" alt="Screenshot 2026-04-30 at 18 31 02" src="https://github.com/user-attachments/assets/9b66df9e-8677-47f3-8dfe-011c070b0010" />

**Settings and sort buttons drift on scroll (before, any viewport):**
<img width="116" height="83" alt="Screenshot 2026-04-30 at 17 48 52" src="https://github.com/user-attachments/assets/27a5a2b6-3fe7-4ee8-8cfb-4f399937bedc" />

**Article title shifts down on hover (narrow viewport, before):**
<img width="287" height="43" alt="Screenshot 2026-04-30 at 19 31 53" src="https://github.com/user-attachments/assets/642be719-9f4f-4d83-9ba9-3f584fa7684d" />

**Narrow viewport, after:**
<img width="663" height="32" alt="Screenshot 2026-04-30 at 18 26 17" src="https://github.com/user-attachments/assets/9378fc68-9942-4b5e-af21-f10eb87c474b" />

## Related

- Possibly fixes #6977 (buttons squeezed together at mobile widths in Swage).

## Notes

- `swage.rtl.css` regenerated via `npm run rtlcss`.
- `npm run stylelint` passes.
- All six fixes are small CSS bugs in the Swage theme (most in narrow-viewport nav layout, one in article-list hover); bundled as one PR for that reason. Happy to split into separate PRs if reviewers prefer.

---

- box-sizing: border-box on .nav_menu to fix 32px horizontal overflow
  caused by width: 100% + padding-left: 2rem.
- Remove .flux:not(.current):hover .item .title { top: auto !important }
  override that dropped article titles to their in-flow position on
  hover (introduced in #4671 as collateral from a wider refactor).
- Make .header position: sticky and switch .item.configure (and
  #nav_menu_sort .dropdown-menu) to position: absolute with explicit
  top: 0 so the cog and sort menu no longer drift when scrolling.
- Fix .item .title -> .item.title selector typo so the logo is
  actually hidden in narrow view as intended.
- Hide the logo when the sidebar is collapsed
  (body:has(.aside:not(.visible))) to avoid overlap with the now-wider
  nav.
- Replace the two-row absolute-positioned narrow-view nav layout with
  display: flex; flex-wrap: wrap, scoped to article-list bodies so
  settings/admin pages keep their custom layout.

Regenerated swage.rtl.css via npm run rtlcss. npm run stylelint passes.

Co-authored-by: Bjørn A. Andersen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hacktoberfest hacktoberfest-accepted System care Everything related to system care UI 🎨 User Interfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Origine line-height with units

4 participants