From 3fe2bc8dab981da2daeb3f1389ca2915c3790366 Mon Sep 17 00:00:00 2001 From: Dallas Hogan Date: Wed, 9 Oct 2024 18:56:09 -0400 Subject: [PATCH] Center content --- assets/scss/_header.scss | 12 +++--------- assets/scss/_page.scss | 3 +++ assets/scss/_search.scss | 4 ++-- assets/scss/_variables.scss | 1 + 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/assets/scss/_header.scss b/assets/scss/_header.scss index d4537a6cc..0d0b05974 100644 --- a/assets/scss/_header.scss +++ b/assets/scss/_header.scss @@ -50,8 +50,8 @@ $page-header-height: 80px; grid-template-columns: max-content 1fr; grid-template-rows: auto; height: calc(var(--page-header-height) - 10px); - margin: 0 auto; - max-width: 800px; + margin: auto; + max-width: var(--mm-max-content-width); padding: 0 var(--mm-spacing); } @@ -147,12 +147,6 @@ $page-header-height: 80px; @include variables.breakpoint('md') { .nav { - margin: auto; - } -} - -@include variables.breakpoint('xl') { - .nav { - padding: 0 var(--mm-spacing) 0; + padding: 0 calc(var(--mm-spacing) / 2); } } diff --git a/assets/scss/_page.scss b/assets/scss/_page.scss index 815f00666..8c7585ccc 100644 --- a/assets/scss/_page.scss +++ b/assets/scss/_page.scss @@ -1,6 +1,9 @@ .page__wrapper { display: flex; height: 100%; + margin: auto; + max-width: var(--mm-max-content-width); + width: 100%; } .page__content { diff --git a/assets/scss/_search.scss b/assets/scss/_search.scss index 8d9af941e..f204a48d7 100644 --- a/assets/scss/_search.scss +++ b/assets/scss/_search.scss @@ -19,11 +19,11 @@ display: inline-block; left: calc(50% - 20px); margin: 0 calc(var(--mm-spacing) / 2); - max-width: calc(var(--mm-max-width) - 80px); + max-width: calc(var(--mm-max-content-width) - var(--mm-spacing) ); position: absolute; top: calc(50% + 5px); transform: translate(-50%, -50%); - width: calc(100% - (2 * var(--mm-spacing))); + width: calc(100% - (var(--mm-spacing))); z-index: 100; } diff --git a/assets/scss/_variables.scss b/assets/scss/_variables.scss index f2f0a3b85..4dadf50cd 100644 --- a/assets/scss/_variables.scss +++ b/assets/scss/_variables.scss @@ -52,6 +52,7 @@ $containers: ( --mm-layout-toc-width: 290px; --mm-layout-sidebar-width: 350px; --mm-max-width: 880px; + --mm-max-content-width: 1200px; --mm-outline: 2px solid var(--mm-color-logo-blue-light); --mm-overview-heading-drop-shadow: 1px 3px 0 rgba(0, 0, 0, 0.25); --mm-spacing: 40px;