From d70da8919962fdce6ad5a422002ab0d551e8ab84 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sat, 5 Dec 2020 22:43:43 +0000 Subject: [PATCH] fix: Mermaid and Plotly page overflow Mermaid and Plotly need to have their max-width constrained or they can overflow page width as they set their own fixed max-width in pixels, which can be wider than the page. One workaround is to set `grid-template-columns` to `100%`. Another is to set a responsive fixed max-width on their parent elements or article-container. Fix 1c05374 --- wowchemy/assets/js/wowchemy.js | 2 +- wowchemy/assets/scss/wowchemy/_root.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wowchemy/assets/js/wowchemy.js b/wowchemy/assets/js/wowchemy.js index e219902e..2cd55e98 100644 --- a/wowchemy/assets/js/wowchemy.js +++ b/wowchemy/assets/js/wowchemy.js @@ -453,7 +453,7 @@ $(document).ready(function () { isDarkTheme = false; } else { // The visitor does not have a day or night preference, so use the theme's default setting. - isDarkTheme = isSiteThemeDark; + isDarkTheme = window.wc.isSiteThemeDark; } renderThemeVariation(isDarkTheme); } diff --git a/wowchemy/assets/scss/wowchemy/_root.scss b/wowchemy/assets/scss/wowchemy/_root.scss index d22584f6..6e78c823 100644 --- a/wowchemy/assets/scss/wowchemy/_root.scss +++ b/wowchemy/assets/scss/wowchemy/_root.scss @@ -55,7 +55,7 @@ body.no-navbar { min-height: calc(100vh - 70px); display: grid; grid-template-rows: auto 1fr auto; - grid-template-columns: auto; + grid-template-columns: 100%; } @include media-breakpoint-down(md) { .page-wrapper {