From ebc7a25517c4fe9f9b0878c760ef24c4a714b867 Mon Sep 17 00:00:00 2001 From: Hermes BUILD <48018975+nujovich@users.noreply.github.com> Date: Tue, 21 Jul 2026 17:41:12 +0200 Subject: [PATCH 1/4] chore(mint): scaffold BUILD-PLAN for @property type-check (card #8) --- BUILD-PLAN-issue-8.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 BUILD-PLAN-issue-8.md diff --git a/BUILD-PLAN-issue-8.md b/BUILD-PLAN-issue-8.md new file mode 100644 index 0000000..a5f3027 --- /dev/null +++ b/BUILD-PLAN-issue-8.md @@ -0,0 +1,11 @@ +# BUILD-PLAN-issue-8.md + +**Card:** https://github.com/nujovich/mint-radar/issues/8 +**Decision:** Nadia approved ready-to-build (2026-06-16 PLAN) + +## Milestones + +- [ ] Milestone 1 — Extend audit prompt in lib/prompts.mjs with @property analysis step: detect @property registrations, validate var() assignments against declared syntax, report type mismatches +- [ ] Milestone 2 — Add @property type-check fields to AuditReport type in lib/types.ts +- [ ] Milestone 3 — Wire @property results in the playground UI (app/page.tsx) +- [ ] Milestone 4 — Add test fixture with @property examples in lib/**fixtures**/ and corresponding test in lib/**tests**/ From 626aa7901f36d01d30b287618332fff5e7232b21 Mon Sep 17 00:00:00 2001 From: Hermes BUILD <48018975+nujovich@users.noreply.github.com> Date: Tue, 21 Jul 2026 17:47:25 +0200 Subject: [PATCH 2/4] feat(mint): add @property type-check analysis step to CSS audit prompt --- lib/prompts.mjs | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/lib/prompts.mjs b/lib/prompts.mjs index 130236a..bd844fb 100644 --- a/lib/prompts.mjs +++ b/lib/prompts.mjs @@ -198,7 +198,49 @@ For each such case, record: - "severity": "suggestion" - "reason": a specific message identifying the overflow risk (e.g. "Grid container with fixed height but no overflow handling — content may be clipped if grid items exceed the container" or "Flex container with max-width and no overflow property — ensure overflow is handled explicitly") -Only report up to 8 overflowSafetyIssues total. Prioritize flex-wrap-missing (warnings) first, then missing-overflow-wrap (suggestions). +Only report up to 8 overflowSafetyIssues total. Prioritize flex-wrap-missing (warnings) first, then missing-overflow-wrap (suggestions). + +STEP 13 — CSS @PROPERTY TYPE CHECKING +Scan the CSS for @property at-rules. An @property registration defines a custom property's type contract via the syntax descriptor: + +@property --my-color { + syntax: ""; + inherits: true; + initial-value: #ff0000; +} + +For each @property registration found: +- Record the property name (e.g. "--my-color"), its declared syntax (e.g. "", "", ""), and the initial-value if present. +- Then scan all var() usages of that registered property throughout the CSS. A var() usage is any appearance of var(--prop-name) in a property value. +- For each var() usage, check whether the assigned value or context is compatible with the declared syntax: + - : accepts hex, rgb(), rgba(), hsl(), hsla(), named colors, currentColor, transparent + - : accepts px, em, rem, vh, vw, vmin, vmax, ch, ex, cm, mm, in, pt, pc, 0, calc() expressions + - : accepts plain numbers (1, 0.5, 2.3), calc() that evaluates to a number + - : accepts whole numbers (1, 0, -1), calc() that evaluates to an integer + - : accepts percentage values (50%, 100%) + - : accepts deg, rad, grad, turn + -