From bb60c58e4c20d757db792cda328655a303ca80de Mon Sep 17 00:00:00 2001 From: Huy Tran Date: Fri, 30 Nov 2018 08:29:59 +1100 Subject: [PATCH] revise styles for pre and code --- assets/scss/hyde-hyde/_code.scss | 18 ++++++------------ assets/scss/hyde-hyde/_variables.scss | 8 ++++---- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/assets/scss/hyde-hyde/_code.scss b/assets/scss/hyde-hyde/_code.scss index ccc2eec..3940ed1 100644 --- a/assets/scss/hyde-hyde/_code.scss +++ b/assets/scss/hyde-hyde/_code.scss @@ -15,14 +15,13 @@ pre { %code-font { font-family: $code-font-family; font-size: $code-font-size; - //line-height: $code-line-height; } %code-in-rounded-box { border-radius: 4px; padding: 2px 4px; - color: $code-color; - background-color: $code-background-color; + color: #bf616a; + background-color: #f9f2f4; } %code-style-codersblock { @@ -32,9 +31,8 @@ pre { } %code-style-npf { - padding: .25em .5em; - color: #bf616a; - background-color: #f9f9f9; + padding: .1em .1em; + color: #ab5979; border-radius: 3px; } @@ -43,11 +41,6 @@ a { color: $link-color; } } -//-code { -// white-space: pre-wrap; -// @extend %code-font; -// @extend %code-in-rounded-box; -//} code { @extend %code-font; @@ -56,8 +49,9 @@ code { // highlight.js .hljs { + font-family: $code-font-family; font-size: $code-fence-font-size; - font-weight: 300; + line-height: $root-line-height; white-space: pre; border: 1px solid $gray-3; border-radius: 4px; diff --git a/assets/scss/hyde-hyde/_variables.scss b/assets/scss/hyde-hyde/_variables.scss index e7ae6e5..6e5306c 100644 --- a/assets/scss/hyde-hyde/_variables.scss +++ b/assets/scss/hyde-hyde/_variables.scss @@ -34,7 +34,7 @@ $body-bg: #fff; $border-color: #e5e5e5; $large-breakpoint: 38em; -$large-font-size: 20px; +$large-font-size: 19px; $font-scale-dot7: .7rem; $font-scale-dot8: .8rem; // @@ -44,11 +44,11 @@ $small-device-font-size: $root-font-size; $large-device-font-size: $large-font-size; // https://www.client9.com/css-system-font-stack-monospace-v2 -$code-font-family: "SF-Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Roboto Mono", "Ubuntu Mono", "Courier New", Courier, monospace; +$code-font-family: "SFMono-Regular", "SF-Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Roboto Mono", "Ubuntu Mono", "Courier New", Courier, monospace; $code-font-size: .9rem; $code-fence-font-size: .8rem; -$code-color: #bf616a; -$code-background-color: #f9f2f4; +//$code-color: #bf616a; +//$code-background-color: #f9f2f4; $code-line-height: 1.4; // links