1.0.0-2 • Published 2 years ago
@codebundlesbyvik/css-media-functions v1.0.0-2
css-media-functions
JavaScript helper functions for CSS media features.
Installation
npm install @codebundlesbyvik/css-media-functions
Included functions
motionAllowed()
Checks prefers-reduced-motion
and returns a Boolean based on the result.
Parameters
- None
Usage
import motionAllowed from "@codebundlesbyvik/css-media-functions";
// prefers-reduced-motion: no-preference OR unsupported
motionAllowed();
// > true
// prefers-reduced-motion: reduce
motionAllowed();
// > false
License
MIT © Viktor Chin-Kon-Sung