From 56cb65b23d6f869c1cef9066e8d457a99faaed2d Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 12 Nov 2026 11:20:51 +0000 Subject: [PATCH] refactor(sys-front-inj-design): split design tokens into tokens.css.j2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit default.css.j2 now includes tokens.css.j2, which holds only the --design-* tokens (palette light and dark, font, radius, spacing, shadows, focus ring). A role that serves the tokens on a page without design injection, such as the custom role web-app-cst-brand, renders the same template, so the tokens keep one source. The rendered default.css is byte-identical to before. 🎯 Fix: 95 % 💥 Break: 3 % 💸 Cost: 100 % ⏱️ Time: 100 % 🛡️ Security: ~100 (hand review) 🏆 Score: 92 🚦 Gate: pending (quality-high runs after this commit) Co-Authored-By: Claude Opus 5.5 --- roles/sys-front-inj-design/README.md | 1 + .../templates/css/default.css.j2 | 39 +------------------ .../templates/css/tokens.css.j2 | 38 ++++++++++++++++++ 3 files changed, 40 insertions(+), 38 deletions(-) create mode 100644 roles/sys-front-inj-design/templates/css/tokens.css.j2 diff --git a/roles/sys-front-inj-design/README.md b/roles/sys-front-inj-design/README.md index 346fe15bde..e10f2d52bf 100644 --- a/roles/sys-front-inj-design/README.md +++ b/roles/sys-front-inj-design/README.md @@ -10,6 +10,7 @@ It derives the design tokens from the single base color in `web-svc-design` thro The role renders the shared `default.css` and `bootstrap.css` once per deployment onto the CDN, links them with a cache-busting version, and adds the role's own `style.css` and `design.js` when the role ships them. The role's `style.css` is rendered per vhost and stored once per network the role is served on: the first network keeps `style.css`, every further one gets `