feat: support light/dark theme in code blocks (#327)

Update Astro and its related dependencies. Support
light/dark theme in code-blocks.
This commit is contained in:
Sat Naing
2024-07-21 16:18:22 +07:00
committed by GitHub
parent 2a78fd6e59
commit 9de19c2c68
4 changed files with 1533 additions and 1642 deletions
+14
View File
@@ -115,6 +115,10 @@
@apply bg-skin-card-muted;
}
/* ===== Code Blocks & Syntax Highlighting ===== */
pre:has(code) {
@apply border border-skin-line;
}
code,
blockquote {
word-wrap: break-word;
@@ -123,6 +127,16 @@
pre > code {
white-space: pre;
}
/* Apply Dark Theme (if multi-theme specified) */
html[data-theme="dark"] pre:has(code),
html[data-theme="dark"] pre:has(code) span {
color: var(--shiki-dark) !important;
background-color: var(--shiki-dark-bg) !important;
font-style: var(--shiki-dark-font-style) !important;
font-weight: var(--shiki-dark-font-weight) !important;
text-decoration: var(--shiki-dark-text-decoration) !important;
}
}
@layer components {