From f18cc1d7ab385a07ad87c4c2623438104942d281 Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Fri, 19 Mar 2021 23:04:16 +0100 Subject: [PATCH] Fixed overflow due to navbar links and pre > code blocks being too large Signed-off-by: Louis Vallat --- README.md | 1 - src/assets/css/style.css | 25 +++++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 029c65c..a7fcaa5 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ - [ ] Add dark and light theme switch and colors - [ ] Fix article order - [ ] Add article date support -- [ ] Fix horizontal overflow with pre > code blocks on mobile ## Sources diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 112b1f1..09233e4 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -48,7 +48,7 @@ p, ul { line-height: 1.55em; } -li > ul { +li>ul { margin-top: 0; margin-left: 15px; list-style-type: circle; @@ -78,23 +78,24 @@ nav { justify-content: space-between; margin-top: 10px; margin-bottom: 10px; + flex-wrap: wrap; } .filler { flex-grow: 2; } -nav > a { +nav>a { font-family: 'Open Sans', sans-serif; padding: 10px; } -nav > a:visited, nav > a:hover, nav > a { +nav>a:visited, nav>a:hover, nav>a { color: var(--fg); text-decoration: none; } -nav > a:not(#home_link) { +nav>a:not(#home_link) { margin-left: 25px; } @@ -156,10 +157,9 @@ pre { margin-top: 5px; } -pre > code { +pre>code { padding: 10px; - display: inline-block; - width: 100%; + display: block; overflow: auto; line-height: 1.35em; } @@ -176,6 +176,9 @@ code { margin-right: 10vw; margin-left: 10vw; } + nav>a:not(#home_link) { + margin-left: 5px; + } } @media screen and (max-width: 768px) { @@ -183,4 +186,10 @@ code { margin-right: 5vw; margin-left: 5vw; } -} + nav>a:not(#home_link) { + margin-left: 0px; + } + blockquote { + margin-left: 0px; + } +} \ No newline at end of file