Skip to content

Commit 5a2954a

Browse files
committed
Grid: Center justify text content
Move breadcrumb into same element as text content to allow it to follow the content on larger screens. Slightly increase gutter gap on larger screens.
1 parent 78599a2 commit 5a2954a

File tree

6 files changed

+30
-17
lines changed

6 files changed

+30
-17
lines changed

assets/css/v2/style.css

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,8 @@ nav {
353353
.content-layout {
354354
display: grid;
355355
grid-template-columns: 1fr 1fr;
356-
grid-template-rows: var(--breadcrumb-max-height) 1fr;
356+
grid-template-rows: 1fr;
357357
z-index: 1;
358-
margin-top: 2rem;
359358
}
360359

361360
.docs-container {
@@ -427,6 +426,7 @@ nav {
427426

428427
@media (min-width: 88em) {
429428
.base-layout {
429+
--grid-column-gutter: 4rem;
430430
display: grid;
431431
grid-template-rows: repeat(2, auto);
432432
column-gap: var(--grid-column-gutter);
@@ -435,6 +435,7 @@ nav {
435435

436436
.text-content {
437437
grid-template-columns: var(--grid-content) var(--grid-side-callout);
438+
grid-template-rows: 70px auto;
438439
column-gap: var(--grid-column-gutter);
439440
}
440441

@@ -450,7 +451,14 @@ nav {
450451

451452
.content-layout {
452453
display: grid;
453-
grid-template-columns: var(--grid-content) var(--grid-side-callout);
454+
grid-template-columns: 1fr minmax(
455+
auto,
456+
calc(
457+
var(--grid-content) +
458+
var(--grid-side-callout) +
459+
var(--grid-column-gutter)
460+
)
461+
) 1fr;
454462
column-gap: var(--grid-column-gutter);
455463
}
456464

@@ -472,6 +480,11 @@ nav {
472480
}
473481
}
474482

483+
/* Handles different flow-gap of list page */
484+
.list-page.text-content {
485+
grid-template-rows: calc(70px + var(--flow-gap)) auto;
486+
}
487+
475488
.api {
476489
margin: 2rem 0 2rem 2rem;
477490
width: 100%;

layouts/_default/docs.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
</div>
2323

2424
<section class="content-layout">
25-
<section class="breadcrumb-layout" data-mf="true" style="display: none;">
26-
{{ if not .IsHome }}
27-
{{ if not (in .Params.display_breadcrumb "false" ) }}
28-
{{ partial "breadcrumb" .}}
29-
{{ end }}
30-
{{ end }}
31-
</section>
3225
<div class="text-content">
26+
<section class="breadcrumb-layout" data-mf="true" style="display: none;">
27+
{{ if not .IsHome }}
28+
{{ if not (in .Params.display_breadcrumb "false" ) }}
29+
{{ partial "breadcrumb" .}}
30+
{{ end }}
31+
{{ end }}
32+
</section>
3333
<h1>{{ .Title }}</h1>
3434
{{ .Content }}
3535
{{ if eq .Page.Draft true }}{{ partial "draft-badge.html" . }}{{ end }}

layouts/_default/list.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
</div>
2020

2121
<section class="content-layout" data-mf="true" style="display: none">
22-
<section class="breadcrumb-layout">
23-
{{ if not .IsHome }}
24-
{{ if not (in .Params.display_breadcrumb "false" ) }}
25-
{{ partial "breadcrumb" .}}
26-
{{ end }}
27-
{{ end }}
28-
</section>
2922
<div class="text-content list-page">
23+
<section class="breadcrumb-layout">
24+
{{ if not .IsHome }}
25+
{{ if not (in .Params.display_breadcrumb "false" ) }}
26+
{{ partial "breadcrumb" .}}
27+
{{ end }}
28+
{{ end }}
29+
</section>
3030
<h1>{{ .Title }}</h1>
3131
{{ .Content }}
3232

Loading
Loading
Loading

0 commit comments

Comments
 (0)