npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@schalkneethling/css-property-type-validator-cli

v0.8.0

Published

CLI for CSS custom property type validator.

Readme

@schalkneethling/css-property-type-validator-cli

Command-line interface for CSS Property Type Validator.

Use it locally or in CI to validate CSS @property registrations, registered var() usage, simple fallback branches, and authored assignments to registered custom properties. Static unresolved no-fallback var() checks are available as an opt-in.

Install

npm install --global @schalkneethling/css-property-type-validator-cli

Or run it without installing:

npx @schalkneethling/css-property-type-validator-cli "src/**/*.css"

Usage

css-property-type-validator "src/**/*.css"
css-property-type-validator "src/**/*.css" --format json
css-property-type-validator "src/**/*.css" --registry "src/tokens/**/*.css"
css-property-type-validator "src/tokens/**/*.css" --registry-only
css-property-type-validator "src/**/*.css" --check-unknown-custom-properties --tokens "src/tokens/**/*.css"
css-property-type-validator "src/**/*.css" --failfast
css-property-type-validator generate "src/**/*.css" --out properties.css

Use --registry multiple times to include shared registration sources:

css-property-type-validator "src/**/*.css" \
  --registry "src/tokens/**/*.css" \
  --registry "src/brand/**/*.css"

The CLI follows local unconditioned @import rules while assembling the registry and known custom property inputs, including relative and root-relative imports. Remote and conditioned imports are skipped.

Unresolved var() diagnostics are static known-inputs checks enabled with --check-unknown-custom-properties. Use --tokens to seed known custom property names from token files without validating ordinary declarations from those files. These diagnostics do not attempt a full browser cascade evaluation for a specific DOM element.

The CLI prints a warning when unresolved checks are enabled without --tokens, and when --tokens is provided without enabling unresolved checks.

By default, the CLI collects and reports all validation failures. Use --failfast to stop after the first validation failure, whether it comes from registry assembly, @property validation, or declaration usage validation. Exit codes and human/JSON output formats are unchanged.

Generate Registrations

The experimental generate command writes inferred @property rules to properties.css by default:

css-property-type-validator generate "src/**/*.css"

Use --out <path> to specify another file, --force to overwrite an existing output file, and --format json to inspect generated and review-needed candidates.

Generation needs concrete authored custom property declarations:

:root {
  --brand-color: red;
  --space: 1px;
}

var() usage sites are optional. Alias tokens such as --border-color: var(--brand-color) can generate only when the referenced token declarations are also passed to the command. If the generator only sees aliases and not the concrete primitive values they point to, those aliases are returned as review items.

Exit Codes

  • 0 no diagnostics found
  • 1 validation diagnostics found
  • 2 CLI or input failure

Repository: schalkneethling/css-property-type-validator