Skip to content

[Sync to prerelease] Fix notebook-view cell numbers illegible in dark mode - #2197

Merged
cwickham merged 1 commit into
prereleasefrom
sync-2194-to-prerelease
Sep 23, 2026
Merged

cwickham merged 1 commit into
prereleasefrom
sync-2194-to-prerelease

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Description

Sync of #2194 to prerelease.

Original PR

Fix notebook-view cell numbers illegible in dark mode

Summary

  • $pre-color defaults to near-black regardless of theme; quarto-cli's .cell-decorator reset clears the pre background but not its text color, so notebook-view cell numbers (In [1]:, etc.) are ~1.15:1 contrast in dark mode.
  • Set $pre-color: inherit, matching Bootswatch's own dark themes (darkly, cyborg).
  • Upstream: Code cell numbering in embeds is invisible in dark themes quarto-cli#14932

E.g. on https://quarto.org/docs/authoring/penguins-preview.html the light mode includes visible cell numbers:

Screenshot 2026-09-22 at 1 14 41 PM

And the dark one does not:
Screenshot 2026-09-22 at 1 14 36 PM

Test plan

  • Full-site axe scan before/after: color-contrast :: #000000 on #151515 reduced 26 → 15 instances (the remaining 15 are unrelated third-party dygraph axis labels on htmlwidgets.html); zero new/worse findings across all 303 signatures
  • Examine docs/authoring/penguins-preview.html in dark mode in the preview

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)
@cderv

cderv commented Sep 23, 2026

Copy link
Copy Markdown
Member

/deploy-preview

@github-actions

Copy link
Copy Markdown
Contributor Author

📝 Preview Deployment

🔍 Full site preview: https://deploy-preview-2197.quarto.org

@cwickham
cwickham merged commit 8f95d24 into prerelease Sep 23, 2026
@cwickham
cwickham deleted the sync-2194-to-prerelease branch September 23, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants