From dc53f04b81aa59ccc6835f4b238515a5c3d9f385 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Tue, 11 Aug 2026 05:47:52 -0400 Subject: [PATCH] build(theme): adopt ZB.MOM.WW.Theme 0.4.1 button sizing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit site.css declared `font-size: 0.82rem` literally on `.btn`. Bootstrap sizes buttons through `font-size: var(--bs-btn-font-size)`, and `.btn-sm` / `.btn-group-sm > .btn` do nothing but redefine that variable — so a literal at equal specificity, loaded after Bootstrap, silently flattened every small button in the dashboard into a padding-only difference. `btn-sm` was inert app-wide. The kit now owns the sizing: 0.4.0 shipped the four `--bs-btn-*` overrides in layout.css, which ThemeHead emits ahead of site.css, so removing the local literal restores `.btn-sm` without a local copy. 0.4.1 is a pin-only follow-up (it fixes `.rail-btn-block`, which this app does not use; `theme.css` is byte-identical and the `.btn` rule is unchanged between the two). The rest of the local rule is kept deliberately. 0.4.0 upstreamed sizing only, not `border-radius` / `font-weight` / `white-space`, so deleting the block wholesale would have dropped three app-specific declarations. `border-radius` also stays a literal rather than `--bs-btn-border-radius`, because `.btn-sm` redefines that variable and small buttons would shrink to Bootstrap's radius. Verified in a browser against the running dashboard: `.btn` 13.6px and `.btn-sm` 12.48px, btn-group seams intact, and `--bs-btn-font-size` now declared in exactly two sheets (bootstrap.min.css, layout.css) instead of three. --- .../ZB.MOM.WW.MxGateway.Server.csproj | 2 +- .../wwwroot/css/site.css | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/ZB.MOM.WW.MxGateway.Server/ZB.MOM.WW.MxGateway.Server.csproj b/src/ZB.MOM.WW.MxGateway.Server/ZB.MOM.WW.MxGateway.Server.csproj index a402153..8d299d8 100644 --- a/src/ZB.MOM.WW.MxGateway.Server/ZB.MOM.WW.MxGateway.Server.csproj +++ b/src/ZB.MOM.WW.MxGateway.Server/ZB.MOM.WW.MxGateway.Server.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/ZB.MOM.WW.MxGateway.Server/wwwroot/css/site.css b/src/ZB.MOM.WW.MxGateway.Server/wwwroot/css/site.css index 40542db..fa82bbd 100644 --- a/src/ZB.MOM.WW.MxGateway.Server/wwwroot/css/site.css +++ b/src/ZB.MOM.WW.MxGateway.Server/wwwroot/css/site.css @@ -183,8 +183,19 @@ code { } /* ── Buttons ───────────────────────────────────────────────────────────────── - Flatten Bootstrap buttons onto the single accent + hairline palette. */ -.btn { border-radius: 5px; font-size: 0.82rem; font-weight: 500; white-space: nowrap; } + Flatten Bootstrap buttons onto the single accent + hairline palette. + + Button *sizing* is not here: ZB.MOM.WW.Theme 0.4.0 upstreamed it into + layout.css as --bs-btn-* variable overrides, and ThemeHead emits that sheet + ahead of this one, so it applies without a local copy. Do not reintroduce a + local font-size on .btn — a literal at equal specificity beats Bootstrap's + `font-size: var(--bs-btn-font-size)` and flattens .btn-sm into a + padding-only difference across the whole app. + + What remains is shape, not size, and is app-specific. border-radius stays a + literal rather than --bs-btn-border-radius so .btn-sm cannot shrink it; the + .btn-group seam rules outrank .btn, so groups still render seamed. */ +.btn { border-radius: 5px; font-weight: 500; white-space: nowrap; } .btn-primary { background: var(--accent); border-color: var(--accent);