1.0.0-2 • Published 2 years ago

@codebundlesbyvik/css-media-functions v1.0.0-2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

css-media-functions

npm

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