-
Notifications
You must be signed in to change notification settings - Fork 391
Description
Our fix for flashing in dark mode in #12173 requires us to load both stylesheets and disable one in JavaScript at the top of the body.
Because of, we are susceptible to stylesheet bleed when JavaScript is disabled. The stylesheet for the default mode is always loaded second, but if it doesn't redefine everything, especially background colors, then styles from the non-default stylesheet can be seen.
One symptom is bad syntax highlighting with the default highlighting style in this document.
---
format: html
theme:
light: united
dark: slate
_quarto:
tests:
html:
ensureHtmlElements:
- []
- ["link[href*=\"-dark-\"]"]
---
## Hello
```markdown

```
When JavaScript is disabled, this looks like
This only seems to be an issue with arrow, but arrow is the default.
A workaround is to use a different highlighting-style. I tested the styles listed as working with light and dark mode, and the others all work.
(Note: Highlighting for links has an intentionally dark background in atom-one, gruvbox.)