Skip to content

Commit e154e0e

Browse files
Update post-single.css
1 parent 381c4ae commit e154e0e

File tree

1 file changed

+51
-6
lines changed

1 file changed

+51
-6
lines changed

themes/PaperMod/assets/css/common/post-single.css

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,23 @@
153153
border-radius: var(--radius);
154154
}
155155

156+
/* 하이라이트 코드 블록 스타일링 */
156157
.post-content .highlight:not(table) {
157158
margin: 10px auto;
158-
background: var(--hljs-bg) !important;
159159
border-radius: var(--radius);
160160
direction: ltr;
161161
}
162162

163+
/* 라이트 모드 하이라이트 */
164+
:root:not(.dark) .post-content .highlight:not(table) {
165+
background: #f6f8fa !important;
166+
}
167+
168+
/* 다크 모드 하이라이트 */
169+
.dark .post-content .highlight:not(table) {
170+
background: var(--hljs-bg) !important;
171+
}
172+
163173
.post-content li > .highlight {
164174
margin-inline-end: 0;
165175
}
@@ -193,26 +203,49 @@
193203
display: none;
194204
}
195205

206+
/* 인라인 코드 스타일링 */
196207
.post-content code {
197208
margin: auto 4px;
198209
padding: 4px 6px;
199210
font-size: 0.78em;
200211
line-height: 1.5;
201-
background: rgb(241, 241, 241);
202212
border-radius: 2px;
203213
}
204214

215+
/* 라이트 모드 인라인 코드 */
216+
:root:not(.dark) .post-content code {
217+
background: #f6f8fa;
218+
color: #24292e;
219+
}
220+
221+
/* 다크 모드 인라인 코드 */
222+
.dark .post-content code {
223+
background: var(--code-bg);
224+
color: rgb(213, 213, 214);
225+
}
226+
227+
/* 코드 블록 기본 스타일 */
205228
.post-content pre code {
206229
display: block;
207230
margin: auto 0;
208231
padding: 10px;
209-
color: rgb(213, 213, 214);
210-
background: var(--hljs-bg) !important;
211232
border-radius: var(--radius);
212233
overflow-x: auto;
213234
word-break: break-all;
214235
}
215236

237+
/* 라이트 모드 코드 블록 */
238+
:root:not(.dark) .post-content pre code {
239+
color: #24292e;
240+
background: #f6f8fa !important;
241+
}
242+
243+
/* 다크 모드 코드 블록 */
244+
.dark .post-content pre code {
245+
color: rgb(213, 213, 214);
246+
background: var(--hljs-bg) !important;
247+
}
248+
216249
.post-content blockquote {
217250
margin: 20px 0;
218251
padding: 0 14px;
@@ -368,12 +401,24 @@ h6:hover .anchor {
368401
user-select: none;
369402
}
370403

371-
.post-content :not(table) ::-webkit-scrollbar-thumb {
404+
/* 스크롤바 스타일링 */
405+
/* 라이트 모드 스크롤바 */
406+
:root:not(.dark) .post-content :not(table) ::-webkit-scrollbar-thumb {
407+
border: 2px solid #f6f8fa;
408+
background: #959da5;
409+
}
410+
411+
:root:not(.dark) .post-content :not(table) ::-webkit-scrollbar-thumb:hover {
412+
background: #24292e;
413+
}
414+
415+
/* 다크 모드 스크롤바 */
416+
.dark .post-content :not(table) ::-webkit-scrollbar-thumb {
372417
border: 2px solid var(--hljs-bg);
373418
background: rgb(113, 113, 117);
374419
}
375420

376-
.post-content :not(table) ::-webkit-scrollbar-thumb:hover {
421+
.dark .post-content :not(table) ::-webkit-scrollbar-thumb:hover {
377422
background: rgb(163, 163, 165);
378423
}
379424

0 commit comments

Comments
 (0)