Skip to content

refactor: Define semantic font family LESS vars - #11540

Merged
mekarpeles merged 2 commits into
internetarchive:masterfrom
lokesh:css-cleanup-3
Jan 6, 2026
Merged

refactor: Define semantic font family LESS vars#11540
mekarpeles merged 2 commits into
internetarchive:masterfrom
lokesh:css-cleanup-3

Conversation

@lokesh

@lokesh lokesh commented Dec 2, 2025

Copy link
Copy Markdown
Collaborator

#11555

Creates a set of semantic font family variables.
Their names communicate where they should be used. This provides a single point of control for updating font families across the app.

A separate PR will update the codebase to utilize the new variables.

@font-family-body: @font-family-sans; // body text, paragraphs, lists
@font-family-code: @font-family-mono; // code, pre, inline code
@font-family-title: @font-family-serif; // large text in banners and hero sections, book titles
@font-family-subtitle: @font-family-sans; // small text in banners and hero sections, book subtitles
@font-family-heading: @font-family-sans; // headings in body text
@font-family-subheading: @font-family-sans; // subheadings in body text
@font-family-button:  @font-family-sans; // buttons

Technical

These new variables continue to use LESS, but in the future we can convert them in one fell swoop to CSS custom properties.

Screenshot

These should be no visual change.

Production
openlibrary org_works_OL138052W_Alice's_Adventures_in_Wonderland_edition=key%3A_books_OL26280315M

Local dev environment with PR applied
localhost_8080_books_OL23269118M_Alice%27s_adventures_in_Wonderland

Stakeholders

@cdrini @mekarpeles @jimchamp

@benbdeitch @RayBB @jdlrobson

will follow-up to utilizes these new variables across codebase
@mekarpeles

Copy link
Copy Markdown
Member

This seems like a great change to me.

@RayBB

RayBB commented Dec 9, 2025

Copy link
Copy Markdown
Collaborator

+1 it looks like the right direction but I'm not the CSS guru

@mekarpeles mekarpeles self-assigned this Dec 15, 2025
@mekarpeles
mekarpeles merged commit b5d7f7c into internetarchive:master Jan 6, 2026
4 checks passed
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.

3 participants