Fix notebook-view cell numbers illegible in dark mode - #2194
Merged
Merged
Conversation
Bootstrap's $pre-color defaults to near-black regardless of theme, and quarto-cli's own .cell-decorator reset only clears the pre background, not its text color. Set $pre-color: inherit, the same override Bootswatch's own dark themes (darkly, cyborg) already carry. Upstream: quarto-dev/quarto-cli#14932
Contributor
📝 Preview Deployment🔍 Full site preview: https://deploy-preview-2194.quarto.org |
Contributor
|
Successfully created backport PR for |
2 tasks
cwickham
added a commit
that referenced
this pull request
Sep 23, 2026
…2197) Bootstrap's $pre-color defaults to near-black regardless of theme, and quarto-cli's own .cell-decorator reset only clears the pre background, not its text color. Set $pre-color: inherit, the same override Bootswatch's own dark themes (darkly, cyborg) already carry. Upstream: quarto-dev/quarto-cli#14932 (cherry picked from commit 4348226) Co-authored-by: Charlotte Wickham <charlotte.wickham@posit.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$pre-colordefaults to near-black regardless of theme; quarto-cli's.cell-decoratorreset clears theprebackground but not its text color, so notebook-view cell numbers (In [1]:, etc.) are ~1.15:1 contrast in dark mode.$pre-color: inherit, matching Bootswatch's own dark themes (darkly, cyborg).E.g. on https://quarto.org/docs/authoring/penguins-preview.html the light mode includes visible cell numbers:
And the dark one does not:

Test plan
color-contrast :: #000000 on #151515reduced 26 → 15 instances (the remaining 15 are unrelated third-party dygraph axis labels onhtmlwidgets.html); zero new/worse findings across all 303 signaturesdocs/authoring/penguins-preview.htmlin dark mode in the preview