mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-22 14:03:46 -05:00
[PR #1529] [MERGED] fix(tinytorch/ux): restore dark-mode contrast on preface + missing overrides #8240
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/1529
Author: @farhan523
Created: 4/25/2026
Status: ✅ Merged
Merged: 4/25/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/tinytorch-dark-mode-contrast📝 Commits (1)
bd94fddfix(tinytorch/ux): restore dark-mode contrast on preface + missing component overrides📊 Changes
2 files changed (+66 additions, -20 deletions)
View changed files
📝
tinytorch/quarto/assets/styles/dark-mode.scss(+45 -0)📝
tinytorch/quarto/preface.qmd(+21 -20)📄 Description
Background
TinyTorch v0.1.10 has dark-on-dark text in dark mode that makes body copy and persona cards invisible , visible on the Welcome page, the home page comparison cards, and the milestone roster. Two structural causes:
style="background: #..."which beats CSS class specificity, so dark-mode rules never apply.What's in this PR
tinytorch/quarto/preface.qmdrefactor (HTML branches only —when-format="pdf"untouched):<div>→::: {.callout-note}(inherits ecosystem dark cascade)..who-grid/.who-cardclasses. Colored left-borders kept inline because they're mode-invariant accents.tinytorch/quarto/assets/styles/dark-mode.scssgap-fill — adds dark overrides for components defined instyle.scsswith hardcoded light colors:.comparison-title.tier-foundation,.tier-architecture,.tier-optimization,.tier-olympics.milestone-card(and nested.milestone-year,.milestone-name,.milestone-desc,:hover).ml-timeline-tech.preview-badge(light yellow → translucent amber).callout-body/.callout-contenttext-color cascade for nestedp / li / span / div— mirrors the pattern inshared/styles/_ecosystem-base-dark.scss:577-584.Light mode visually unchanged.
Test plan
cd tinytorch/quarto && quarto render --to htmlsucceeds for all 52 pages_build/preface.htmlin dark mode — all body text + four persona cards visible_build/index.htmland_build/big-picture.html— tier cards and milestone roster visible in darkdev(no regressions)Known follow-ups (deferred)
tito/milestones.qmd,tito/overview.qmd,tito/data.qmd,tito/modules.qmd,tito/troubleshooting.qmd— still contain inlinestyle=blocks with the same failure mode.$accent: #F59E0Bredeclared indark-mode.scssdefaults block doesn't propagate tolighten($accent, ...)calls in the rules block — they resolve to the light accent#D4740C.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.