Skip to content

Commit 6bb6de4

Browse files
committed
覆盖默认的 inline code 样式
1 parent d0120eb commit 6bb6de4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/assets/styles/app.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,24 @@ details .details-content > :first-child {
138138
details .details-content > :last-child {
139139
margin-bottom: 0;
140140
}
141+
142+
/* inline code css*/
143+
.prose :where(:not(pre) > code):not(:where(.not-prose, .not-prose *)) {
144+
border-radius: .25rem;
145+
padding: .15rem .3rem;
146+
font-size: 0.875em;
147+
font-family: 'Consolas', monospace;
148+
--un-bg-opacity: .13;
149+
background-color: rgb(136 136 136 / var(--un-bg-opacity)) !important;
150+
color: #2d3748;
151+
transition: background-color 0.2s, color 0.2s;
152+
153+
&::before, &::after {
154+
content: '' !important;
155+
}
156+
}
157+
158+
html.dark .prose :where(:not(pre) > code):not(:where(.not-prose, .not-prose *)) {
159+
background-color: rgba(220, 220, 220, 0.13) !important;
160+
color: #f8fafc;
161+
}

0 commit comments

Comments
 (0)