Skip to content

Commit ba26e7a

Browse files
committed
fix: fix code block wrong background in example title
1 parent 8ed08b5 commit ba26e7a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/.vitepress/theme/anchor/exampleAutoAnchorPreprocessor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const exampleAutoAnchorPreprocessor = (md: MarkdownIt) => {
1717
position: relative;
1818
top: 32px;">
1919
<TitleAnchor anchor="${processedTitle}">
20-
<h3 id="${processedTitle}" style="
20+
<h3 id="${processedTitle}" class="example-title-anchor" style="
2121
-webkit-user-select: none;
2222
-moz-user-select: none;
2323
-ms-user-select: none;

docs/.vitepress/theme/style/global.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,8 @@ kbd:not(.DocSearch-Button-Key) {
6767

6868
.tip.custom-block > .danger.custom-block {
6969
background-color: #fde4e8;
70+
}
71+
72+
.example-title-anchor > code {
73+
background-color: rgba(0, 0, 0, 0) !important;
7074
}

0 commit comments

Comments
 (0)