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:
499 bytes
|
Line | |
---|
1 | import isPrefixedValue from 'css-in-js-utils/lib/isPrefixedValue';
|
---|
2 |
|
---|
3 | var prefixes = ['-webkit-', '-moz-', ''];
|
---|
4 | var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;
|
---|
5 |
|
---|
6 | export default function gradient(property, value) {
|
---|
7 | if (typeof value === 'string' && !isPrefixedValue(value) && values.test(value)) {
|
---|
8 | return prefixes.map(function (prefix) {
|
---|
9 | return value.replace(values, function (grad) {
|
---|
10 | return prefix + grad;
|
---|
11 | });
|
---|
12 | });
|
---|
13 | }
|
---|
14 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.