Skip to content

Fix @ccprop typo hiding four CSS properties from the docs - #132

Merged
spaceninja merged 1 commit into
mainfrom
fix-cssprop-typo
Aug 26, 2026
Merged

Fix @ccprop typo hiding four CSS properties from the docs#132
spaceninja merged 1 commit into
mainfrom
fix-cssprop-typo

Conversation

@spaceninja

Copy link
Copy Markdown
Member

Overview

Four of the component's themeable custom properties — --focus-width, --focus-color, --divider-width, and --divider-color — were tagged @ccprop instead of @cssprop in the source JSDoc. web-component-analyzer doesn't recognize that spelling, so it skipped them entirely. The properties have worked all along and consumers can set them today, but they never showed up in the published documentation, and editors reading manifest-vscode.json wouldn't autocomplete them. This corrects the four tags and regenerates the manifests, which adds the missing entries to manifest.json and manifest.md.

The manifest test added in #129 checks that every property tagged @cssprop in the source reaches the manifest — so it covered the four recovered properties automatically, with no changes needed. But that framing means it could never have caught this bug in the first place: a misspelled tag is invisible to a test that only looks at correctly spelled ones. So this also adds a companion test that rejects any @…prop… tag the analyzer wouldn't recognize, which fails with the offending spelling named. @cssprop and @cssproperty are both accepted, since the analyzer honors both.

Screenshots

Testing

  • Check out this branch, run npm ci, then npm test — 54 tests should pass
  • Open manifests/manifest.md and confirm the CSS Custom Properties table now lists ten rows, including --divider-color, --divider-width, --focus-color, and --focus-width
  • In src/index.js, change one @cssprop back to @ccprop and run npm test — a test should fail saying the tag isn't spelled the way the analyzer expects, naming ccprop. Revert the change.
  • Run npm start and open the demo page — this is a documentation-only change, so the component should look and behave exactly as it does on main

Closes #130

`--focus-width`, `--focus-color`, `--divider-width`, and `--divider-color`
were tagged `@ccprop` rather than `@cssprop`, so web-component-analyzer
skipped them. They have been supported all along, but never appeared in
the published docs or in editor autocomplete.

The existing manifest test only checks tags that are already spelled
correctly, so it could never have caught this. Adds a companion test that
rejects any `@…prop…` tag the analyzer would not recognize.
@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for image-compare-component ready!

Name Link
🔨 Latest commit 36ee20c
🔍 Latest deploy log https://app.netlify.com/projects/image-compare-component/deploys/6a8f2be1598c0c0008f6e5d0
😎 Deploy Preview https://deploy-preview-132--image-compare-component.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@spaceninja
spaceninja merged commit eee63d0 into main Aug 26, 2026
6 checks passed
@spaceninja
spaceninja deleted the fix-cssprop-typo branch August 26, 2026 18:10
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.

Typo in JSDoc tag hides four CSS custom properties from the manifests

1 participant