Skip to content

Fix 2546: display two lines instead of three in header wraps - #2549

Open
javiercoronadonarvaez wants to merge 2 commits into
developfrom
javiercoronarv/2546-learn-header-fix
Open

Fix 2546: display two lines instead of three in header wraps#2549
javiercoronadonarvaez wants to merge 2 commits into
developfrom
javiercoronarv/2546-learn-header-fix

Conversation

@javiercoronadonarvaez

@javiercoronadonarvaez javiercoronadonarvaez commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Issue: #2546

Summary & Context

Fixes the Learn page heading wrapping to three lines on desktop instead of the two-line layout in the Figma design, while keeping the header aligned with the card row below it.

Changes

  • Applied the intended condensed font width to the Learn page heading via font-variation-settings: "wdth" 84 in static/css/v3/learn-page.css.
  • Kept the header column at calc(50% - .5 * var(--space-card)) so it stays aligned with the card row below.

‼️ Risks & Considerations ‼️

Please list any potential risks or areas that need extra attention during review/testing

  • The browser renders Mona Sans wider than the Figma mock (which shows a condensed rendering), so the two-line layout relies on the condensed wdth 84 width. This holds across the desktop range (header column ~604px at 1280px up to 684px at 1440px+).
  • Below the 1280px breakpoint (tablet), the 50% column keeps shrinking and the heading reflows to three lines. Out of scope for this desktop-focused fix.

Screenshots

1280 px Width

width1280

1440 px Width

width1440

Self-review Checklist

  • Tag at least one team member from each team to review this PR
  • Link this PR to the related GitHub Project ticket

Frontend

  • UI implementation matches Figma design
  • Tested in light and dark mode
  • Responsive / mobile verified
  • Accessibility checked (keyboard navigation, etc.)
  • Ensure design tokens are used for colors, spacing, typography, etc. – No hardcoded values
  • Test without JavaScript (if applicable)
  • No console errors or warnings

Summary by CodeRabbit

  • Style
    • Reformatted and normalized Learn page layout styles for improved consistency.
    • Updated spacing and typography values to use standardized variables (including tighter header letter spacing).
    • Preserved existing responsive behavior and overall visual styling.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6728a2c6-7b4e-4c86-a1fc-e7de249f8887

📥 Commits

Reviewing files that changed from the base of the PR and between 268a0f6 and cbbe6ce.

📒 Files selected for processing (1)
  • static/css/v3/learn-page.css

📝 Walkthrough

Walkthrough

The Learn page CSS is reformatted across header, card grid, masonry, and responsive rules. A calc() term is normalized from .5 to 0.5, and the header heading uses the shared tight letter-spacing variable.

Changes

Learn page CSS

Layer / File(s) Summary
Layout style normalization
static/css/v3/learn-page.css
Header, card grid, masonry, and responsive CSS rules are re-indented and reflowed; the calc() term is normalized and learn-page-header h1 adopts var(--letter-spacing-tight).

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related issues

  • boostorg/website-v2#2546 — Updates the Learn page header letter spacing associated with the issue’s text-wrapping behavior.

Suggested reviewers: jlchilders11

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main UI change: reducing the Learn page heading wrap from three lines to two on desktop.
Description check ✅ Passed The description matches the template well, including issue number, summary, changes, risks, screenshots, and checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch javiercoronarv/2546-learn-header-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@javiercoronadonarvaez
javiercoronadonarvaez marked this pull request as ready for review July 24, 2026 01:47

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@static/css/v3/learn-page.css`:
- Around line 33-35: Remove the empty line between the font-size and font-weight
declarations in the affected CSS rule so it satisfies the
declaration-empty-line-before Stylelint rule.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 00fe67cf-7093-4dba-aa78-b468f899a43e

📥 Commits

Reviewing files that changed from the base of the PR and between 28c0d13 and 268a0f6.

📒 Files selected for processing (1)
  • static/css/v3/learn-page.css

Comment on lines +33 to +35
font-size: var(--font-size-large);

font-weight: var(--font-weight-regular);
line-height: var(--line-height-loose-alt);
/* 31.92px */
letter-spacing: -0.24px;
font-weight: var(--font-weight-regular);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the empty line before font-weight.

Stylelint reports declaration-empty-line-before at Line 35. Remove the blank line between font-size and font-weight to keep the stylesheet lint-clean.

Proposed fix
   font-size: var(--font-size-large);
-
   font-weight: var(--font-weight-regular);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
font-size: var(--font-size-large);
font-weight: var(--font-weight-regular);
line-height: var(--line-height-loose-alt);
/* 31.92px */
letter-spacing: -0.24px;
font-weight: var(--font-weight-regular);
font-size: var(--font-size-large);
font-weight: var(--font-weight-regular);
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 35-35: Expected no empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@static/css/v3/learn-page.css` around lines 33 - 35, Remove the empty line
between the font-size and font-weight declarations in the affected CSS rule so
it satisfies the declaration-empty-line-before Stylelint rule.

Source: Linters/SAST tools

@javiercoronadonarvaez javiercoronadonarvaez changed the title Task 2546: display two lines instead of three in header wraps Fix 2546: display two lines instead of three in header wraps Jul 24, 2026

@julhoang julhoang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for the code formatting up on this file too btw! ✨

letter-spacing: -0.64px;
margin: 0;
align-self: stretch;
font-variation-settings: "wdth" 84;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this width value should be 95, but that's already the default width that we have implemented in static/css/v3/fonts.css as font-stretch: 95% so we don't need to reset it here.

Image

What I suspect might be causing the issue here is just a few pixels difference in the learn-page-header div or learn-page-container div that pushes "anything" to the next line. Would you mind helping us check that? 🙏

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@julhoang I tested at the exact Figma column width of 696 px and even configuring wdth 95 explicitely, Chrome still wraps the text as a three liner. It appears Blink renders Mona Sans wider than Figma at wdth 95. In that sense, it's a font rendering gap, rather than one introduced by setting the container width.

What do you think? Should I experiment and tune the value, or explore an alternative so as not to override the width axis?

Comment thread static/css/v3/learn-page.css Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Learn Page Header Wraps to Three Lines Instead of Two on Desktop

2 participants