From 99ff655c54e2af9be51c20930ef91817843b3796 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 27 Jul 2022 14:48:50 +0800 Subject: [PATCH] docs(website): fix code block line highlight CSS --- website/src/css/docusaurusTheme.css | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/website/src/css/docusaurusTheme.css b/website/src/css/docusaurusTheme.css index 420a79605df1..ea6022ab15f5 100644 --- a/website/src/css/docusaurusTheme.css +++ b/website/src/css/docusaurusTheme.css @@ -21,6 +21,8 @@ --grey: #aaaaaa; --grey2: #ededed; --grey3: #545454; + + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); } :root[data-theme='dark'] { @@ -39,6 +41,8 @@ --grey: #aaaaaa; --grey2: #545454; --grey3: #ededed; + + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); } .header-github-link:hover { @@ -70,14 +74,3 @@ html[data-theme='dark'] .footer--dark { .footer--dark .text--center { color: var(--grey); } - -.docusaurus-highlight-code-line { - background-color: rgba(0, 0, 0, 0.1); - display: block; - margin: 0 calc(-1 * var(--ifm-pre-padding)); - padding: 0 var(--ifm-pre-padding); -} - -html[data-theme='dark'] .docusaurus-highlight-code-line { - background-color: rgba(0, 0, 0, 0.3); -}