From b846debebc24a699b9feef9af10233ff1a876bbd Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 7 Jan 2021 20:23:18 +0100 Subject: Small design adjustments, added support for code blocks marked as 'plain' --- assets/css/_basics.scss | 2 +- assets/css/components/_page.scss | 17 ++++++++++++++++- assets/css/scopes/_code.scss | 14 ++++++++++++-- 3 files changed, 29 insertions(+), 4 deletions(-) (limited to 'assets/css') diff --git a/assets/css/_basics.scss b/assets/css/_basics.scss index b18ca57..cbdfb9a 100644 --- a/assets/css/_basics.scss +++ b/assets/css/_basics.scss @@ -175,7 +175,7 @@ p { hr { height: 1px; - margin: ($line-height * 2em) 0; + margin: ($line-height * 1em) 0; border: 0; background-color: var(--obj); } diff --git a/assets/css/components/_page.scss b/assets/css/components/_page.scss index ce67f7e..87d5413 100644 --- a/assets/css/components/_page.scss +++ b/assets/css/components/_page.scss @@ -2,6 +2,14 @@ &__header { margin-bottom: $line-height * 1em; + &::after { + content: '--'; + display: block; + margin-bottom: $line-height * -1em; + color: var(--fg-hi); + line-height: 2 * $line-height; + } + &__title { margin-top: 0; } @@ -44,14 +52,21 @@ text-align: right; } + $h1-unscale-factor: px-to-em($font-size, $content--h1--font-size); + &--h1 { + margin-top: $line-height * $h1-unscale-factor; font-size: px-to-em($content--h1--font-size); &::before { content: '#'; - font-size: px-to-em($font-size, $content--h1--font-size); + font-size: $h1-unscale-factor; } } + + &--h1 + &--h1 { + margin-top: $line-height * $h1-unscale-factor; + } &--h2::before { content: '##'; diff --git a/assets/css/scopes/_code.scss b/assets/css/scopes/_code.scss index f6697aa..f024dbd 100644 --- a/assets/css/scopes/_code.scss +++ b/assets/css/scopes/_code.scss @@ -1,18 +1,28 @@ .s-code { + pre, + code { + color: var(--fg-lo); + } + pre { overflow-x: auto; - color: var(--fg-lo); font-size: 1em; line-height: $line-height; } + &--plain { + pre, + code { + color: var(--fg); + } + } + /* stylelint-disable selector-class-pattern */ .c { color: var(--fg-hi); } - .nt, .kt, .k, .kr, -- cgit v1.2.3-70-g09d2