From c876731901784a72ef9d2e9e2936df65ddff5f61 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 1 Jul 2024 07:02:36 +0800 Subject: [PATCH] feat(ui): improve visibility of inline code (#1831) --- _sass/addon/syntax.scss | 2 +- _sass/colors/syntax-dark.scss | 2 +- _sass/colors/syntax-light.scss | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/_sass/addon/syntax.scss b/_sass/addon/syntax.scss index 68796f28149..73c66aae51b 100644 --- a/_sass/addon/syntax.scss +++ b/_sass/addon/syntax.scss @@ -102,7 +102,7 @@ code { &.highlighter-rouge { font-size: $code-font-size; - padding: 3px 5px; + padding: 3px 6px; word-break: break-word; border-radius: 4px; background-color: var(--inline-code-bg); diff --git a/_sass/colors/syntax-dark.scss b/_sass/colors/syntax-dark.scss index d898c651feb..eb92204dd88 100644 --- a/_sass/colors/syntax-dark.scss +++ b/_sass/colors/syntax-dark.scss @@ -7,7 +7,7 @@ --highlight-bg-color: #151515; --highlighter-rouge-color: #c9def1; --highlight-lineno-color: #808080; - --inline-code-bg: #323238; + --inline-code-bg: rgba(255, 255, 255, 0.05); --code-color: #b0b0b0; --code-header-text-color: #6a6a6a; --code-header-muted-color: #353535; diff --git a/_sass/colors/syntax-light.scss b/_sass/colors/syntax-light.scss index 6562c76f22e..76aa66916b3 100644 --- a/_sass/colors/syntax-light.scss +++ b/_sass/colors/syntax-light.scss @@ -8,17 +8,13 @@ --highlight-bg-color: #f6f8fa; --highlighter-rouge-color: #3f596f; --highlight-lineno-color: #9e9e9e; - --inline-code-bg: #f6f6f7; + --inline-code-bg: rgba(25, 25, 28, 0.05); --code-color: #3a3a3a; --code-header-text-color: #a3a3a3; --code-header-muted-color: #e5e5e5; --code-header-icon-color: #c9c8c8; --clipboard-checked-color: #43c743; - [class^='prompt-'] { - --inline-code-bg: #fbfafa; - } - /* --- Syntax highlight theme from `rougify style github` --- */ .highlight table td {