Skip to content

Commit 885000d

Browse files
committed
Fix syntax highlighting for code
1 parent 69ed65a commit 885000d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/css/custom.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
/* Use a darker color to ensure contrast, ideally we don't need important */
1414
--ifm-breadcrumb-color-active: var(--ifm-color-primary-darker) !important;
1515
--ifm-menu-color-active: var(--ifm-color-primary-darker) !important;
16+
--inline-code-bg-color: #fafafa; /* Light mode background */
17+
--inline-code-text-color: #aa54bf; /* Light mode text color */
1618
}
1719

1820
html[data-theme='dark'] {
@@ -50,6 +52,8 @@ html[data-theme='dark'] {
5052
--ifm-border-color: #444; /* Border color */
5153
--ifm-hover-color: #555; /* Hover color for interactive elements */
5254
--docusaurus-highlighted-code-line-bg: rgba(255, 255, 255, 0.1);
55+
--inline-code-bg-color: #464752; /* Dark mode background */
56+
--inline-code-text-color: #eca1ff; /* Dark mode text color */
5357
}
5458
.small-image {
5559
width: 400px;
@@ -187,4 +191,17 @@ div.alert {
187191

188192
.arcade-container {
189193
margin-bottom: 24px;
194+
}
195+
196+
code {
197+
background-color: var(--inline-code-bg-color);
198+
color: var(--inline-code-text-color);
199+
border-radius: 4px;
200+
padding: 2px 4px;
201+
font-size: 0.9em;
202+
}
203+
204+
/* Override styles for inline code within admonitions */
205+
.theme-admonition code {
206+
background-color: inherit; /* Ensures the background color is inherited */
190207
}

0 commit comments

Comments
 (0)