mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-24 17:22:06 -05:00
[PR #1541] [MERGED] fix(tinytorch/ux): readable code-block surface in dark mode #14456
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1541
Author: @profvjreddi
Created: 4/25/2026
Status: ✅ Merged
Merged: 4/25/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/tinytorch-codeblock-dark-mode📝 Commits (1)
0d1b813fix(tinytorch/ux): readable code-block surface in dark mode📊 Changes
1 file changed (+19 additions, -0 deletions)
View changed files
📝
tinytorch/quarto/assets/styles/dark-mode.scss(+19 -0)📄 Description
Follow-up to #1537. The shipped dark-mode coverage was correct for panels/sidebar/cards, but Quarto's default code-block style is
```css
div.sourceCode { background: rgba(233, 236, 239, 0.65); }
```
— a LIGHT fill at 65% opacity. Over the dark body (`#1a1a1a`) that blends to a washed-out medium grey (~`#a0a0a0`) which fights the syntax-highlighted foreground. User reported this on the live site after #1537 deployed.
Fix
Override in `dark-mode.scss`:
Verification
Local Playwright on getting-started.html (most code-heavy page): code block bg `rgb(34, 38, 44)` = `#22262c`, border `#454d55`, body bg unchanged `#1a1a1a`. Visually distinct rectangles, syntax highlighting now reads cleanly.
Deploy
Same path as #1537: merge → re-trigger `tinytorch-publish-live` with `site_only: true`.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.