Skip to content

Commit 5f55cda

Browse files
committed
Here's a summary of what was fixed in this session, focused on font sizes and whitespace:
Typography fixes (affecting both light and dark mode): h2 line-height: 1.5em (48px) β†’ 1.25 unitless (40px) β€” matches Docusaurus h3 line-height: 1.5em (36px) β†’ 1.25 unitless (30px) β€” matches Docusaurus h3 margin: 2rem 0 0.75rem (32px 0 12px) β†’ 1.875rem 0 1.25rem (30px 0 20px) β€” matches Docusaurus ul/ol margin: 20px 0 β†’ 0 0 1.25rem (bottom-only, matching Docusaurus) ul/ol padding-left: 26px β†’ 2rem (32px, matching Docusaurus) li margin/padding: 8px 0 / 0 0 0 6px β†’ 0 / 0 β€” matches Docusaurus Inline code font-weight: 600 β†’ inherit (700 in headings, 400 in paragraphs) pre margin: 1.25rem 0 β†’ 0 0 1.25rem (bottom-only, matching Docusaurus) Footer font-size: 0.75rem (12px) β†’ 1rem (16px) β€” matches Docusaurus Page nav margin-top: 2rem (32px) β†’ 48px β€” matches Docusaurus Page nav padding: 2rem 0 (32px) β†’ 0 β€” matches Docusaurus Visual parity: 94.74% β†’ 96.97% (+2.23pp)
1 parent 5fbb52a commit 5f55cda

3 files changed

Lines changed: 17 additions & 12 deletions

File tree

β€Žsite_jaspr/lib/components/page_navigation.dartβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class PageNavigation extends StatelessComponent {
5252
css('.page-nav', [
5353
css('&').styles(
5454
display: Display.flex,
55-
padding: Padding.symmetric(vertical: 2.rem),
56-
margin: Margin.only(top: 2.rem),
55+
padding: Padding.zero,
56+
margin: Margin.only(top: 48.px),
5757
border: Border.only(top: BorderSide(color: Color('#0000000d'), width: 1.px)),
5858
gap: Gap(column: 0.75.rem),
5959
),

β€Žsite_jaspr/lib/components/site_footer.dartβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class SiteFooter extends StatelessComponent {
115115
padding: Padding.all(2.rem),
116116
color: Color('#606770'),
117117
textAlign: TextAlign.center,
118-
fontSize: 0.75.rem,
118+
fontSize: 1.rem,
119119
backgroundColor: Colors.white,
120120
),
121121
css('a').styles(

β€Žsite_jaspr/lib/styles/site_styles.dartβ€Ž

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,12 @@ List<StyleRule> get siteStyles => [
5555
css('.content h2').styles(
5656
fontSize: 2.rem,
5757
fontWeight: FontWeight.w700,
58-
lineHeight: 1.5.em,
59-
raw: {'margin': '2.5rem 0 1.25rem'},
58+
raw: {'margin': '2.5rem 0 1.25rem', 'line-height': '1.25'},
6059
),
6160
css('.content h3').styles(
6261
fontSize: 1.5.rem,
6362
fontWeight: FontWeight.w700,
64-
lineHeight: 1.5.em,
65-
raw: {'margin': '2rem 0 0.75rem'},
63+
raw: {'margin': '1.875rem 0 1.25rem', 'line-height': '1.25'},
6664
),
6765
css('.content h4').styles(
6866
fontSize: 1.25.rem,
@@ -73,6 +71,15 @@ List<StyleRule> get siteStyles => [
7371
css('.content').styles(raw: {'line-height': '1.65'}),
7472
// Paragraphs: Docusaurus uses bottom-only margin (1.25rem); Jaspr default is top+bottom
7573
css('.content p').styles(raw: {'margin': '0 0 1.25rem'}),
74+
// Lists: match Docusaurus/Infima spacing (bottom-only margin, left padding)
75+
css('.content ul, .content ol').styles(
76+
margin: Margin.only(top: Unit.zero, bottom: 1.25.rem),
77+
raw: {'padding-left': '2rem'},
78+
),
79+
css('.content li').styles(
80+
padding: Padding.zero,
81+
margin: Margin.zero,
82+
),
7683
// Remove backtick pseudo-elements and quote marks (Docusaurus doesn't have these)
7784
css('.content code::before').styles(raw: {'content': 'none'}),
7885
css('.content code::after').styles(raw: {'content': 'none'}),
@@ -92,6 +99,7 @@ List<StyleRule> get siteStyles => [
9299
raw: {
93100
'background-color': 'rgba(0, 0, 0, 0.06)',
94101
'font-family': 'var(--ifm-font-family-monospace)',
102+
'font-weight': 'inherit',
95103
},
96104
),
97105
// Pre/code blocks: match Docusaurus sizing (15.2px font, 22px line-height)
@@ -103,7 +111,7 @@ List<StyleRule> get siteStyles => [
103111
raw: {
104112
'font-family': 'var(--ifm-font-family-monospace)',
105113
'line-height': '1.45',
106-
'margin': '1.25rem 0',
114+
'margin': '0 0 1.25rem',
107115
},
108116
),
109117
css('.content pre code').styles(
@@ -481,10 +489,7 @@ List<StyleRule> get siteStyles => [
481489
// Docusaurus: footer margin-top 64px, pagination margin-top 48px.
482490
// ───────────────────────────────────────────────────────────────────────
483491
css('.site-footer').styles(margin: Margin.only(top: 4.rem)),
484-
css('.page-nav').styles(
485-
padding: Padding.zero,
486-
margin: Margin.only(top: 3.rem),
487-
),
492+
// page-nav spacing is set in PageNavigation.styles (48px margin-top, zero padding)
488493
// Page nav "Previous"/"Next" label: muted gray (matching Docusaurus #525860)
489494
css('.page-nav-label').styles(color: Color('#525860')),
490495
// Dark mode: page nav prev/next blocks

0 commit comments

Comments
Β (0)