Fix 2546: display two lines instead of three in header wraps - #2549
Fix 2546: display two lines instead of three in header wraps#2549javiercoronadonarvaez wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Learn page CSS is reformatted across header, card grid, masonry, and responsive rules. A ChangesLearn page CSS
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
static/css/v3/learn-page.css
| 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); |
There was a problem hiding this comment.
📐 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.
| 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
julhoang
left a comment
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
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? 🙏
There was a problem hiding this comment.
@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?
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
font-variation-settings: "wdth" 84instatic/css/v3/learn-page.css.calc(50% - .5 * var(--space-card))so it stays aligned with the card row below.Please list any potential risks or areas that need extra attention during review/testing
wdth 84width. This holds across the desktop range (header column ~604px at 1280px up to 684px at 1440px+).Screenshots
1280 px Width
1440 px Width
Self-review Checklist
Frontend
Summary by CodeRabbit