Skip to content

Commit 545708d

Browse files
authored
Merge pull request #14 from lttle-cloud/feature/yaml-dark-theme-styling
2 parents a12a773 + fcb18d5 commit 545708d

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

src/css/custom.css

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,56 @@
169169
padding: 0 var(--ifm-pre-padding);
170170
border-left: 3px solid #ff000080;
171171
}
172+
173+
/* Fix YAML syntax highlighting in dark mode */
174+
[data-theme="dark"] .token.tag,
175+
[data-theme="dark"] .token.attr-name,
176+
[data-theme="dark"] .token.selector,
177+
[data-theme="dark"] .token.selector .class {
178+
color: #ff79c6; /* Pink for YAML keys */
179+
}
180+
181+
[data-theme="dark"] .token.string,
182+
[data-theme="dark"] .token.attr-value {
183+
color: #f1fa8c; /* Yellow for YAML string values */
184+
}
185+
186+
[data-theme="dark"] .token.number,
187+
[data-theme="dark"] .token.boolean {
188+
color: #bd93f9; /* Purple for YAML numbers/booleans */
189+
}
190+
191+
[data-theme="dark"] .token.punctuation {
192+
color: #f8f8f2; /* White for YAML punctuation */
193+
}
194+
195+
[data-theme="dark"] .token.comment {
196+
color: #6272a4; /* Gray for YAML comments */
197+
}
198+
199+
[data-theme="dark"] .token.keyword {
200+
color: #ff79c6; /* Pink for YAML keywords */
201+
}
202+
203+
/* Additional YAML-specific token fixes */
204+
[data-theme="dark"] .language-yaml .token.atrule,
205+
[data-theme="dark"] .language-yaml .token.rule {
206+
color: #ff79c6; /* Pink for YAML directives */
207+
}
208+
209+
[data-theme="dark"] .language-yaml .token.property {
210+
color: #ff79c6; /* Pink for YAML property names */
211+
}
212+
213+
[data-theme="dark"] .language-yaml .token.operator {
214+
color: #f8f8f2; /* White for YAML operators like : */
215+
}
216+
217+
[data-theme="dark"] .language-yaml .token.function {
218+
color: #50fa7b; /* Green for YAML functions */
219+
}
220+
221+
/* Ensure YAML block scalars are properly colored */
222+
[data-theme="dark"] .language-yaml .token.literal {
223+
color: #f1fa8c; /* Yellow for YAML literals */
224+
}

0 commit comments

Comments
 (0)