Skip to content

refactor: Define Line Height LESS vars - #11619

Merged
mekarpeles merged 4 commits into
internetarchive:masterfrom
lokesh:css-line-heights
Jan 6, 2026
Merged

refactor: Define Line Height LESS vars#11619
mekarpeles merged 4 commits into
internetarchive:masterfrom
lokesh:css-line-heights

Conversation

@lokesh

@lokesh lokesh commented Dec 23, 2025

Copy link
Copy Markdown
Collaborator

#11555

Creates a set of primitive and semantic line-height variables.
With the semantic variables, their names communicate where they should be used. This provides a single point of control for updating line heights across the app.

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

@line-height-display: @line-height-tight; // hero sections, very large titles
@line-height-heading: @line-height-snug; // section headings (h2-h6)
@line-height-title: @line-height-snug; // result titles / work titles (often wrap)

@line-height-body: @line-height-normal; // paragraphs, default text
@line-height-meta: @line-height-snug; // bylines, counts, timestamps, secondary text (search cards)

@line-height-list: @line-height-relaxed; // multi-line lists of links/subjects (subject pages)
@line-height-table: @line-height-snug; // edition detail grids / data tables
@line-height-code: @line-height-normal; // code, pre

@line-height-control: @line-height-tight; // buttons, form labels, nav items (wrapping allowed)
@line-height-chip: @line-height-single; // badges/tags/pills (only when single-line)

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

No visual change.

Stakeholders

@cdrini @mekarpeles @jimchamp

@mekarpeles mekarpeles self-assigned this Dec 29, 2025
@mekarpeles

Copy link
Copy Markdown
Member

Looks good to the team, will throw on testing and if everything looks good / the same, we'll merge. Thank you!

@mekarpeles
mekarpeles merged commit 4b32ca3 into internetarchive:master Jan 6, 2026
4 checks passed
mystic-06 pushed a commit to mystic-06/openlibrary that referenced this pull request Jan 11, 2026
* feat: Add line-heights.less import to index.less for improved styling management
* chore: Update line-height variables for improved typography consistency
* refactor: Enhance line-height definitions for better semantic usage and readability
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.

2 participants