source: imaps-frontend/node_modules/inline-style-prefixer/es/plugins/crossFade.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 448 bytes
Line 
1import { isPrefixedValue } from 'css-in-js-utils';
2
3var CROSS_FADE_REGEX = /cross-fade\(/g;
4// http://caniuse.com/#search=cross-fade
5var prefixes = ['-webkit-', ''];
6
7export default function crossFade(property, value) {
8 if (typeof value === 'string' && !isPrefixedValue(value) && value.indexOf('cross-fade(') !== -1) {
9 return prefixes.map(function (prefix) {
10 return value.replace(CROSS_FADE_REGEX, prefix + 'cross-fade(');
11 });
12 }
13}
Note: See TracBrowser for help on using the repository browser.