Skip to content

Commit fdd8fa3

Browse files
committed
docs: center landing identity and search
1 parent 46eb4bb commit fdd8fa3

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

docs-site/app/global.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ a[data-active='true'],
528528
display: grid;
529529
gap: var(--space-lg);
530530
width: min(100%, 58rem);
531+
margin-inline: auto;
531532
border-bottom: 1px solid var(--color-rule);
532533
padding: var(--space-lg) var(--space-md) var(--space-xl);
533534
}
@@ -937,7 +938,7 @@ a[data-active='true'],
937938
}
938939

939940
.site-header {
940-
grid-template-columns: 15.5rem minmax(18rem, 42rem) minmax(9rem, 1fr);
941+
grid-template-columns: minmax(0, 1fr) minmax(18rem, 42rem) minmax(0, 1fr);
941942
gap: var(--space-lg);
942943
padding-inline: var(--space-md);
943944
}
@@ -985,6 +986,12 @@ a[data-active='true'],
985986
}
986987
}
987988

989+
@media (min-width: 90rem) {
990+
.docs-home-hero {
991+
transform: translateX(calc(var(--fd-sidebar-width) / -2));
992+
}
993+
}
994+
988995
@media (prefers-reduced-motion: reduce) {
989996
*,
990997
*::before,

docs-site/design.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ named tokens rather than raw spacing values.
7878
- The green and cyan signal roles.
7979
- IBM Plex Sans and Fira Code.
8080
- The same control geometry and focus treatment.
81+
- The desktop search stays centred on the visible page. The large wordmark
82+
centres in the unobstructed docs canvas, then centres on the full page once
83+
the viewport is wide enough to clear the persistent sidebar.
8184
- Stacked section headings without slash ornaments, decorative eyebrows, or
8285
hanging chapter labels.
8386

docs-site/scripts/check-export.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,21 @@ assert.doesNotMatch(banner, /[█▄▀]/, 'banner block art still depends on fo
126126
assert.match(occ, /<rect\b/, 'OCC mark has no rectangle geometry');
127127
assert.match(banner, /<rect\b/, 'banner has no rectangle geometry');
128128
assert.match(sourceCss, /designed-as-app/, 'Hallmark app-system stamp is missing');
129+
assert.match(
130+
sourceCss,
131+
/\.docs-home-hero\s*\{[^}]*margin-inline:\s*auto;/s,
132+
'wordmark container is missing automatic inline margins',
133+
);
134+
assert.match(
135+
sourceCss,
136+
/@media\s*\(min-width:\s*90rem\)\s*\{[\s\S]*?\.docs-home-hero\s*\{[^}]*transform:\s*translateX\(calc\(var\(--fd-sidebar-width\)\s*\/\s*-2\)\);/,
137+
'wide-screen wordmark does not compensate for the sidebar',
138+
);
139+
assert.match(
140+
sourceCss,
141+
/grid-template-columns:\s*minmax\(0,\s*1fr\)\s+minmax\(18rem,\s*42rem\)\s+minmax\(0,\s*1fr\);/,
142+
'desktop search is not centred between equal outer tracks',
143+
);
129144

130145
assert.ok(rootHtml.includes(`href="${basePath}/docs/"`), 'site root does not link to docs');
131146
assert.ok(rootHtml.includes(`url=${basePath}/docs/`), 'site root does not redirect to docs');

0 commit comments

Comments
 (0)