mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-20 01:01:30 -05:00
[PR #1515] [MERGED] refactor(sidebar): consolidate to single source of truth (-1508 lines) #27062
Closed
opened 2026-06-18 16:39:19 -05:00 by GiteaMirror
·
0 comments
No Branch/Tag Specified
dev
audit/mlperf-edu-readiness
feat/mlperf-edu-precondition
gh-pages
vol1/all-final
main
vol1/appendices-final
vol1/ch16-final
vol1/ch15-final
vol1/ch14-final
vol1/ch13-final
vol1/ch11-final
vol1/ch12-final
vol1/ch10-final
vol1/ch9-final
vol1/ch8-final
vol1/ch7-final
vol1/ch6-final
vol1/ch5-final
vol1/ch4-final
vol1/ch3-final
vol1/ch2-final
vol1/frontmater-final
kai/fixing-profile-setting-and-map
chore/staffml-ci-path
fix/callout-flow
vol1/ch10-pass4
vol1/ch9-pass4
vol1/ch8-pass4
vol1/ch7-pass4
vol1/ch6-pass4
vol1/ch5-pass4
vol1/apC-pass3
vol1/ch4-pass4
vol1/ch3-pass4
vol1/ch2-pass4
vol1/ch1-pass4
vol1/frontmatter
vol1/apE-pass3
vol1/apD-pass3
fmt-fix
vol1/ch14-pass3
kai/clarify-community-map-totals
vol1/ch13-pass3
vol1/ch12-pass3
vol1/ch11-pass3
vol1/ch10-pass3
vol1/ch7-pass3
vol1/ch9-pass3
vol1/ch8-pass3
vol1/ch6-pass3
vol1/ch5-pass3
vol1/ch4-pass3
vol1/ch3-pass3
vol1/ch2-pass3
vol1/ch1-pass3
vol1/ch6-pass2
vol1/ch5-pass2
vol1/ch4-pass2
vol1/ch3-pass2
vol1/ch2-pass2
fix/badge-fixes
chore/precommit-cleanup
cleanup/book-validate-paths
fix/staffml-trigger-on-workflow-edits
fix/staffml-reusable-concurrency
feat/container-preflight-urls
instructors-v0.1.1
vol1-pr1957-merged
vol2-v0.2.1
vol1-v0.7.1
vol1-v0.7.0+vol2-v0.2.0
slides-v0.1.0
vol2-v0.2.0
vol1-v0.7.0
tinytorch-v0.1.13
mlsysim-v0.2.0
vol2-v0.1.2
vol1-v0.6.2
tinytorch-v0.1.12
vol2-v0.1.1
vol1-v0.6.1
mlsysim-v0.1.3
vol2-v0.1.0
vol1-v0.6.0
mlsysim-v0.1.2
staffml-v0.1.1
tinytorch-v0.1.11
labs-v0.1.0
kits-v0.1.0
slides-latest
instructors-v0.1.0
staffml-v0.1.0
mlsysim-v0.1.1
mlsysim-v0.1.0
tinytorch-v0.1.10
build-verified-windows-v1
tinytorch-v0.1.9
tinytorch-v0.1.8
mit-submission-v1
tinytorch-v0.1.7
tinytorch-v0.1.6
tinytorch-v0.1.5
tinytorch-slides-v0.1.0
tinytorch-v0.1.3
tinytorch-v0.1.4
tinytorch-v0.1.2
tinytorch-v0.1.1
tinytorch-v0.1.0
book-v0.5.1
tinytorch-audio-v0.1.1
tinytorch-audio-assets-v0.1
book-v0.5.0
book-v0.4.2
book-v0.4.1
book-v0.4.0
book-v0.3.0
book-v0.2.0
book-v0.1.0
Labels
Clear labels
area: book
area: collabs
area: kits
area: labs
area: socratiq
area: staffml
area: tinytorch
area: tools
area: website
bug
dependencies
format: epub
format: pdf
javascript
link-health
link-rot
priority-high
pull-request
staffml
type: bug
type: citation
type: code
type: errata
type: improvement
type: new
type: question
vault-sli
Mirrored from GitHub Pull Request
No labels
pull-request
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/cs249r_book#27062
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1515
Author: @profvjreddi
Created: 4/24/2026
Status: ✅ Merged
Merged: 4/24/2026
Merged by: @profvjreddi
Base:
dev← Head:refactor/sidebar-single-source-of-truth📝 Commits (1)
4c33d66refactor(sidebar): consolidate to single source of truth📊 Changes
5 files changed (+23 additions, -1531 deletions)
View changed files
📝
book/quarto/assets/styles/_base-styles.scss(+7 -59)➖
book/quarto/assets/styles/style.scss(+0 -1351)📝
kits/assets/styles/style.scss(+6 -41)📝
labs/assets/styles/style.scss(+5 -40)📝
mlsysim/docs/styles/style.scss(+5 -40)📄 Description
Summary
The follow-up to PR #1514. That PR tightened the shared partial's values; this PR removes the duplicates so there's actually one place to edit going forward.
Before: five places defined
.sidebar-navigation .sidebar-item a— the shared partial + four per-site copies, each keyed off a different accent variable (`$accent`, `$kits-accent`, `$colabs-accent`, `$mlsysim-accent`). Plus a 1350-line orphan `book/quarto/assets/styles/style.scss` that was referenced nowhere and carried yet another copy.After: every site imports the shared partial once. Each site aliases `$accent` to its own site-accent (book via `themes/_theme-harvard`, kits/labs/mlsysim at line 19 of their `style.scss`), so the partial's accent-keyed hover/active states resolve to the right color per site without needing per-site rule copies.
Diff stat
Net −1508 lines, zero behavior change — the partial was already tightened to match these exact values in PR #1514, so removing the duplicates does nothing visible.
Orphan file deletion
`book/quarto/assets/styles/style.scss` was orphaned — the book's builds consume `style-vol1.scss` and `style-vol2.scss` (referenced in `book/quarto/config/_quarto-html-vol1.yml` line 175 and `_quarto-html-vol2.yml` line 178). I checked every `.yml`, `Makefile`, `.sh`, `.py`, `.js`, and `*.scss` file for references to `style.scss` — zero hits. Safe to delete. If something obscure turns up needing it, restore from `git show HEAD^:book/quarto/assets/styles/style.scss`.
Kept per-site
Two site-specific sidebar extras stay in their respective files because they're genuinely site-specific, not duplicated shape:
These are additive — they style different things from the shared rules.
Untouched
Test plan
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.