From ffb2043909d7e40a41fab0077444ab80d2517b89 Mon Sep 17 00:00:00 2001 From: Wei Ting <59229084+hoonweiting@users.noreply.github.com> Date: Thu, 16 Sep 2021 02:11:57 +0800 Subject: [PATCH] Twilight theme: Increase selector specificities of plugin overrides (#3081) --- themes/prism-twilight.css | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/themes/prism-twilight.css b/themes/prism-twilight.css index 941d6d7f4d..63cc4c6b86 100644 --- a/themes/prism-twilight.css +++ b/themes/prism-twilight.css @@ -140,11 +140,6 @@ code[class*="language-"]::selection, code[class*="language-"] ::selection { cursor: help; } -pre[data-line] { - padding: 1em 0 1em 3em; - position: relative; -} - /* Markup */ .language-markup .token.tag, .language-markup .token.attr-name, @@ -158,42 +153,17 @@ pre[data-line] { z-index: 1; } -.line-highlight { +.line-highlight.line-highlight { background: hsla(0, 0%, 33%, 0.25); /* #545454 */ background: linear-gradient(to right, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0)); /* #545454 */ border-bottom: 1px dashed hsl(0, 0%, 33%); /* #545454 */ border-top: 1px dashed hsl(0, 0%, 33%); /* #545454 */ - left: 0; - line-height: inherit; margin-top: 0.75em; /* Same as .prism’s padding-top */ - padding: inherit 0; - pointer-events: none; - position: absolute; - right: 0; - white-space: pre; z-index: 0; } -.line-highlight:before, -.line-highlight[data-end]:after { +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { background-color: hsl(215, 15%, 59%); /* #8794A6 */ - border-radius: 999px; - box-shadow: 0 1px white; color: hsl(24, 20%, 95%); /* #F5F2F0 */ - content: attr(data-start); - font: bold 65%/1.5 sans-serif; - left: .6em; - min-width: 1em; - padding: 0 .5em; - position: absolute; - text-align: center; - text-shadow: none; - top: .4em; - vertical-align: .3em; -} - -.line-highlight[data-end]:after { - bottom: .4em; - content: attr(data-end); - top: auto; }