Skip to content

refactor: Define primitive and semantic spacing variables#12116

Merged
RayBB merged 2 commits intointernetarchive:masterfrom
lokesh:tokens-spacing
Mar 23, 2026
Merged

refactor: Define primitive and semantic spacing variables#12116
RayBB merged 2 commits intointernetarchive:masterfrom
lokesh:tokens-spacing

Conversation

@lokesh
Copy link
Copy Markdown
Collaborator

@lokesh lokesh commented Mar 17, 2026

Task from #11555

Creates a set of spacing variables that provide a single point of control for updating spacing across the app.

In this PR we utilize the new variables in two of our web components: ol-pagination and ol-read-more.

No visual change in these cases.

Testing

<ol-pagination> and <ol-read-more> web components should render similarly. There is the possibility of small spacing changes as we align values to our new system, but this should not cause anything to appear broken. https://testing.openlibrary.org/developers/design

Screenshot

image

Stakeholders

@lokesh lokesh changed the title Tokens spacing refactor: Define primitive and semantic spacing variables Mar 17, 2026
@lokesh lokesh added the Theme: Design Issues related to UI design, branding, etc. [managed] label Mar 17, 2026
@lokesh lokesh marked this pull request as ready for review March 17, 2026 23:04
@github-project-automation github-project-automation bot moved this to Waiting Review/Merge from Staff in Ray's Project Mar 23, 2026
Copy link
Copy Markdown
Collaborator

@RayBB RayBB left a comment

Choose a reason for hiding this comment

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

Tested and all looks good to me

In OlPagination.js, the padding changed from 0.2em 0.6em to var(--spacing-inset-xs) var(--spacing-inset-sm):

  • Old: ~2.8px 8.4px (em-based, depends on font-size)
  • New: 4px 8px (fixed pixels)

Though, this is small and probably intentional.

Perhaps it's worth looking into if there's a tool that can automatically migrate some of the things like this in a pre-commit hook so that when someone sets it to be four pixels it actually sets it to the correct variable but that would be more work and a separate issue.

@RayBB RayBB merged commit 66a02c4 into internetarchive:master Mar 23, 2026
3 checks passed
@github-project-automation github-project-automation bot moved this from Waiting Review/Merge from Staff to Done in Ray's Project Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

On Testing Theme: Design Issues related to UI design, branding, etc. [managed]

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants