Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vaga/hugo-theme-m10c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorFabien CASTERS <fabien@vaga.io>2021-01-05 16:50:39 +0300
committerFabien <vaga@users.noreply.github.com>2021-01-05 16:57:29 +0300
commit5c7aaea10093505a903a3fd49d247f2545e96b04 (patch)
treee8a9c46e9d48770c88aebd35e1d04d50193dfe4f /assets
parentb3e4d71512169c58ec7d00d14b7d8a29cdc2636c (diff)
improve preformatted text with or without line numbers
Diffstat (limited to 'assets')
-rw-r--r--assets/css/_base.scss6
-rw-r--r--assets/css/components/_post.scss12
2 files changed, 15 insertions, 3 deletions
diff --git a/assets/css/_base.scss b/assets/css/_base.scss
index 9848303..d0a3f3f 100644
--- a/assets/css/_base.scss
+++ b/assets/css/_base.scss
@@ -38,13 +38,17 @@ code {
}
pre {
+ font-size: 1rem;
+ line-height: 1.2em;
+ margin: 0;
+ overflow: auto;
+
// A larger monospaced block of text (that isn't mixed with normal text)
// generally looks heavier than normal text with the same font size. For this
// reason using a smaller monospaced font size makes sense in this situation.
code {
font-size: .8em;
}
- overflow: auto;
}
::selection {
diff --git a/assets/css/components/_post.scss b/assets/css/components/_post.scss
index b8265a7..afecccd 100644
--- a/assets/css/components/_post.scss
+++ b/assets/css/components/_post.scss
@@ -3,10 +3,18 @@
}
.post-content {
- pre {
+ & > pre,
+ .highlight {
+ margin: 1em 0;
+ }
+
+ & > pre,
+ .highlight > pre,
+ .highlight > div {
border-left: 0.4em solid rgba($primary-color, .8);
- padding-left: 1em;
+ padding: .5em 1em;
}
+
img {
max-width: 100%;
}