Skip to content

fix(ui): warm-cream heading ink + manifest static storage for cache busts#59

Merged
ringo380 merged 1 commit into
mainfrom
fix/dark-mode-warm-headings-cache-bust
May 14, 2026
Merged

fix(ui): warm-cream heading ink + manifest static storage for cache busts#59
ringo380 merged 1 commit into
mainfrom
fix/dark-mode-warm-headings-cache-bust

Conversation

@ringo380
Copy link
Copy Markdown
Owner

Summary

Two related fixes following PR #58's near-OLED palette swap, which appeared not to deploy because of stale browser caches.

1. Heading text was still pure white

49 templates use Tailwind `dark:text-white` which generates a `#ffffff` rule and ignored the warm `#e7e5e0` ink token from PR #58. Rather than touch 49 templates, add a single override in `dark-mode.css` that retargets `.dark:text-white` to `#e7e5e0`. Same specificity as Tailwind's own rule; `dark-mode.css` loads after the Tailwind CDN, so source order wins.

2. Browser caches were holding the old CSS

Whitenoise was using `CompressedStaticFilesStorage` — stable URLs across deploys, no cache invalidation. Switched to `CompressedManifestStaticFilesStorage` so files now ship with content-hashed names (e.g. `dark-mode.bd121d.css`). Each deploy produces fresh URLs, and clients pick up the new CSS on the next page load instead of needing a hard-refresh.

Django 5.2 uses the new `STORAGES` dict — the older `STATICFILES_STORAGE` setting was deprecated in 4.2 and silently ignored under the new resolution path. This was why the initial attempt to set `STATICFILES_STORAGE` to manifest storage left `ConfiguredStorage` resolving to the FileSystem default.

Verification

  • `collectstatic --clear` → `169 static files copied, 799 post-processed` (no missing-reference errors)
  • `python manage.py check` → 0 issues
  • Smoke-rendered `/`, `/login/`, `/register/`, `/grade/` → 200
  • Confirmed `staticfiles/analyzer/css/dark-mode.bd121dedd6a4.css` (+ .br + .gz) generated

Test plan

  • Railway redeploy completes; `curl https://querygrade.com/ | grep dark-mode` shows a hashed CSS URL
  • Visit site in a fresh browser session — hero heading renders warm cream, not pure white
  • Existing browsers pick up the new CSS without manual hard-refresh on next page load

…usts

Two related fixes following the near-OLED palette swap.

1. Heading text was still rendering pure white in dark mode.
   49 templates use `dark:text-white` which generates a `#ffffff` rule
   that ignored the warm `#e7e5e0` ink token. Rather than swap all 49
   inline, add a single override in dark-mode.css that retargets
   `.dark\:text-white` to `#e7e5e0`. Same specificity as Tailwind's
   own rule; dark-mode.css loads after the Tailwind CDN, so source
   order wins. Headings, scores, and DD values now share the warm
   cream tone instead of clinical pure white.

2. Switch WhiteNoise to CompressedManifestStaticFilesStorage so static
   files ship with content-hashed URLs (e.g. dark-mode.bd121d.css).
   The previous CompressedStaticFilesStorage kept stable URLs across
   deploys, leaving every client on the prior CSS until they manually
   hard-refreshed — which is what made the palette rework look like
   it hadn't deployed. Django 5.2 uses the STORAGES dict (the
   STATICFILES_STORAGE setting was deprecated in 4.2 and silently
   ignored under the new resolution path).

Verified: collectstatic produces 799 post-processed entries with no
missing-reference errors; Django check passes; smoke-rendered /, /login/,
/register/, /grade/ all return 200.
@ringo380 ringo380 merged commit 5f308ea into main May 14, 2026
@ringo380 ringo380 deleted the fix/dark-mode-warm-headings-cache-bust branch May 14, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant