Count :style-bound custom properties as declared in check:collisions - #4
Merged
Merged
Conversation
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>
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.
Why
npm run checkstopped atcheck:collisionson any machine with a codecave.pro checkout beside this repo, socheck:importmap,check:design-sync,check:findings,check:examplesandcheck:linksnever ran. CI has no site checkout, so it never saw the failure.The sweep reported 16 names in the site's
PartnersBadge.vueas undeclared:--frame,--ink,--banner,--banner-ink,--seg1to--seg4, and the-hoverpair 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 withvar()in its scoped block. The checker only counted--x:declarations written in CSS.What changed
tools/check-tw-collisions.mjsgainsbindings(). 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
PartnersBadgeCSS 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.INTENDEDis untouched, since it records direction-B decisions.Verification
From a brand checkout with codecave.pro beside it:
npm run build:storybook && npm run checkexits 0. All eight steps run, andcheck:collisionsreports 59 SFCs scanned across the sources and the site checkout.var()that nothing names is reported, and so is a quoted name that is not an object key. A name bound as a:stylekey passes.🤖 Generated with Claude Code