refactor: Define primitive and semantic spacing variables#12116
Merged
RayBB merged 2 commits intointernetarchive:masterfrom Mar 23, 2026
Merged
refactor: Define primitive and semantic spacing variables#12116RayBB merged 2 commits intointernetarchive:masterfrom
RayBB merged 2 commits intointernetarchive:masterfrom
Conversation
14 tasks
RayBB
approved these changes
Mar 23, 2026
Collaborator
RayBB
left a comment
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/designScreenshot
Stakeholders