From 5c196ffa70935cf474c490d3dcf3114e74168cbd Mon Sep 17 00:00:00 2001 From: henices Date: Wed, 22 Oct 2025 18:11:27 +0800 Subject: [PATCH] fix #2652 the same font size as parent heading. --- src/data/extra/themes/vue-dark/web.css | 6 +++++- src/data/extra/themes/vue-light/web.css | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/data/extra/themes/vue-dark/web.css b/src/data/extra/themes/vue-dark/web.css index aad04e2bba..cbf4eaebf5 100644 --- a/src/data/extra/themes/vue-dark/web.css +++ b/src/data/extra/themes/vue-dark/web.css @@ -100,6 +100,10 @@ code { word-break: break-word; } +:is(h1, h2, h3, h4, h5, h6) code { + font-size: inherit; +} + pre code { display: block; padding-left: 0.5em; @@ -383,4 +387,4 @@ div.vx-plantuml-graph { border-color: #111 !important; background-color: #1E1E1E !important; color: #999 !important; -} \ No newline at end of file +} diff --git a/src/data/extra/themes/vue-light/web.css b/src/data/extra/themes/vue-light/web.css index c13afae51e..cd0b4baab2 100644 --- a/src/data/extra/themes/vue-light/web.css +++ b/src/data/extra/themes/vue-light/web.css @@ -115,8 +115,9 @@ code { background-color: #f8f8f8; word-break: break-word; } -:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) code { - font-size: 0.9rem; + +:is(h1, h2, h3, h4, h5, h6) code { + font-size: inherit; } pre code { @@ -428,4 +429,4 @@ h5 .vx-header-anchor{margin-top: -1px;} .vx-alert .code-toolbar pre[class*="language-"]{ background-color: #f3f3f3 !important; border: 1px dashed #eee; -} \ No newline at end of file +}