Commit 1b5d0d8
committed
Fix dark highlighting themes missing base text color
Two issues prevented dark syntax highlighting themes (zenburn,
espresso, etc.) from setting a base text color when paired with
a light theme:
1. In format-html-scss.ts, the $code-block-color SCSS variable
extraction was gated by !isAdaptive. When users specify separate
light/dark themes ({light: kate, dark: zenburn}), isAdaptive
returns true (because both keys exist), so $code-block-color
was never emitted. Move the text-color extraction outside the
isAdaptive guard — adaptive themes handle their own background,
but text-color still needs to propagate.
2. In _bootstrap-rules.scss, $code-block-color was only applied to
container elements (div.sourceCode, pre.sourceCode), but the
light theme's syntax highlighting CSS generates span-level rules
(code.sourceCode > span { color: #1f1c1b }) that override
container inheritance. Add matching span-level selectors.
Fixes #140991 parent d1c3de0 commit 1b5d0d8
2 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
317 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
318 | 324 | | |
319 | 325 | | |
320 | 326 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
863 | 863 | | |
864 | 864 | | |
865 | 865 | | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
866 | 874 | | |
867 | 875 | | |
868 | 876 | | |
| |||
0 commit comments