From 278bdae3561b549ac04519517b272ae684d31691 Mon Sep 17 00:00:00 2001 From: Xevion Date: Tue, 20 Sep 2022 16:53:55 -0500 Subject: [PATCH] Fix horizontal scroll overflow due to header animation The header is now moved up and outside of the body container, now allowing the header to take up a max of 100% of the viewport width. With overflow set to hidden, the animation will go outside the viewport but won't create a scrollbar anymore. --- _layouts/default.html | 2 +- _sass/glitch.scss | 11 ++++++++--- _sass/main.scss | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index 4fa4d5e..d5b544e 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -2,8 +2,8 @@ layout: base --- +{% include header.html %}
- {% include header.html %} {% if page.hide_header or layout.hide_header %} {% else %} {% if page.title %} diff --git a/_sass/glitch.scss b/_sass/glitch.scss index 6b785d0..93998ef 100644 --- a/_sass/glitch.scss +++ b/_sass/glitch.scss @@ -1,6 +1,11 @@ -.stack { - display: grid; - grid-template-columns: 1fr; + +header { + max-width: 100vw; + .stack { + overflow: hidden; + display: grid; + grid-template-columns: 1fr; + } } .stack span { diff --git a/_sass/main.scss b/_sass/main.scss index b648392..ae14872 100644 --- a/_sass/main.scss +++ b/_sass/main.scss @@ -34,7 +34,7 @@ html { } body { - padding: 0 1em; + padding: 0; font-family: CMU Serif, serif; line-height: 1.5; background: #0e0e0e;