revise styles for pre and code

This commit is contained in:
Huy Tran 2018-11-30 08:29:59 +11:00
parent 739f92285b
commit bb60c58e4c
2 changed files with 10 additions and 16 deletions

View file

@ -15,14 +15,13 @@ pre {
%code-font { %code-font {
font-family: $code-font-family; font-family: $code-font-family;
font-size: $code-font-size; font-size: $code-font-size;
//line-height: $code-line-height;
} }
%code-in-rounded-box { %code-in-rounded-box {
border-radius: 4px; border-radius: 4px;
padding: 2px 4px; padding: 2px 4px;
color: $code-color; color: #bf616a;
background-color: $code-background-color; background-color: #f9f2f4;
} }
%code-style-codersblock { %code-style-codersblock {
@ -32,9 +31,8 @@ pre {
} }
%code-style-npf { %code-style-npf {
padding: .25em .5em; padding: .1em .1em;
color: #bf616a; color: #ab5979;
background-color: #f9f9f9;
border-radius: 3px; border-radius: 3px;
} }
@ -43,11 +41,6 @@ a {
color: $link-color; color: $link-color;
} }
} }
//-code {
// white-space: pre-wrap;
// @extend %code-font;
// @extend %code-in-rounded-box;
//}
code { code {
@extend %code-font; @extend %code-font;
@ -56,8 +49,9 @@ code {
// highlight.js // highlight.js
.hljs { .hljs {
font-family: $code-font-family;
font-size: $code-fence-font-size; font-size: $code-fence-font-size;
font-weight: 300; line-height: $root-line-height;
white-space: pre; white-space: pre;
border: 1px solid $gray-3; border: 1px solid $gray-3;
border-radius: 4px; border-radius: 4px;

View file

@ -34,7 +34,7 @@ $body-bg: #fff;
$border-color: #e5e5e5; $border-color: #e5e5e5;
$large-breakpoint: 38em; $large-breakpoint: 38em;
$large-font-size: 20px; $large-font-size: 19px;
$font-scale-dot7: .7rem; $font-scale-dot7: .7rem;
$font-scale-dot8: .8rem; $font-scale-dot8: .8rem;
// //
@ -44,11 +44,11 @@ $small-device-font-size: $root-font-size;
$large-device-font-size: $large-font-size; $large-device-font-size: $large-font-size;
// https://www.client9.com/css-system-font-stack-monospace-v2 // 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-font-size: .9rem;
$code-fence-font-size: .8rem; $code-fence-font-size: .8rem;
$code-color: #bf616a; //$code-color: #bf616a;
$code-background-color: #f9f2f4; //$code-background-color: #f9f2f4;
$code-line-height: 1.4; $code-line-height: 1.4;
// links // links