From 8f26729a64d18c79a29b46ffd5182d57561134ea Mon Sep 17 00:00:00 2001 From: Lucas Larroche Date: Sun, 19 Mar 2023 10:03:32 +0700 Subject: [PATCH] refactor: code font-size without :has --- scss/content/_code.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scss/content/_code.scss b/scss/content/_code.scss index 9fc86595..0f959ae8 100644 --- a/scss/content/_code.scss +++ b/scss/content/_code.scss @@ -13,7 +13,7 @@ // 1. Correct the inheritance and scaling of font size in all browsers // 2. Correct the odd `em` font sizing in all browsers - pre:not(:has(code)), + pre, code, kbd, samp { @@ -21,6 +21,11 @@ font-family: var(#{$✨}font-family); // 1 } + pre code { + font-size: inherit; + font-family: inherit; + } + // Prevent overflow of the container in all browsers (opinionated) pre { -ms-overflow-style: scrollbar;