Skip to content
This repository has been archived by the owner on Nov 12, 2017. It is now read-only.

Commit

Permalink
1.0.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
rofrischmann committed Feb 29, 2016
1 parent ed6e702 commit 93a3947
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 15 deletions.
5 changes: 5 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Changelog

## 1.0
### 1.0.1
* pulled a bugfix by Khan Academy that dash-cases fallback properties (https://github.com/Khan/inline-style-prefixer/commit/f41f3040ac27eeec3b7a1fb7450ddce250cac4e4)
* optimized `Webkit`-prefixed `transition` values (https://github.com/rofrischmann/inline-style-prefix-all/issues/2)

### 1.0.0
Initial version
66 changes: 53 additions & 13 deletions dist/prefixAll.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,76 @@ Object.defineProperty(exports, '__esModule', {
});
exports['default'] = calc;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var _utilsCamelToDashCase = require('../utils/camelToDashCase');

var _utilsCamelToDashCase2 = _interopRequireDefault(_utilsCamelToDashCase);

function calc(property, value) {
if (typeof value === 'string' && value.indexOf('calc(') > -1) {
return _defineProperty({}, property, ['-webkit-', '-moz-', ''].map(function (prefix) {
return value.replace(/calc\(/g, prefix + 'calc(');
}).join(';' + property + ':'));
}).join(';' + (0, _utilsCamelToDashCase2['default'])(property) + ':'));
}
}

module.exports = exports['default'];
},{}],2:[function(require,module,exports){
},{"../utils/camelToDashCase":12}],2:[function(require,module,exports){
'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = cursor;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _utilsCamelToDashCase = require('../utils/camelToDashCase');

var _utilsCamelToDashCase2 = _interopRequireDefault(_utilsCamelToDashCase);

var values = new Set(['zoom-in', 'zoom-out', 'grab', 'grabbing']);

function cursor(property, value) {
if (property === 'cursor' && values.has(value)) {
return {
cursor: ['-webkit-', '-moz-', ''].map(function (prefix) {
return prefix + value;
}).join(';' + property + ':')
}).join(';' + (0, _utilsCamelToDashCase2['default'])(property) + ':')
};
}
}

module.exports = exports['default'];
},{}],3:[function(require,module,exports){
},{"../utils/camelToDashCase":12}],3:[function(require,module,exports){
'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = flex;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _utilsCamelToDashCase = require('../utils/camelToDashCase');

var _utilsCamelToDashCase2 = _interopRequireDefault(_utilsCamelToDashCase);

var values = new Set(['flex', 'inline-flex']);

function flex(property, value) {
if (property === 'display' && values.has(value)) {
return {
display: ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value].join(';' + property + ':')
display: ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value].join(';' + (0, _utilsCamelToDashCase2['default'])(property) + ':')
};
}
}

module.exports = exports['default'];
},{}],4:[function(require,module,exports){
},{"../utils/camelToDashCase":12}],4:[function(require,module,exports){
'use strict';

Object.defineProperty(exports, '__esModule', {
Expand Down Expand Up @@ -103,8 +123,14 @@ Object.defineProperty(exports, '__esModule', {
});
exports['default'] = flexboxOld;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var _utilsCamelToDashCase = require('../utils/camelToDashCase');

var _utilsCamelToDashCase2 = _interopRequireDefault(_utilsCamelToDashCase);

var alternativeValues = {
'space-around': 'justify',
'space-between': 'justify',
Expand Down Expand Up @@ -136,7 +162,7 @@ function flexboxOld(property, value) {
}
if (property === 'display' && alternativeValues[value]) {
return {
display: ['-webkit-' + alternativeValues[value], value].join(';' + property + ':')
display: ['-webkit-' + alternativeValues[value], value].join(';' + (0, _utilsCamelToDashCase2['default'])(property) + ':')
};
}
if (alternativeProps[property]) {
Expand All @@ -146,37 +172,49 @@ function flexboxOld(property, value) {
}

module.exports = exports['default'];
},{}],6:[function(require,module,exports){
},{"../utils/camelToDashCase":12}],6:[function(require,module,exports){
'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = gradient;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var _utilsCamelToDashCase = require('../utils/camelToDashCase');

var _utilsCamelToDashCase2 = _interopRequireDefault(_utilsCamelToDashCase);

var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;

function gradient(property, value) {
if (typeof value === 'string' && value.match(values) !== null) {
return _defineProperty({}, property, ['-webkit-', '-moz-', ''].map(function (prefix) {
return prefix + value;
}).join(';' + property + ':'));
}).join(';' + (0, _utilsCamelToDashCase2['default'])(property) + ':'));
}
}

module.exports = exports['default'];
},{}],7:[function(require,module,exports){
},{"../utils/camelToDashCase":12}],7:[function(require,module,exports){
'use strict';

Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = sizing;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var _utilsCamelToDashCase = require('../utils/camelToDashCase');

var _utilsCamelToDashCase2 = _interopRequireDefault(_utilsCamelToDashCase);

var properties = new Set(['maxHeight', 'maxWidth', 'width', 'height', 'columnWidth', 'minWidth', 'minHeight']);
var values = new Set(['min-content', 'max-content', 'fill-available', 'fit-content', 'contain-floats']);

Expand All @@ -186,12 +224,12 @@ function sizing(property, value) {
if (properties.has(property) && values.has(value)) {
return _defineProperty({}, property, ['-webkit-', '-moz-', ''].map(function (prefix) {
return prefix + value;
}).join(';' + property + ':'));
}).join(';' + (0, _utilsCamelToDashCase2['default'])(property) + ':'));
}
}

module.exports = exports['default'];
},{}],8:[function(require,module,exports){
},{"../utils/camelToDashCase":12}],8:[function(require,module,exports){
'use strict';

Object.defineProperty(exports, '__esModule', {
Expand Down Expand Up @@ -252,7 +290,9 @@ function transition(property, value) {

var outputValue = multipleValues.join(',');
return {
v: (_ref = {}, _defineProperty(_ref, 'Webkit' + (0, _utilsCapitalizeString2['default'])(property), outputValue), _defineProperty(_ref, property, outputValue), _ref)
v: (_ref = {}, _defineProperty(_ref, 'Webkit' + (0, _utilsCapitalizeString2['default'])(property), outputValue.split(',').filter(function (value) {
return value.match(/-moz-|-ms-/) === null;
}).join(',')), _defineProperty(_ref, property, outputValue), _ref)
};
})();

Expand Down
Loading

0 comments on commit 93a3947

Please sign in to comment.