refactor: code font-size without :has

This commit is contained in:
Lucas Larroche 2023-03-19 10:03:32 +07:00
parent dd799056c7
commit 8f26729a64

View file

@ -13,7 +13,7 @@
// 1. Correct the inheritance and scaling of font size in all browsers // 1. Correct the inheritance and scaling of font size in all browsers
// 2. Correct the odd `em` font sizing in all browsers // 2. Correct the odd `em` font sizing in all browsers
pre:not(:has(code)), pre,
code, code,
kbd, kbd,
samp { samp {
@ -21,6 +21,11 @@
font-family: var(#{$}font-family); // 1 font-family: var(#{$}font-family); // 1
} }
pre code {
font-size: inherit;
font-family: inherit;
}
// Prevent overflow of the container in all browsers (opinionated) // Prevent overflow of the container in all browsers (opinionated)
pre { pre {
-ms-overflow-style: scrollbar; -ms-overflow-style: scrollbar;