diff --git a/COMPLETED.md b/COMPLETED.md index 5be3fc4..593d28b 100644 --- a/COMPLETED.md +++ b/COMPLETED.md @@ -60,6 +60,31 @@ Collapsed the two divergent Razor trees in `AudioPlayerBar.razor` (`@if (_isDesk **Notes for future work:** - First-render layout flash eliminated by construction (CSS media query evaluates at paint, not async subscription). +### Track Card Plain-Shell Refactor + +**Landed 2026-06-05.** + +Eliminated `!important` declarations from track card CSS by replacing MudBlazor surface components with plain HTML. Implemented per `product-notes/track-card-css-architecture.md` Option A. + +**Razor changes (`DeepDrftShared.Client/Components/TrackCard.razor`):** +- `MudCard` → `
` +- Fallback `MudPaper` → `
` +- `MudCardContent` → `
` +- `MudText`, `MudChip`, `MudFab` unchanged. + +**CSS changes (`DeepDrftPublic/wwwroot/styles/deepdrft-styles.css` §8):** +- Removed four `!important` declarations from `.deepdrft-track-card-container`, `.deepdrft-track-card-fallback` base, and the dark/light theme-scoped variants. +- Plain single-class selectors now win by cascade without `!important`; theme-scoped rules use normal specificity hierarchy. + +**Scope:** +- `TrackCard` component in shared `DeepDrftShared.Client` consumed by both public site and CMS. +- CSS in `DeepDrftPublic/wwwroot/styles/deepdrft-styles.css` (public site only). +- Build clean: 0 errors, 0 new warnings. + +**Notes for future work:** +- Plain-div shell re-enables CSS isolation as an option (a `TrackCard.razor.css` would now work against the shell divs). Section 8's public-only scoping remains convenient; isolation is optional for future polish. +- Removes the structural mismatch of using a Material surface component (`MudCard`/`MudPaper`) solely as a layout shell. TrackCard now mirrors the construction of `NowPlayingCard` (plain divs + themed CSS). + **Status:** Desktop AudioPlayerBar redesign landed on 2026-06-04. ### Desktop AudioPlayerBar — migrate to MudBlazor theme system diff --git a/product-notes/track-card-css-architecture.md b/product-notes/track-card-css-architecture.md new file mode 100644 index 0000000..9d51a9b --- /dev/null +++ b/product-notes/track-card-css-architecture.md @@ -0,0 +1,446 @@ +# Track Card CSS Architecture — eliminate `!important` from section 8 + +Status: completed. Author: product-designer. Date: 2026-06-05. Implementer: daniel-c-harvey. Landed: 2026-06-05. + +Predecessor: [`track-card-theming.md`](track-card-theming.md) (completed 2026-06-05) landed the +navy-glass + moss-green treatment and, in doing so, introduced the two `!important` rules this +spec exists to remove. That note is the *what it should look like*; this note is the *how the +CSS should be structured so it looks like that without `!important`*. Nothing here changes the +visual design — only the mechanism. + +--- + +## §1. Root cause analysis — why MudCard/MudPaper fight our CSS + +### 1.1 The two `!important` rules in question + +`DeepDrftPublic/wwwroot/styles/deepdrft-styles.css` section 8: + +```css +.deepdrft-track-card-container { ... background: transparent !important; } /* line 222 */ +.deepdrft-track-card-fallback { ... background: var(--deepdrft-navy-mid, #162437) !important; } /* line 268 */ +.deepdrft-theme-dark .deepdrft-track-card-fallback { ... !important; } /* line 273 */ +.deepdrft-theme-light .deepdrft-track-card-fallback { ... !important; } /* line 280 */ +``` + +Four `!important` declarations, all on `background`, all on elements rendered by MudBlazor +(`MudCard` → container, `MudPaper` → fallback). + +### 1.2 What MudBlazor paints and with what selector + +MudBlazor ships a single global `