refactor(docs): fold brand CSS into MonorailCSS utility compositions#13
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Refactors how the docs site's brand styling is authored, without changing the rendered result.
BrandStylingnow feeds MonorailCSS in two forms, split by what each is actually good at:Applies(new) — component classes as utility compositions (CssFrameworkSettings.Applies: selector → space-separated utilities, expanded into@layer components). This absorbs the repetitive box-model + colour +.dark/:hovertwin CSS, folding each variant pair into a singledark:/hover:value. Covers the syntax tokens, lazy gallery slots, syntax-chip filters, API nav links, and the icon gallery cards.ExtraStyles— keeps only the genuine residue that isn't utility-shaped: at-rules (@keyframes,@starting-style,@media), pseudo-elements (::backdrop,::-webkit-scrollbar),--beck-*token / colour-scheme tables, and literals a utility wouldn't clarify (the dot-grid radial gradient,color-mixscrims).Program.cswiresAppliesin viaCustomCssFrameworkSettings.The playground toolbar (
PlaygroundIsland.razor) and the lightbox chrome (site.js) move to utility classes directly on their elements..beck-lightboxsurvives only as the hook for the::backdrop/@starting-style/ cloned-SVG sizing that utilities can't express.Packaging
Pins
MonorailCss 0.1.3explicitly (Directory.Packages.props+ an explicitPackageReferenceinBeck.Docs.csproj) forAppliesbug fixes not yet flowed through Pennington.Notes
.dark, so the CSS themes itself as before.dotnet build Beck.slnx -c Releasepasses; the compile confirms theApplies/CustomCssFrameworkSettingsAPI resolves in MonorailCss 0.1.3.