mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-21 05:28:28 -05:00
[PR #1780] fix(site): dark mode for nav-footer, dropdown-menu, and star-history image #15731
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/1780
Author: @Shashank-Tripathi-07
Created: 5/18/2026
Status: 🔄 Open
Base:
dev← Head:fix/site-dark-mode-and-instructors-audit📝 Commits (2)
1611994fix(site): add nav-footer and dropdown-menu dark mode selectorsa4dba56fix(site/about): replace picture element with JS-driven star-history img📊 Changes
3 files changed (+61 additions, -9 deletions)
View changed files
📝
shared/config/footer-site.yml(+1 -1)📝
shared/styles/_site-dark.scss(+37 -3)📝
site/about/index.qmd(+23 -5)📄 Description
Summary
footer-site.ymlsetbackground: lightwhich pins Bootstrap'sbg-lightclass on the.nav-footerelement regardless of theme. Changed tobackground: noneso the CSS dark override can apply..nav-footermissing from_site-dark.scss: Added.nav-footeralongside.page-footerwith!importantdark background/border so the Quarto-rendered footer element goes dark when the toggle is active..dropdown-menustays white in dark mode: Added.dropdown-menuand.dropdown-itemdark overrides in_site-dark.scssfor the site pages (community, about, newsletter, landing). The site dark file previously had no dropdown styling at all.<picture>element ignores Quarto toggle: The<picture>element insite/about/index.qmdusedmedia="(prefers-color-scheme: dark)"which only reads OS preference. Replaced with a single<img>whosesrcis swapped via aMutationObserverondocument.body.classList-- same pattern used elsewhere in the ecosystem.Files changed
shared/styles/_site-dark.scss-- add.nav-footer+ dropdown dark selectorsshared/config/footer-site.yml-- changebackground: lighttobackground: nonesite/about/index.qmd-- replace<picture>with JSMutationObserverimg swapInstructors audit findings
No new bugs found in
instructors/that are not already covered:instructors/404.qmdalready hasbody.quarto-darkselectors alongside its@mediablock.instructors/foundations-syllabus.qmdlab subtitle fixes (labs 09-15) are already present in localdev-- identical tofork/fix/instructors-lab-subtitle-mismatch.instructors/assets/styles/dark-mode.scsshandles dark mode via SCSS dark theme file (loaded as Quarto dark theme layer), not via@media-- correct pattern.site/about/about.cssandsite/community/community.cssalready use.quarto-darkCSS custom property overrides with no@media (prefers-color-scheme)blocks -- no fix needed.Test plan
mlsysbook.ai/about/-- footer background should go dark🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.