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