2.0.0 • Published 5 years ago

css-at-supports-browser-h4cks-analyzer v2.0.0

Weekly downloads
153
License
MIT
Repository
github
Last release
5 years ago

css-at-supports-browser-h4cks-analyzer

Build Status Known Vulnerabilities Dependencies Status Dependencies Status XO code style Project: Wallace

A list of tests to determine whether an @supports is a browser hack, derived from the formidable browserhacks.com (Repo).

Installation

npm install css-at-supports-browser-h4cks-analyzer

# or

yarn add css-at-supports-browser-h4cks-analyzer

Usage

const isBrowserHack = require('css-at-supports-browser-h4cks-analyzer')

// @supports rule example => @supports (display: grid) { .selector { } }
console.log(isBrowserHack('(-moz-appearance:meterbar)'))
// => true

console.log(isBrowserHack('(display: grid)'))
// => false

Related projects

  • CSS Analyzer - CSS statistics module
  • Wallace CLI - CSS statistics in your CLI
  • CSS Analyzer Diff - Calculates the diff between two sets of CSS analysis
  • Color Sorter - Sort CSS colors by hue, saturation, lightness and opacity
  • Gromit CLI - A test framework to assert that CSS statistics don't exceed certain thresholds.

License

MIT © Bart Veneman