Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including tachyons-validate-classnames with all npm packages installed. Try it out:

var tachyonsValidateClassnames = require("tachyons-validate-classnames")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

tachyons-validate-classnames v1.1.2

Validate if a string of CSS to see if it contains valid Tachyons classnames

tachyons-validate-classnames stability

npm version build status test coverage downloads js-standard-style

Validate if a CSS class name is valid for Tachyons. Useful to validate Tachyons overrides are valid.

Usage

const validate = require('tachyons-validate-classnames')

validate('.black { color: white }')
// => { selectors: ['.black'], failed: [] }

validate('.foo { color: white }')
// => { selectors: ['.foo'], failed: ['.foo'] }

CLI

Usage: tachyons-validate-classnames [options] [filename]

Options:
  -h, --help        Output usage information
  -v, --version     Output version number

Examples:
  $ tachyons-validate-classnames ./bundle.css  # Validate a file
  $ curl foobar.com/bundle.css | tachyons-validate-classnames  # Validate stdin

Docs: https://github.com/yoshuawuyts/tachyons-validate-class
Bugs: https://github.com/yoshuawuyts/tachyons-validate-class/issues

API

validate(css)

Validate a string of CSS. Returns all selectors and all failed selectors.

Installation

$ npm install tachyons-validate-classnames

License

MIT

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free