mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-06 17:49:07 -05:00
[PR #1527] [MERGED] fix(tinytorch/ux): restore H2-H6 decoration override + de-header comparison cards #7393
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/1527
Author: @profvjreddi
Created: 4/24/2026
Status: ✅ Merged
Merged: 4/24/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/tinytorch-h3-decoration-restore📝 Commits (1)
b397e5cfix(tinytorch/ux): restore H2–H6 decoration override + de-header comparison cards📊 Changes
2 files changed (+21 additions, -4 deletions)
View changed files
📝
tinytorch/quarto/assets/styles/style.scss(+19 -2)📝
tinytorch/quarto/index.qmd(+2 -2)📄 Description
Summary
Two related fixes from a UX walkthrough of http://localhost:4123/:
1. H2–H6 override regression
PR #1524 added an override stripping the shared
_headers.scssL-shape decoration (4px accent left-border + 1px accent bottom-line) from H2–H6 on TinyTorch. The override was dropped in a merge conflict between then and now. Every H3 on a TinyTorch page was rendering with that accent bar again. Restoring with!importantso a future partial edit can't drop the same rule silently.2. Comparison-card titles no longer use H3
The "Why Build Instead of Use?" cards had `### Traditional ML Education` and `### TinyTorch: Build → Use → Reflect` as their titles. Even with the decoration stripped (fix 1), an H3 at 24.65px inside a card reads as a page heading squeezed into a container — wrong scale, wrong semantics (the whole card is the content; there's no "sub-section" for the title to label). Swapped to a styled
<span>class:New
.comparison-titleclass: 1.15rem (~18.4px), 600 weight, no border — properly card-scaled, zero heading baggage (no TOC entry, no doc-outline pollution, no sidebar auto-entry).Before / after
Before (h3 with L-shape — user flagged "looks weird"):
font-size: 24.65px,border-left: 4px solid #d4740c,border-bottom: 1px solid rgba(212,116,12,.25)After (styled span, no decoration):
font-size: 19.55px,border-left: 0,border-bottom: 0Screenshot of fixed state:
/tmp/banner-work/compare-fixed.png— titles render as clean bold text without underline or accent bar.Font audit (no changes needed)
From a walk of the home, module, and milestone pages:
All consistent with the ecosystem font stack. Nothing else to change — the only real issue was the H3-in-a-card scale problem, which #2 resolves by moving out of heading semantics entirely.
Test plan
h3inside.comparison-bad/.comparison-good.comparison-titlespan renders at 19.55px, no borders🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.