refactor(css): replace raw em values with tokens in headings.css#12374
Conversation
|
Thanks for the contribution, @Armansiddiqui9! 🤖 Copilot has been assigned for an initial review. The linked issue (#12372) hasn't been triaged yet — triage happens on Mondays and Fridays. There are currently 75 open non-draft PRs ahead of yours. PR triage checklist (maintainers / Pam)
Note This comment was automatically generated by Pam, Open Library's Project AI Manager, on behalf of @mekarpeles. Pam is designed to provide status visibility, perform basic project management functions and relevant codebase research, and provide actionable feedback so contributors aren't left waiting. |
There was a problem hiding this comment.
Pull request overview
Refactors headings.css to replace raw em font sizes with design-token variables and re-establish a consistent heading size hierarchy (notably increasing h3 so it’s no longer smaller than body text).
Changes:
- Replaced raw
emvalues in heading styles with--font-size-*design tokens. - Adjusted heading font-size assignments to follow a large → small scale (e.g.,
h2,h3,h4, etc.).
for more information, see https://pre-commit.ci
|
Seems like a very positive change; in the issue, @RayBB tags @lokesh; I agree and am happy to defer to his decision on sizing! Thank you @Armansiddiqui9 for the PR! |
Closes #12372
@mekarpeles adds via @jimchamp: and possibly closes #5349
refactor
Technical
Replaces all raw
emvalues inheadings.csswith design tokens andrestores correct heading hierarchy. The core bug was
h3using--font-size-label-medium(12px) — smaller than body text.Heading Scale After This PR
--font-size-headline-large--font-size-headline-small--font-size-title-large--font-size-title-medium--font-size-title-small--font-size-label-mediumChanges
static/css/base/headings.cssonly — no other files touchedTesting
Run npm run lint:css — should pass with no errors
Run npm run build-assets:css — should compile successfully
Visit localhost:8080 and check
Screenshot
Before


After
Stakeholders
@RayBB @lokesh