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:
559 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
---|
| 4 | value: true
|
---|
| 5 | });
|
---|
| 6 | exports.default = crossFade;
|
---|
| 7 |
|
---|
| 8 | var _cssInJsUtils = require('css-in-js-utils');
|
---|
| 9 |
|
---|
| 10 | var CROSS_FADE_REGEX = /cross-fade\(/g;
|
---|
| 11 | // http://caniuse.com/#search=cross-fade
|
---|
| 12 | var prefixes = ['-webkit-', ''];
|
---|
| 13 |
|
---|
| 14 | function crossFade(property, value) {
|
---|
| 15 | if (typeof value === 'string' && !(0, _cssInJsUtils.isPrefixedValue)(value) && value.indexOf('cross-fade(') !== -1) {
|
---|
| 16 | return prefixes.map(function (prefix) {
|
---|
| 17 | return value.replace(CROSS_FADE_REGEX, prefix + 'cross-fade(');
|
---|
| 18 | });
|
---|
| 19 | }
|
---|
| 20 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.