Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Feature test support for CSS properties and their assignable values

License

Notifications You must be signed in to change notification settings

ryanmorr/is-style-supported

Repository files navigation

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.

About

Feature test support for CSS properties and their assignable values

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published