0.1.0 • Published 5 years ago

@ryanmorr/is-style-supported v0.1.0

Weekly downloads
15
License
Unlicense
Repository
github
Last release
5 years ago

isStyleSupported

Version Badge Build Status License

Feature test support for CSS properties and their assignable values

Install

Download the development or minified version, or install via NPM:

npm install @ryanmorr/is-style-supported

Usage

Provide a style property as the first argument in standard CSS notation (kebab-case/hyphenated). You can use the optional second argument to determine support for the property's assignable value as well.

import isStyleSupported from '@ryanmorr/is-style-supported';

// Feature test CSS animations
isStyleSupported('animation-name');

// Feature test the flexbox layout module
isStyleSupported('display', 'flex');

Please note, you will not be required to provide vendor prefixes for properties, that is done internally. However, this is not the case for property values which may require a vendor prefix depending on the value you wish to test.

License

This project is dedicated to the public domain as described by the Unlicense.