source: imaps-frontend/node_modules/inline-style-prefixer/lib/plugins/imageSet.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: 695 bytes
RevLine 
[d565449]1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = imageSet;
7
8var _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');
9
10var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
11
12function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
14// http://caniuse.com/#feat=css-image-set
15var prefixes = ['-webkit-', ''];
16
17function 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.