Skip to content

Count :style-bound custom properties as declared in check:collisions - #4

Merged
salaros merged 1 commit into
developmentfrom
chore/collisions-style-bindings
Sep 15, 2026
Merged

salaros merged 1 commit into
developmentfrom
chore/collisions-style-bindings

Conversation

@salaros

@salaros salaros commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Why

npm run check stopped at check:collisions on any machine with a codecave.pro checkout beside this repo, so check:importmap, check:design-sync, check:findings, check:examples and check:links never ran. CI has no site checkout, so it never saw the failure.

The sweep reported 16 names in the site's PartnersBadge.vue as undeclared: --frame, --ink, --banner, --banner-ink, --seg1 to --seg4, and the -hover pair of each. All 16 were false. The component names each one as a key of a style object bound with :style, with a default, and reads it with var() in its scoped block. The checker only counted --x: declarations written in CSS.

What changed

tools/check-tw-collisions.mjs gains bindings(). A custom property named as a quoted object key now counts as declared by the file that binds it, as a declaration in the file's own CSS already did.

Giving PartnersBadge CSS defaults would also have cleared the report. It would have meant a second copy of all 16 defaults in the site repo, and the next component to bind a custom property would fail the same way. INTENDED is untouched, since it records direction-B decisions.

Verification

From a brand checkout with codecave.pro beside it:

  • npm run build:storybook && npm run check exits 0. All eight steps run, and check:collisions reports 59 SFCs scanned across the sources and the site checkout.
  • A throwaway SFC still fails the sweep: a var() that nothing names is reported, and so is a quoted name that is not an object key. A name bound as a :style key passes.

🤖 Generated with Claude Code

check:collisions failed on any machine with a codecave.pro checkout beside
this repo, and the failure stopped `npm run check` before the five checks
after it could run. It reported 16 names in the site's PartnersBadge.vue as
undeclared, and all 16 were false: the component names each one as a key of
a style object bound with :style, with a default, and reads it with var() in
its scoped block. The sweep only read `--x:` declarations written in CSS, so
it could not see a property Vue writes onto the element's style attribute.

A bound key now counts as declared by the file that binds it, as a
declaration in the file's own CSS already did. A var() that nothing names,
and a quoted name that is not an object key, still fail.

CI has no site checkout, so it never saw the failure.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@salaros
salaros merged commit d42fbe2 into development Sep 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant