From 3051fcd3c9e3a3ca726c61bd8bec0de199b075e3 Mon Sep 17 00:00:00 2001 From: iBug Date: Fri, 27 May 2022 22:06:37 +0800 Subject: [PATCH] Fix inline code style not applied to stylized text (#3253) * bug: inline code style not applied to stylized text * Use double colons for pseudoelements --- _sass/minimal-mistakes/_base.scss | 18 ------------------ _sass/minimal-mistakes/_page.scss | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/_sass/minimal-mistakes/_base.scss b/_sass/minimal-mistakes/_base.scss index 3796eb61..01c8a49f 100644 --- a/_sass/minimal-mistakes/_base.scss +++ b/_sass/minimal-mistakes/_base.scss @@ -160,24 +160,6 @@ pre { overflow-x: auto; /* add scrollbars to wide code blocks*/ } -p > code, -a > code, -li > code, -figcaption > code, -td > code { - padding-top: 0.1rem; - padding-bottom: 0.1rem; - font-size: 0.8em; - background: $code-background-color; - border-radius: $border-radius; - - &:before, - &:after { - letter-spacing: -0.2em; - content: "\00a0"; /* non-breaking space*/ - } -} - /* horizontal rule */ hr { diff --git a/_sass/minimal-mistakes/_page.scss b/_sass/minimal-mistakes/_page.scss index 145ca8e9..847dc4c4 100644 --- a/_sass/minimal-mistakes/_page.scss +++ b/_sass/minimal-mistakes/_page.scss @@ -139,6 +139,20 @@ body { } } + :not(pre) > code { + padding-top: 0.1rem; + padding-bottom: 0.1rem; + font-size: 0.8em; + background: $code-background-color; + border-radius: $border-radius; + + &::before, + &::after { + letter-spacing: -0.2em; + content: "\00a0"; /* non-breaking space*/ + } + } + dt { margin-top: 1em; font-family: $sans-serif; @@ -561,4 +575,4 @@ body { padding-right: 0; } } -} \ No newline at end of file +}