Skip to content

Commit 6c35bcc

Browse files
committed
调整行内代码,引用块的马赛克样式
1 parent 70fce9a commit 6c35bcc

2 files changed

Lines changed: 32 additions & 14 deletions

File tree

src/assets/styles/app.css

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,11 @@ starlight-tabs {
8989
border-radius: 0.25rem !important;
9090
padding: 0.1rem 0.35rem !important;
9191
border: 1px solid hsl(var(--border)) !important;
92-
background-color: hsl(45 25% 92%) !important;
92+
background-color: hsl(140 20% 92%) !important;
9393
background-image:
94-
repeating-linear-gradient(45deg, transparent, transparent 2px, hsl(45 20% 88%) 2px, hsl(45 20% 88%) 4px),
95-
repeating-linear-gradient(-45deg, transparent, transparent 2px, hsl(45 20% 88%) 2px, hsl(45 20% 88%) 4px) !important;
94+
repeating-linear-gradient(45deg, transparent, transparent 1.5px, hsl(140 18% 86%) 1.5px, hsl(140 18% 86%) 3px),
95+
repeating-linear-gradient(-45deg, transparent, transparent 1.5px, hsl(140 18% 86%) 1.5px, hsl(140 18% 86%) 3px) !important;
96+
background-size: 4px 4px !important;
9697
color: hsl(var(--foreground)) !important;
9798
display: inline-block !important;
9899
box-decoration-break: clone !important;
@@ -105,13 +106,35 @@ starlight-tabs {
105106

106107
html.dark .prose :where(:not(pre) > code):not(:where(.not-prose, .not-prose *)) {
107108
border-color: hsl(var(--border)) !important;
108-
background-color: hsl(30 15% 18%) !important;
109+
background-color: hsl(140 15% 18%) !important;
109110
background-image:
110-
repeating-linear-gradient(45deg, transparent, transparent 2px, hsl(30 12% 22%) 2px, hsl(30 12% 22%) 4px),
111-
repeating-linear-gradient(-45deg, transparent, transparent 2px, hsl(30 12% 22%) 2px, hsl(30 12% 22%) 4px) !important;
111+
repeating-linear-gradient(45deg, transparent, transparent 1.5px, hsl(140 12% 26%) 1.5px, hsl(140 12% 26%) 3px),
112+
repeating-linear-gradient(-45deg, transparent, transparent 1.5px, hsl(140 12% 26%) 1.5px, hsl(140 12% 26%) 3px) !important;
113+
background-size: 4px 4px !important;
112114
color: hsl(var(--foreground)) !important;
113115
}
114116

117+
/* Blockquote styles */
118+
.prose blockquote {
119+
background-color: hsl(140 20% 94%) !important;
120+
background-image:
121+
repeating-linear-gradient(0deg, hsl(140 18% 88%) 0px, hsl(140 18% 88%) 1px, transparent 1px, transparent 20px),
122+
repeating-linear-gradient(90deg, hsl(140 18% 88%) 0px, hsl(140 18% 88%) 1px, transparent 1px, transparent 20px) !important;
123+
border: none !important;
124+
padding-top: .15em !important;
125+
padding-bottom: .15em !important;
126+
}
127+
128+
html.dark .prose blockquote {
129+
background-color: hsl(140 15% 16%) !important;
130+
background-image:
131+
repeating-linear-gradient(0deg, hsl(140 12% 22%) 0px, hsl(140 12% 22%) 1px, transparent 1px, transparent 20px),
132+
repeating-linear-gradient(90deg, hsl(140 12% 22%) 0px, hsl(140 12% 22%) 1px, transparent 1px, transparent 20px) !important;
133+
border: none !important;
134+
padding-top: 1.25em !important;
135+
padding-bottom: 1.25em !important;
136+
}
137+
115138
/* Reading progress bar using modern CSS scroll-driven animations */
116139
@media (min-width: 768px) {
117140
body::before {

uno.config.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@ const typographyConfig = {
4747
blockquote: {
4848
position: 'relative',
4949
overflow: 'visible',
50-
'border-width': '1px',
51-
'border-left': 'inherit',
5250
'border-radius': 'var(--radius)',
5351
'padding-inline': '1.6rem',
54-
'font-style': 'normal'
52+
'font-style': 'normal',
53+
'font-weight': '500'
5554
},
5655
'blockquote::before': {
5756
color: fgMuted,
@@ -132,11 +131,7 @@ const typographyConfig = {
132131
'font-weight': '500',
133132
color: fg
134133
},
135-
'code:not(pre code)': {
136-
// 解决 inline code 在长单词时换行的问题
137-
// 'white-space': 'pre-wrap!important',
138-
'word-break': 'break-all!important'
139-
},
134+
140135
'.katex-html': {
141136
overflow: 'auto hidden',
142137
padding: '3px'

0 commit comments

Comments
 (0)