main
Last change
on this file 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 | |
---|
1 | import { isPrefixedValue } from 'css-in-js-utils';
|
---|
2 |
|
---|
3 | var CROSS_FADE_REGEX = /cross-fade\(/g;
|
---|
4 | // http://caniuse.com/#search=cross-fade
|
---|
5 | var prefixes = ['-webkit-', ''];
|
---|
6 |
|
---|
7 | export 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.