[PR #1607] [MERGED] fix(quarto/scss): scope light-text overrides to dark theme #9218

Closed
opened 2026-05-03 01:29:11 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1607
Author: @farhan523
Created: 4/30/2026
Status: Merged
Merged: 4/30/2026
Merged by: @profvjreddi

Base: devHead: fix/scss-dark-theme-scope


📝 Commits (1)

  • 7693d4c fix(quarto/scss): scope light-text overrides to dark theme

📊 Changes

1 file changed (+4 additions, -2 deletions)

View changed files

📝 tinytorch/quarto/assets/styles/style.scss (+4 -2)

📄 Description

Summary

  • Wrap the #quarto-content h3 and pre code color overrides in [data-bs-theme="dark"] so they only apply in dark mode.
  • Add an inline comment explaining the scoping.

Why

The unscoped rules forced near-white text (#d0d0d0, #e6e6e6) on h3 headings and pre code blocks regardless of theme, which left those elements unreadable in light mode. Gating on the dark-theme attribute restores Quarto's default light-mode contrast while preserving the dark-mode appearance.

Test plan

  • quarto preview from tinytorch/quarto/ and confirm h3 / pre code render correctly in light mode.
  • Toggle to dark mode and confirm light text is still applied.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1607 **Author:** [@farhan523](https://github.com/farhan523) **Created:** 4/30/2026 **Status:** ✅ Merged **Merged:** 4/30/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `dev` ← **Head:** `fix/scss-dark-theme-scope` --- ### 📝 Commits (1) - [`7693d4c`](https://github.com/harvard-edge/cs249r_book/commit/7693d4c74c74a103ac81d1b5760de5984a341b0c) fix(quarto/scss): scope light-text overrides to dark theme ### 📊 Changes **1 file changed** (+4 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tinytorch/quarto/assets/styles/style.scss` (+4 -2) </details> ### 📄 Description ## Summary - Wrap the `#quarto-content h3` and `pre code` color overrides in `[data-bs-theme="dark"]` so they only apply in dark mode. - Add an inline comment explaining the scoping. ## Why The unscoped rules forced near-white text (`#d0d0d0`, `#e6e6e6`) on h3 headings and `pre code` blocks regardless of theme, which left those elements unreadable in light mode. Gating on the dark-theme attribute restores Quarto's default light-mode contrast while preserving the dark-mode appearance. ## Test plan - [ ] `quarto preview` from `tinytorch/quarto/` and confirm h3 / `pre code` render correctly in light mode. - [ ] Toggle to dark mode and confirm light text is still applied. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-03 01:29:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#9218