detect-transition
Feature detection and property finder for CSS3 transition, transform and transition-timing-function properties.
Installation
NPM/Browserify
$ npm install --save detect-transition
API
Run the detector and get the correct properties by requiring the module.
var transforms = ;
require('detect-transition').transition
Returns either the correct transition
property for the browser or false.
- transition
- -webkit-transition
- MozTransition
- msTransition
if transformstransition elstyletransformstransition = "width 2s;" else // some fallback system... no css transitions supported
require('detect-transition').transform
Returns either the correct transform
property for the browser or false.
- transform
- -webkit-transform
- MozTransform
- msTransform
if transformstransform elstyletransformstransform = "rotateY(15deg)"; else // some fallback system ...
require('detect-transition').timingFunctions
Returns either the correct timing-function
property for the browser or false.
- transitionTimingFunction
- -webkit-transition-timing-function
- MozTransitionTimingFunction
- msTransitionTimingFunction
if transformstimingFunctions elstyletransformstimingFunctions = "ease-in"; else // some fallback system ...
License
MIT