From fd7801518e7996c8b054627c277a775df24869c4 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Tue, 16 Jan 2024 00:36:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E5=8A=A8=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E4=B8=8B=20twoslash=20=E6=A0=B7=E5=BC=8F=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- theme/src/client/styles/twoslash.scss | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/theme/src/client/styles/twoslash.scss b/theme/src/client/styles/twoslash.scss index ca937ca5..f997f258 100644 --- a/theme/src/client/styles/twoslash.scss +++ b/theme/src/client/styles/twoslash.scss @@ -31,6 +31,17 @@ div[class*="language-"].line-numbers-mode:has(> .twoslash) { } } +@supports not selector(:has(a)) { + div[class*="language-"] .twoslash + .line-numbers { + display: none; + } + + div[class*="language-"] pre.twoslash { + padding-left: 1.5rem; + margin-left: 0; + } +} + /* Respect people's wishes to not have animations */ @media (prefers-reduced-motion: reduce) { .twoslash * {