mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-06 17:49:07 -05:00
[PR #1330] [MERGED] fix(tinytorch): fix dark mode visibility on overview page role cards and session flow #8124
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/1330
Author: @farhan523
Created: 4/14/2026
Status: ✅ Merged
Merged: 4/16/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/tinytorch-overview-role-cards-dark-mode📝 Commits (6)
c7e3593fix(tinytorch): switch role-cards grid to 2-column layout on overview pageffcd93afix(tinytorch): fix mobile overflow on overview role-cards via CSSe0f4b23fix(tinytorch): add dark mode classes to role cards on overview page4f08164fix(tinytorch): add dark mode CSS for overview role cardsb55d3e3fix(tinytorch): add dark mode class to session flow box on overview page299c898fix(tinytorch): add dark mode CSS for session flow box on overview page📊 Changes
2 files changed (+69 additions, -11 deletions)
View changed files
📝
tinytorch/site/_static/custom.css(+58 -0)📝
tinytorch/site/tito/overview.md(+11 -11)📄 Description
Problem
Two sections on the overview page had invisible text in dark mode due to
hardcoded light colors in inline
styleattributes."Commands by User Role" cards (×3) — three issues per card:
#e3f2fd,#fff3e0,#f3e5f5) only handledby the broad
filter: brightness(0.7)rule, leaving them visibly lightcolor: #37474f(dark gray) — invisible on any dark background#1976d2,#e65100,#7b1fa2) — dark tones unreadableon dimmed pastel backgrounds
"Typical Session Flow" box —
background: #f8f9faandborder: 1px solid #dee2e6with zero dark mode CSS, making all contentinside invisible in dark mode.
Solution
tito/overview.md— Added semantic CSS classes to each affected element:overview-role-card overview-student-cardoverview-role-card overview-instructor-cardoverview-role-card overview-developer-cardoverview-role-headingoverview-role-subtitleoverview-session-box_static/custom.css— Added targetedhtml[data-theme="dark"]overrides:filter: none !importanton all role cards to bypass brightness dimmer,replaced with a proper dark background (
#1e1e2e)#37474fsubtitle text →#94a3b8(muted slate)Student
#1976d2→#90caf9· Instructor#e65100→#ffb74d· Developer#7b1fa2→#ce93d8#f8f9fabg →#1e293b, border →#334155, text →#e2e8f0Files changed
tinytorch/site/tito/overview.md— 10 lines changed (class attributes added)tinytorch/site/_static/custom.css— 38 lines added (dark mode overrides)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.