From ca94eb7302e4e14fab7286867eb12a26ebe23ef5 Mon Sep 17 00:00:00 2001 From: Phil Scott Date: Sun, 12 Jul 2026 09:09:51 -0400 Subject: [PATCH] refactor(docs): fold brand CSS into MonorailCSS utility compositions Split BrandStyling's declarative CSS into two forms by what each is good at. The repetitive box-model + colour + .dark/:hover twin rules move into a new `Applies` map (CssFrameworkSettings.Applies: selector -> utility string, expanded into @layer components), folding each variant pair into one dark:/hover: value. Program.cs wires it via CustomCssFrameworkSettings. ExtraStyles keeps only the genuine residue: at-rules, pseudo-elements, --beck-* token tables, and gnarly literals a utility wouldn't clarify. The playground toolbar (PlaygroundIsland.razor) and the lightbox chrome (site.js) move to utility classes directly on their elements; the `.beck-lightbox` hook stays only for the ::backdrop / @starting-style / cloned-svg sizing that utilities can't reach. Pin MonorailCss 0.1.3 explicitly (Directory.Packages.props + Beck.Docs.csproj) for the Applies bug fixes not yet flowed through Pennington. --- Directory.Packages.props | 1 + docs/Beck.Docs.Client/PlaygroundIsland.razor | 95 ++++-- docs/Beck.Docs/Beck.Docs.csproj | 2 + docs/Beck.Docs/BrandStyling.cs | 315 ++++++------------- docs/Beck.Docs/Program.cs | 6 + docs/Beck.Docs/wwwroot/js/site.js | 10 +- 6 files changed, 171 insertions(+), 258 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 5a4f5c9..420f18a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,6 +3,7 @@ + +