From c9d7f5e81bab24889a1b65536a63dd7fe9cfe9e9 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Sat, 7 Mar 2020 00:21:26 +0100 Subject: [PATCH 1/3] Rework pre elements --- static/css/style.css | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index 066043c..acb0d87 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -702,8 +702,8 @@ tt { font-family: 'Fira Mono', monospace, sans-serif; font-size: 0.75em; white-space: pre; - background: #faf9f7; - border: 1px solid #e5e4e1; + background: #343642; + color: #C1C2C3; top: -2px } @@ -714,13 +714,18 @@ pre { overflow: hidden; font-family: Fira Mono, monospace, sans-serif; white-space: pre; - background: #faf9f7; - border: 1px solid #e5e4e1; box-sizing: border-box; font-size: .80em; width:110%; margin-left: -5% +} +pre code, pre tt { + margin:0; + padding:0; + background:transparent; + overflow: scroll; + border:none; } pre .lines { @@ -744,21 +749,6 @@ pre .lines .line { color: #45484d } -pre code, -pre tt { - position: static; - top: auto; - margin: -1.333em -1.333em -1.333em 1.333em; - padding: 1.333em; - overflow: scroll; - font-size: 0.75em; - line-height: 2em; - white-space: pre; - background: transparent; - border: none; - vertical-align: inherit -} - kbd { display: inline-block; margin-bottom: 0.5em; From 529ac7d50b9d7779fb950053d121f86279d28029 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Sat, 7 Mar 2020 00:22:25 +0100 Subject: [PATCH 2/3] Remove old tt and kbd css rules --- static/css/style.css | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index acb0d87..e3d9b90 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -720,7 +720,7 @@ pre { margin-left: -5% } -pre code, pre tt { +pre code { margin:0; padding:0; background:transparent; @@ -749,20 +749,6 @@ pre .lines .line { color: #45484d } -kbd { - display: inline-block; - margin-bottom: 0.5em; - padding: 1px 8px; - border: #e5e4e1 1px solid; - color: #45484d; - text-shadow: #fff 0 1px 0; - font-size: 0.9em; - font-weight: bold; - background: #faf9f7; - border-radius: 4px; - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 0 #fff inset -} - table { width: 100%; max-width: 100%; From 4ac3d4c5b54ffd34de548ee562fa9a72af710bb3 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Sat, 7 Mar 2020 00:38:30 +0100 Subject: [PATCH 3/3] Arrange pre and code rules --- static/css/style.css | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index e3d9b90..11d2721 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -694,17 +694,14 @@ mark { background-color: #ffc336 } -code, -tt { +code { position: relative; margin: 0 0.333em; - padding: 0.333em 0.666em; + padding: 0.222em 0.666em; font-family: 'Fira Mono', monospace, sans-serif; - font-size: 0.75em; + font-size: 0.80em; white-space: pre; - background: #343642; - color: #C1C2C3; - top: -2px + background: #faf9f7; } pre { @@ -715,7 +712,6 @@ pre { font-family: Fira Mono, monospace, sans-serif; white-space: pre; box-sizing: border-box; - font-size: .80em; width:110%; margin-left: -5% }