w3c-css-validator
TypeScript icon, indicating that this package has built-in type declarations

1.3.2 • Public • Published

W3C CSS Validator

npm bundle size Codecov coverage npm downloads npm release tested with Rugged license

A modern package for validating CSS using W3C’s public CSS validator service. Its goal is to simplify and standardize the API that W3C exposes, so that it adheres to newer conventions and is intuitive and easy to use.

  • 📦 Written entirely in TypeScript
  • 🔬 Thoroughly tested
  • ⚡️ Zero dependencies
  • 🤝 Promise-based design
  • ✨ Tiny size
  • 🌎 Works in Node.js and browsers
  • 📖 Well documented

Quick start

Install with Yarn or npm:

yarn add w3c-css-validator
npm install w3c-css-validator

Import or require:

import cssValidator from 'w3c-css-validator';
const cssValidator = require('w3c-css-validator');

Validate some CSS:

const result = await cssValidator.validateText('.foo { text-align: center; }');

Documentation

Read the docs at: https://sparksuite.github.io/w3c-css-validator/docs/

Demo

See it in action: https://sparksuite.github.io/w3c-css-validator/demo/

Contributing

We love contributions! Contributing is easy; learn how.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.3.2
    397
    • latest

Version History

Package Sidebar

Install

npm i w3c-css-validator

Weekly Downloads

899

Version

1.3.2

License

MIT

Unpacked Size

29.5 kB

Total Files

37

Last publish

Collaborators

  • sparksuite-bot
  • wescossick