Repository navigation
Give sections more room with a spacing scale - #62
Merged
Merged
Conversation
- Add --space-1..12 (4px base) plus --section-gap, --heading-gap and page padding tokens - Separate hero, leaderboards, features and chart/table sections by 80px (48px on small screens) - Give headings, tab bar, notes, badges, chart card, pager and footer consistent gaps - Remove the dead .repo-table margin
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.
Context
Sections on the home page ran into each other. There were about 48px between the hero and "Projects reporting to Shepherd", and about 44px between the leaderboard table and "Shepherd is one part of Psalm". The project page had the same problem: the badges sat 2px from the note, and the chart sat close to the "Reports" heading. Gaps were set one by one, so the rhythm wasn't consistent.
Solution
I added a spacing scale (
--space-1…--space-12, 4px to 96px) plus section-level tokens (--section-gap,--heading-gap,--page-top,--page-bottom), and used them across the pages. Major sections are now 80px apart on desktop and 48px on small screens. Headings sit closer to their content than to the section above, so each heading groups with what follows.Key changes (desktop):
Only spacing changed: colours, type, markup and JS are untouched. The leaderboard tabs keep identical column widths and panel height, and nothing shifts when switching tabs.