From 5b98eaa584b4134d0dc5a691adb61d7f25d225a3 Mon Sep 17 00:00:00 2001 From: 10Derozan Date: Wed, 27 Mar 2024 21:54:34 +0800 Subject: [PATCH] chore(theme): optimize code style in sidebar (#872) --- .changeset/metal-onions-hammer.md | 5 +++++ packages/theme-default/src/styles/code.css | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .changeset/metal-onions-hammer.md diff --git a/.changeset/metal-onions-hammer.md b/.changeset/metal-onions-hammer.md new file mode 100644 index 000000000..b2a320d94 --- /dev/null +++ b/.changeset/metal-onions-hammer.md @@ -0,0 +1,5 @@ +--- +'@rspress/theme-default': patch +--- + +chore: optimize code style in sidebar diff --git a/packages/theme-default/src/styles/code.css b/packages/theme-default/src/styles/code.css index 6fdfbff21..437ff90c6 100644 --- a/packages/theme-default/src/styles/code.css +++ b/packages/theme-default/src/styles/code.css @@ -20,14 +20,12 @@ --rp-code-line-number-color: rgba(60, 60, 60, 0.33); } -.rspress-doc :not(pre, h1, h2, h3, h4, h5, h6) > code, -.rspress-sidebar code +.rspress-doc :not(pre, h1, h2, h3, h4, h5, h6) > code { font-size: var(--rp-code-font-size); } -.rspress-doc :not(pre, div, a) > code, -.rspress-sidebar code +.rspress-doc :not(pre, div, a) > code { border-radius: var(--rp-radius-small); padding: 4px 8px;