From 9a76b450ac016f238bffe9c6d8624e23e95d8f28 Mon Sep 17 00:00:00 2001 From: jeffreytse Date: Wed, 15 Jul 2020 18:24:52 +0800 Subject: fix: html code block presentation style issue --- _sass/yat/_base.scss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to '_sass') diff --git a/_sass/yat/_base.scss b/_sass/yat/_base.scss index 61c3d87..956cd4e 100644 --- a/_sass/yat/_base.scss +++ b/_sass/yat/_base.scss @@ -152,9 +152,10 @@ blockquote { pre, code { @include relative-font-size(0.9375); + color: $text-color; } -code { +*:not(pre) > code { padding: 1px 5px; border-radius: 3px; color: #fff; @@ -164,7 +165,9 @@ code { pre { overflow-x: auto; position: relative; + background-color: #f0f0f0; + // code language badge &:before { content: attr(data-lang); color: #fff; @@ -180,9 +183,10 @@ pre { } > code { - border: 0; + display: inline-block; padding: 20px!important; background-color: transparent; + border: 0; } } -- cgit v1.2.3