0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-10 22:24:19 +01:00
Bootstrap/docs/assets/js/vendor/autoprefixer.js

20606 lines
1.1 MiB
JavaScript
Raw Normal View History

2014-11-03 14:32:38 +01:00
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.autoprefixer=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function() {
2015-01-30 14:24:39 +01:00
var Autoprefixer, Browsers, Prefixes, autoprefixer, browserslist, infoCache, isPlainObject, postcss,
2014-11-03 14:32:38 +01:00
__slice = [].slice,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
2015-01-30 14:24:39 +01:00
browserslist = require('browserslist');
2014-11-03 14:32:38 +01:00
postcss = require('postcss');
Browsers = require('./browsers');
Prefixes = require('./prefixes');
infoCache = null;
isPlainObject = function(obj) {
return Object.prototype.toString.apply(obj) === '[object Object]';
};
autoprefixer = function() {
2015-01-30 14:24:39 +01:00
var options, reqs;
2014-11-03 14:32:38 +01:00
reqs = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
if (reqs.length === 1 && isPlainObject(reqs[0])) {
options = reqs[0];
reqs = void 0;
} else if (reqs.length === 0 || (reqs.length === 1 && (reqs[0] == null))) {
reqs = void 0;
} else if (reqs.length <= 2 && (reqs[0] instanceof Array || (reqs[0] == null))) {
options = reqs[1];
reqs = reqs[0];
} else if (typeof reqs[reqs.length - 1] === 'object') {
options = reqs.pop();
}
if ((options != null ? options.browsers : void 0) != null) {
reqs = options.browsers;
}
2015-01-30 14:24:39 +01:00
return new Autoprefixer(autoprefixer.data, reqs, options);
2014-11-03 14:32:38 +01:00
};
autoprefixer.data = {
browsers: require('../data/browsers'),
prefixes: require('../data/prefixes')
};
Autoprefixer = (function() {
2015-01-30 14:24:39 +01:00
function Autoprefixer(data, reqs, options) {
2014-11-03 14:32:38 +01:00
this.data = data;
2015-01-30 14:24:39 +01:00
this.reqs = reqs;
2014-11-03 14:32:38 +01:00
this.options = options != null ? options : {};
this.postcss = __bind(this.postcss, this);
}
Autoprefixer.prototype.process = function(str, options) {
if (options == null) {
options = {};
}
2015-01-30 14:24:39 +01:00
return postcss(this.postcss).process(str, options);
2014-11-03 14:32:38 +01:00
};
Autoprefixer.prototype.postcss = function(css) {
2015-01-30 14:24:39 +01:00
var prefixes;
prefixes = this.prefixes({
from: css.source.input.file
});
2014-11-20 07:04:47 +01:00
if (this.options.remove !== false) {
2015-01-30 14:24:39 +01:00
prefixes.processor.remove(css);
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
return prefixes.processor.add(css);
2014-11-03 14:32:38 +01:00
};
2015-01-30 14:24:39 +01:00
Autoprefixer.prototype.prefixes = function(opts) {
var browsers;
browsers = new Browsers(autoprefixer.data.browsers, this.reqs, opts);
return new Prefixes(autoprefixer.data.prefixes, browsers, this.options);
2014-11-03 14:32:38 +01:00
};
2015-01-30 14:24:39 +01:00
Autoprefixer.prototype.info = function(opts) {
infoCache || (infoCache = require('./info'));
return infoCache(this.prefixes(opts));
2014-11-03 14:32:38 +01:00
};
return Autoprefixer;
})();
2015-01-30 14:24:39 +01:00
autoprefixer.defaults = browserslist.defaults;
2014-11-03 14:32:38 +01:00
autoprefixer.loadDefault = function() {
2015-01-30 14:24:39 +01:00
return this.defaultCache || (this.defaultCache = autoprefixer());
2014-11-03 14:32:38 +01:00
};
autoprefixer.process = function(str, options) {
if (options == null) {
options = {};
}
return this.loadDefault().process(str, options);
};
autoprefixer.postcss = function(css) {
return autoprefixer.loadDefault().postcss(css);
};
autoprefixer.info = function() {
return this.loadDefault().info();
};
module.exports = autoprefixer;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../data/browsers":2,"../data/prefixes":3,"./browsers":5,"./info":37,"./prefixes":41,"browserslist":55,"postcss":107}],2:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
2015-01-30 14:24:39 +01:00
var data, name, _ref;
2014-11-03 14:32:38 +01:00
module.exports = {};
_ref = require('caniuse-db/data').agents;
for (name in _ref) {
data = _ref[name];
2015-01-30 14:24:39 +01:00
module.exports[name] = {
prefix: name === 'opera' ? '-o-' : "-" + data.prefix + "-"
};
2014-11-03 14:32:38 +01:00
}
}).call(this);
2015-01-30 14:24:39 +01:00
},{"caniuse-db/data":56}],3:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
2015-01-30 14:24:39 +01:00
var browsers, feature, filter, logicalProps, map, prefix, resolution, textDecoration,
2014-11-03 14:32:38 +01:00
__slice = [].slice;
browsers = require('./browsers');
feature = function(data, opts, callback) {
2015-01-30 14:24:39 +01:00
var browser, match, need, sorted, support, version, versions, _ref, _ref1;
2014-11-03 14:32:38 +01:00
if (!callback) {
_ref = [opts, {}], callback = _ref[0], opts = _ref[1];
}
2015-01-30 14:24:39 +01:00
match = opts.match || /\sx($|\s)/;
2014-11-03 14:32:38 +01:00
need = [];
_ref1 = data.stats;
for (browser in _ref1) {
versions = _ref1[browser];
2015-01-30 14:24:39 +01:00
for (version in versions) {
support = versions[version];
if (browsers[browser] && support.match(match)) {
need.push(browser + ' ' + version);
2014-11-03 14:32:38 +01:00
}
}
}
sorted = need.sort(function(a, b) {
a = a.split(' ');
b = b.split(' ');
if (a[0] > b[0]) {
return 1;
} else if (a[0] < b[0]) {
return -1;
} else {
return parseFloat(a[1]) - parseFloat(b[1]);
}
});
return callback(sorted);
};
map = function(browsers, callback) {
var browser, name, version, _i, _len, _ref, _results;
_results = [];
for (_i = 0, _len = browsers.length; _i < _len; _i++) {
browser = browsers[_i];
_ref = browser.split(' '), name = _ref[0], version = _ref[1];
version = parseFloat(version);
_results.push(callback(browser, name, version));
}
return _results;
};
2015-01-30 14:24:39 +01:00
filter = function(browsers, callback) {
return browsers.filter(function(browser) {
var name, version, _ref;
_ref = browser.split(' '), name = _ref[0], version = _ref[1];
version = parseFloat(version);
return callback(name, version);
});
};
2014-11-03 14:32:38 +01:00
prefix = function() {
var data, name, names, _i, _j, _len, _results;
names = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), data = arguments[_i++];
_results = [];
for (_j = 0, _len = names.length; _j < _len; _j++) {
name = names[_j];
_results.push(module.exports[name] = data);
}
return _results;
};
module.exports = {};
feature(require('caniuse-db/features-json/border-radius'), function(browsers) {
return prefix('border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius', {
2015-01-30 14:24:39 +01:00
mistakes: ['-ms-', '-o-'],
transition: true,
browsers: browsers
2014-11-03 14:32:38 +01:00
});
});
feature(require('caniuse-db/features-json/css-boxshadow'), function(browsers) {
return prefix('box-shadow', {
2015-01-30 14:24:39 +01:00
transition: true,
browsers: browsers
2014-11-03 14:32:38 +01:00
});
});
feature(require('caniuse-db/features-json/css-animation'), function(browsers) {
return prefix('animation', 'animation-name', 'animation-duration', 'animation-delay', 'animation-direction', 'animation-fill-mode', 'animation-iteration-count', 'animation-play-state', 'animation-timing-function', '@keyframes', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-transitions'), function(browsers) {
return prefix('transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function', {
mistakes: ['-ms-'],
browsers: browsers
});
});
feature(require('caniuse-db/features-json/transforms2d'), function(browsers) {
return prefix('transform', 'transform-origin', {
2015-01-30 14:24:39 +01:00
transition: true,
browsers: browsers
2014-11-03 14:32:38 +01:00
});
});
feature(require('caniuse-db/features-json/transforms3d'), function(browsers) {
prefix('perspective', 'perspective-origin', {
2015-01-30 14:24:39 +01:00
transition: true,
browsers: browsers
2014-11-03 14:32:38 +01:00
});
return prefix('transform-style', 'backface-visibility', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-gradients'), function(browsers) {
browsers = map(browsers, function(browser, name, version) {
if (name === 'android' && version < 4 || name === 'ios_saf' && version < 5 || name === 'safari' && version < 5.1) {
return browser + ' old';
} else {
return browser;
}
});
return prefix('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', {
2015-01-30 14:24:39 +01:00
props: ['background', 'background-image', 'border-image', 'list-style', 'list-style-image', 'content'],
2014-11-03 14:32:38 +01:00
mistakes: ['-ms-'],
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css3-boxsizing'), function(browsers) {
return prefix('box-sizing', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-filters'), function(browsers) {
return prefix('filter', {
2015-01-30 14:24:39 +01:00
transition: true,
browsers: browsers
2014-11-03 14:32:38 +01:00
});
});
feature(require('caniuse-db/features-json/multicolumn'), function(browsers) {
prefix('columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', {
2015-01-30 14:24:39 +01:00
transition: true,
browsers: browsers
2014-11-03 14:32:38 +01:00
});
return prefix('column-count', 'column-rule-style', 'column-span', 'column-fill', 'break-before', 'break-after', 'break-inside', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/user-select-none'), function(browsers) {
return prefix('user-select', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/flexbox'), function(browsers) {
browsers = map(browsers, function(browser, name, version) {
if (name === 'safari' && version < 6.1) {
return browser + ' 2009';
} else if (name === 'ios_saf' && version < 7) {
return browser + ' 2009';
} else if (name === 'chrome' && version < 21) {
return browser + ' 2009';
} else if (name === 'android' && version < 4.4) {
return browser + ' 2009';
} else {
return browser;
}
});
prefix('display-flex', 'inline-flex', {
props: ['display'],
browsers: browsers
});
prefix('flex', 'flex-grow', 'flex-shrink', 'flex-basis', {
transition: true,
browsers: browsers
});
return prefix('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/calc'), function(browsers) {
return prefix('calc', {
props: ['*'],
browsers: browsers
});
});
feature(require('caniuse-db/features-json/background-img-opts'), function(browsers) {
return prefix('background-clip', 'background-origin', 'background-size', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/font-feature'), function(browsers) {
return prefix('font-feature-settings', 'font-variant-ligatures', 'font-language-override', 'font-kerning', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/border-image'), function(browsers) {
return prefix('border-image', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-selection'), function(browsers) {
return prefix('::selection', {
selector: true,
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-placeholder'), function(browsers) {
browsers = map(browsers, function(browser, name, version) {
if (name === 'firefox' && version <= 18) {
return browser + ' old';
} else {
return browser;
}
});
return prefix('::placeholder', {
selector: true,
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-hyphens'), function(browsers) {
return prefix('hyphens', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/fullscreen'), function(browsers) {
return prefix(':fullscreen', {
selector: true,
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css3-tabsize'), function(browsers) {
return prefix('tab-size', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/intrinsic-width'), function(browsers) {
return prefix('max-content', 'min-content', 'fit-content', 'fill-available', {
props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height'],
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css3-cursors-newer'), function(browsers) {
prefix('zoom-in', 'zoom-out', {
props: ['cursor'],
browsers: browsers.concat(['chrome 3'])
});
return prefix('grab', 'grabbing', {
props: ['cursor'],
browsers: browsers.concat(['firefox 24', 'firefox 25', 'firefox 26'])
});
});
feature(require('caniuse-db/features-json/css-sticky'), function(browsers) {
return prefix('sticky', {
props: ['position'],
browsers: browsers
});
});
feature(require('caniuse-db/features-json/pointer'), function(browsers) {
return prefix('touch-action', {
browsers: browsers
});
});
textDecoration = require('caniuse-db/features-json/text-decoration');
feature(textDecoration, function(browsers) {
return prefix('text-decoration-style', {
browsers: browsers
});
});
feature(textDecoration, {
2015-01-30 14:24:39 +01:00
match: /y\sx($|\s)/
2014-11-03 14:32:38 +01:00
}, function(browsers) {
return prefix('text-decoration-line', 'text-decoration-color', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/text-size-adjust'), function(browsers) {
return prefix('text-size-adjust', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-masks'), function(browsers) {
return prefix('clip-path', 'mask', 'mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-position', 'mask-repeat', 'mask-size', {
browsers: browsers
});
});
2014-11-20 07:04:47 +01:00
feature(require('caniuse-db/features-json/css-boxdecorationbreak'), function(brwsrs) {
return prefix('box-decoration-break', {
browsers: brwsrs
});
});
2015-01-30 14:24:39 +01:00
feature(require('caniuse-db/features-json/object-fit'), function(browsers) {
return prefix('object-fit', 'object-position', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-shapes'), function(browsers) {
return prefix('shape-margin', 'shape-outside', 'shape-image-threshold', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/text-overflow'), function(browsers) {
return prefix('text-overflow', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/text-emphasis'), function(browsers) {
return prefix('text-emphasis', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-deviceadaptation'), function(browsers) {
return prefix('@viewport', {
browsers: browsers
});
});
resolution = require('caniuse-db/features-json/css-media-resolution');
feature(resolution, {
match: /( x($| )|a #3)/
}, function(browsers) {
return prefix('@resolution', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-text-align-last'), function(browsers) {
return prefix('text-align-last', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-crisp-edges'), function(browsers) {
return prefix('crisp-edges', {
props: ['image-rendering'],
browsers: browsers
});
});
logicalProps = require('caniuse-db/features-json/css-logical-props');
feature(logicalProps, function(browsers) {
return prefix('border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', {
transition: true,
browsers: browsers
});
});
feature(logicalProps, function(browsers) {
browsers = filter(browsers, function(i) {
return i !== 'firefox' && i !== 'and_ff';
});
return prefix('border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', {
transition: true,
browsers: browsers
});
});
}).call(this);
},{"./browsers":2,"caniuse-db/features-json/background-img-opts":57,"caniuse-db/features-json/border-image":58,"caniuse-db/features-json/border-radius":59,"caniuse-db/features-json/calc":60,"caniuse-db/features-json/css-animation":61,"caniuse-db/features-json/css-boxdecorationbreak":62,"caniuse-db/features-json/css-boxshadow":63,"caniuse-db/features-json/css-crisp-edges":64,"caniuse-db/features-json/css-deviceadaptation":65,"caniuse-db/features-json/css-filters":66,"caniuse-db/features-json/css-gradients":67,"caniuse-db/features-json/css-hyphens":68,"caniuse-db/features-json/css-logical-props":69,"caniuse-db/features-json/css-masks":70,"caniuse-db/features-json/css-media-resolution":71,"caniuse-db/features-json/css-placeholder":72,"caniuse-db/features-json/css-selection":73,"caniuse-db/features-json/css-shapes":74,"caniuse-db/features-json/css-sticky":75,"caniuse-db/features-json/css-text-align-last":76,"caniuse-db/features-json/css-transitions":77,"caniuse-db/features-json/css3-boxsizing":78,"caniuse-db/features-json/css3-cursors-newer":79,"caniuse-db/features-json/css3-tabsize":80,"caniuse-db/features-json/flexbox":81,"caniuse-db/features-json/font-feature":82,"caniuse-db/features-json/fullscreen":83,"caniuse-db/features-json/intrinsic-width":84,"caniuse-db/features-json/multicolumn":85,"caniuse-db/features-json/object-fit":86,"caniuse-db/features-json/pointer":87,"caniuse-db/features-json/text-decoration":88,"caniuse-db/features-json/text-emphasis":89,"caniuse-db/features-json/text-overflow":90,"caniuse-db/features-json/text-size-adjust":91,"caniuse-db/features-json/transforms2d":92,"caniuse-db/features-json/transforms3d":93,"caniuse-db/features-json/user-select-none":94}],4:[function(require,module,exports){
(function() {
var AtRule, Prefixer,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Prefixer = require('./prefixer');
AtRule = (function(_super) {
__extends(AtRule, _super);
function AtRule() {
return AtRule.__super__.constructor.apply(this, arguments);
}
AtRule.prototype.add = function(rule, prefix) {
var already, cloned, prefixed;
prefixed = prefix + rule.name;
already = rule.parent.some(function(i) {
return i.name === prefixed && i.params === rule.params;
});
if (already) {
return;
}
cloned = this.clone(rule, {
name: prefixed
});
return rule.parent.insertBefore(rule, cloned);
};
AtRule.prototype.process = function(node) {
var parent, prefix, _i, _len, _ref, _results;
parent = this.parentPrefix(node);
_ref = this.prefixes;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
prefix = _ref[_i];
if (parent && parent !== prefix) {
continue;
}
_results.push(this.add(node, prefix));
}
return _results;
};
return AtRule;
})(Prefixer);
module.exports = AtRule;
2014-11-03 14:32:38 +01:00
}).call(this);
2015-01-30 14:24:39 +01:00
},{"./prefixer":40}],5:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
2015-01-30 14:24:39 +01:00
var Browsers, browserslist, utils;
browserslist = require('browserslist');
2014-11-03 14:32:38 +01:00
utils = require('./utils');
Browsers = (function() {
Browsers.prefixes = function() {
var data, i, name;
if (this.prefixesCache) {
return this.prefixesCache;
}
data = require('../data/browsers');
return this.prefixesCache = utils.uniq((function() {
var _results;
_results = [];
for (name in data) {
i = data[name];
_results.push(i.prefix);
}
return _results;
})()).sort(function(a, b) {
return b.length - a.length;
});
};
Browsers.withPrefix = function(value) {
if (!this.prefixesRegexp) {
this.prefixesRegexp = RegExp("" + (this.prefixes().join('|')));
}
return this.prefixesRegexp.test(value);
};
2015-01-30 14:24:39 +01:00
function Browsers(data, requirements, options) {
2014-11-03 14:32:38 +01:00
this.data = data;
2015-01-30 14:24:39 +01:00
this.options = options;
2014-11-03 14:32:38 +01:00
this.selected = this.parse(requirements);
}
Browsers.prototype.parse = function(requirements) {
2015-01-30 14:24:39 +01:00
var _ref;
return browserslist(requirements, {
path: (_ref = this.options) != null ? _ref.from : void 0
});
2014-11-03 14:32:38 +01:00
};
Browsers.prototype.browsers = function(criteria) {
var browser, data, selected, versions, _ref;
selected = [];
_ref = this.data;
for (browser in _ref) {
data = _ref[browser];
versions = criteria(data).map(function(version) {
return "" + browser + " " + version;
});
selected = selected.concat(versions);
}
return selected;
};
Browsers.prototype.prefix = function(browser) {
var name, version, _ref;
_ref = browser.split(' '), name = _ref[0], version = _ref[1];
if (name === 'opera' && parseFloat(version) >= 15) {
return '-webkit-';
} else {
return this.data[name].prefix;
}
};
Browsers.prototype.isSelected = function(browser) {
return this.selected.indexOf(browser) !== -1;
};
return Browsers;
})();
module.exports = Browsers;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../data/browsers":2,"./utils":46,"browserslist":55}],6:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Browsers, Declaration, Prefixer, utils, vendor,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Prefixer = require('./prefixer');
Browsers = require('./browsers');
vendor = require('postcss/lib/vendor');
utils = require('./utils');
Declaration = (function(_super) {
__extends(Declaration, _super);
function Declaration() {
return Declaration.__super__.constructor.apply(this, arguments);
}
Declaration.prototype.check = function(decl) {
return true;
};
Declaration.prototype.prefixed = function(prop, prefix) {
return prefix + prop;
};
Declaration.prototype.normalize = function(prop) {
return prop;
};
Declaration.prototype.otherPrefixes = function(value, prefix) {
var other, _i, _len, _ref;
_ref = Browsers.prefixes();
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
other = _ref[_i];
if (other === prefix) {
continue;
}
if (value.indexOf(other) !== -1) {
return true;
}
}
return false;
};
Declaration.prototype.set = function(decl, prefix) {
decl.prop = this.prefixed(decl.prop, prefix);
return decl;
};
Declaration.prototype.needCascade = function(decl) {
2015-01-30 14:24:39 +01:00
return decl._autoprefixerCascade || (decl._autoprefixerCascade = this.all.options.cascade !== false && decl.style('before').indexOf('\n') !== -1);
2014-11-03 14:32:38 +01:00
};
Declaration.prototype.maxPrefixed = function(prefixes, decl) {
var max, prefix, _i, _len;
if (decl._autoprefixerMax) {
return decl._autoprefixerMax;
}
max = 0;
for (_i = 0, _len = prefixes.length; _i < _len; _i++) {
prefix = prefixes[_i];
prefix = utils.removeNote(prefix);
if (prefix.length > max) {
max = prefix.length;
}
}
return decl._autoprefixerMax = max;
};
Declaration.prototype.calcBefore = function(prefixes, decl, prefix) {
var before, diff, i, max, _i;
if (prefix == null) {
prefix = '';
}
2015-01-30 14:24:39 +01:00
before = decl.style('before');
2014-11-03 14:32:38 +01:00
max = this.maxPrefixed(prefixes, decl);
diff = max - utils.removeNote(prefix).length;
for (i = _i = 0; 0 <= diff ? _i < diff : _i > diff; i = 0 <= diff ? ++_i : --_i) {
before += ' ';
}
return before;
};
Declaration.prototype.restoreBefore = function(decl) {
var lines, min;
2015-01-30 14:24:39 +01:00
lines = decl.style('before').split("\n");
2014-11-03 14:32:38 +01:00
min = lines[lines.length - 1];
this.all.group(decl).up(function(prefixed) {
var array, last;
2015-01-30 14:24:39 +01:00
array = prefixed.style('before').split("\n");
2014-11-03 14:32:38 +01:00
last = array[array.length - 1];
if (last.length < min.length) {
return min = last;
}
});
lines[lines.length - 1] = min;
return decl.before = lines.join("\n");
};
Declaration.prototype.insert = function(decl, prefix, prefixes) {
var cloned;
cloned = this.set(this.clone(decl), prefix);
if (!cloned) {
return;
}
if (this.needCascade(decl)) {
cloned.before = this.calcBefore(prefixes, decl, prefix);
}
return decl.parent.insertBefore(decl, cloned);
};
Declaration.prototype.add = function(decl, prefix, prefixes) {
var already, prefixed;
prefixed = this.prefixed(decl.prop, prefix);
already = this.all.group(decl).up(function(i) {
return i.prop === prefixed;
});
already || (already = this.all.group(decl).down(function(i) {
return i.prop === prefixed;
}));
if (already || this.otherPrefixes(decl.value, prefix)) {
return;
}
return this.insert(decl, prefix, prefixes);
};
Declaration.prototype.process = function(decl) {
var prefixes;
if (this.needCascade(decl)) {
prefixes = Declaration.__super__.process.apply(this, arguments);
if (prefixes != null ? prefixes.length : void 0) {
this.restoreBefore(decl);
return decl.before = this.calcBefore(prefixes, decl);
}
} else {
return Declaration.__super__.process.apply(this, arguments);
}
};
Declaration.prototype.old = function(prop, prefix) {
return [this.prefixed(prop, prefix)];
};
return Declaration;
})(Prefixer);
module.exports = Declaration;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"./browsers":5,"./prefixer":40,"./utils":46,"postcss/lib/vendor":113}],7:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var AlignContent, Declaration, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
AlignContent = (function(_super) {
__extends(AlignContent, _super);
function AlignContent() {
return AlignContent.__super__.constructor.apply(this, arguments);
}
AlignContent.names = ['align-content', 'flex-line-pack'];
AlignContent.oldValues = {
'flex-end': 'end',
'flex-start': 'start',
'space-between': 'justify',
'space-around': 'distribute'
};
AlignContent.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return prefix + 'flex-line-pack';
} else {
return AlignContent.__super__.prefixed.apply(this, arguments);
}
};
AlignContent.prototype.normalize = function(prop) {
return 'align-content';
};
AlignContent.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2012) {
decl.value = AlignContent.oldValues[decl.value] || decl.value;
return AlignContent.__super__.set.call(this, decl, prefix);
} else if (spec === 'final') {
return AlignContent.__super__.set.apply(this, arguments);
}
};
return AlignContent;
})(Declaration);
module.exports = AlignContent;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6,"./flex-spec":25}],8:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var AlignItems, Declaration, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
AlignItems = (function(_super) {
__extends(AlignItems, _super);
function AlignItems() {
return AlignItems.__super__.constructor.apply(this, arguments);
}
AlignItems.names = ['align-items', 'flex-align', 'box-align'];
AlignItems.oldValues = {
'flex-end': 'end',
'flex-start': 'start'
};
AlignItems.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return prefix + 'box-align';
} else if (spec === 2012) {
return prefix + 'flex-align';
} else {
return AlignItems.__super__.prefixed.apply(this, arguments);
}
};
AlignItems.prototype.normalize = function(prop) {
return 'align-items';
};
AlignItems.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2009 || spec === 2012) {
decl.value = AlignItems.oldValues[decl.value] || decl.value;
return AlignItems.__super__.set.call(this, decl, prefix);
} else {
return AlignItems.__super__.set.apply(this, arguments);
}
};
return AlignItems;
})(Declaration);
module.exports = AlignItems;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6,"./flex-spec":25}],9:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var AlignSelf, Declaration, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
AlignSelf = (function(_super) {
__extends(AlignSelf, _super);
function AlignSelf() {
return AlignSelf.__super__.constructor.apply(this, arguments);
}
AlignSelf.names = ['align-self', 'flex-item-align'];
AlignSelf.oldValues = {
'flex-end': 'end',
'flex-start': 'start'
};
AlignSelf.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return prefix + 'flex-item-align';
} else {
return AlignSelf.__super__.prefixed.apply(this, arguments);
}
};
AlignSelf.prototype.normalize = function(prop) {
return 'align-self';
};
AlignSelf.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2012) {
decl.value = AlignSelf.oldValues[decl.value] || decl.value;
return AlignSelf.__super__.set.call(this, decl, prefix);
} else if (spec === 'final') {
return AlignSelf.__super__.set.apply(this, arguments);
}
};
return AlignSelf;
})(Declaration);
module.exports = AlignSelf;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6,"./flex-spec":25}],10:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var BackgroundSize, Declaration,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
BackgroundSize = (function(_super) {
__extends(BackgroundSize, _super);
function BackgroundSize() {
return BackgroundSize.__super__.constructor.apply(this, arguments);
}
BackgroundSize.names = ['background-size'];
BackgroundSize.prototype.set = function(decl, prefix) {
var value;
value = decl.value.toLowerCase();
if (prefix === '-webkit-' && value.indexOf(' ') === -1 && value !== 'contain' && value !== 'cover') {
decl.value = decl.value + ' ' + decl.value;
}
return BackgroundSize.__super__.set.call(this, decl, prefix);
};
return BackgroundSize;
})(Declaration);
module.exports = BackgroundSize;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6}],11:[function(require,module,exports){
(function() {
var BlockLogical, Declaration,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
BlockLogical = (function(_super) {
__extends(BlockLogical, _super);
function BlockLogical() {
return BlockLogical.__super__.constructor.apply(this, arguments);
}
BlockLogical.names = ['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', 'border-before', 'border-after', 'margin-before', 'margin-after', 'padding-before', 'padding-after'];
BlockLogical.prototype.prefixed = function(prop, prefix) {
return prefix + (prop.indexOf('-start') !== -1 ? prop.replace('-block-start', '-before') : prop.replace('-block-end', '-after'));
};
BlockLogical.prototype.normalize = function(prop) {
if (prop.indexOf('-before') !== -1) {
return prop.replace('-before', '-block-start');
} else {
return prop.replace('-after', '-block-end');
}
};
return BlockLogical;
})(Declaration);
module.exports = BlockLogical;
}).call(this);
},{"../declaration":6}],12:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var BorderImage, Declaration,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
BorderImage = (function(_super) {
__extends(BorderImage, _super);
function BorderImage() {
return BorderImage.__super__.constructor.apply(this, arguments);
}
BorderImage.names = ['border-image'];
BorderImage.prototype.set = function(decl, prefix) {
decl.value = decl.value.replace(/\s+fill(\s)/, '$1');
return BorderImage.__super__.set.call(this, decl, prefix);
};
return BorderImage;
})(Declaration);
module.exports = BorderImage;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6}],13:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var BorderRadius, Declaration,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
BorderRadius = (function(_super) {
var hor, mozilla, normal, ver, _i, _j, _len, _len1, _ref, _ref1;
__extends(BorderRadius, _super);
function BorderRadius() {
return BorderRadius.__super__.constructor.apply(this, arguments);
}
BorderRadius.names = ['border-radius'];
BorderRadius.toMozilla = {};
BorderRadius.toNormal = {};
_ref = ['top', 'bottom'];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
ver = _ref[_i];
_ref1 = ['left', 'right'];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
hor = _ref1[_j];
normal = "border-" + ver + "-" + hor + "-radius";
mozilla = "border-radius-" + ver + hor;
BorderRadius.names.push(normal);
BorderRadius.names.push(mozilla);
BorderRadius.toMozilla[normal] = mozilla;
BorderRadius.toNormal[mozilla] = normal;
}
}
BorderRadius.prototype.prefixed = function(prop, prefix) {
if (prefix === '-moz-') {
return prefix + (BorderRadius.toMozilla[prop] || prop);
} else {
return BorderRadius.__super__.prefixed.apply(this, arguments);
}
};
BorderRadius.prototype.normalize = function(prop) {
return BorderRadius.toNormal[prop] || prop;
};
return BorderRadius;
})(Declaration);
module.exports = BorderRadius;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6}],14:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var BreakInside, Declaration,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
BreakInside = (function(_super) {
__extends(BreakInside, _super);
function BreakInside() {
return BreakInside.__super__.constructor.apply(this, arguments);
}
BreakInside.names = ['break-inside', 'page-break-inside', 'column-break-inside'];
BreakInside.prototype.prefixed = function(prop, prefix) {
if (prefix === '-webkit-') {
return prefix + 'column-break-inside';
} else if (prefix === '-moz-') {
return 'page-break-inside';
} else {
return BreakInside.__super__.prefixed.apply(this, arguments);
}
};
BreakInside.prototype.normalize = function() {
return 'break-inside';
};
BreakInside.prototype.set = function(decl, prefix) {
if (decl.value === 'avoid-column' || decl.value === 'avoid-page') {
decl.value = 'avoid';
}
return BreakInside.__super__.set.apply(this, arguments);
};
BreakInside.prototype.insert = function(decl, prefix, prefixes) {
if (decl.value === 'avoid-region') {
} else if (decl.value === 'avoid-page' && prefix === '-webkit-') {
} else {
return BreakInside.__super__.insert.apply(this, arguments);
}
};
return BreakInside;
})(Declaration);
module.exports = BreakInside;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6}],15:[function(require,module,exports){
(function() {
var CrispEdges, Value,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Value = require('../value');
CrispEdges = (function(_super) {
__extends(CrispEdges, _super);
function CrispEdges() {
return CrispEdges.__super__.constructor.apply(this, arguments);
}
CrispEdges.names = ['crisp-edges'];
CrispEdges.prototype.replace = function(string, prefix) {
if (prefix === '-webkit-') {
return string.replace(this.regexp(), '$1-webkit-optimize-contrast');
} else {
return CrispEdges.__super__.replace.apply(this, arguments);
}
};
return CrispEdges;
})(Value);
module.exports = CrispEdges;
}).call(this);
},{"../value":47}],16:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var DisplayFlex, OldDisplayFlex, OldValue, Value, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
OldValue = require('../old-value');
Value = require('../value');
OldDisplayFlex = (function(_super) {
__extends(OldDisplayFlex, _super);
2015-01-30 14:24:39 +01:00
function OldDisplayFlex(unprefixed, prefixed) {
this.unprefixed = unprefixed;
this.prefixed = prefixed;
2014-11-03 14:32:38 +01:00
}
OldDisplayFlex.prototype.check = function(value) {
return value === this.name;
};
return OldDisplayFlex;
})(OldValue);
DisplayFlex = (function(_super) {
__extends(DisplayFlex, _super);
DisplayFlex.names = ['display-flex', 'inline-flex'];
function DisplayFlex(name, prefixes) {
DisplayFlex.__super__.constructor.apply(this, arguments);
if (name === 'display-flex') {
this.name = 'flex';
}
}
DisplayFlex.prototype.check = function(decl) {
return decl.value === this.name;
};
DisplayFlex.prototype.prefixed = function(prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
return prefix + (spec === 2009 ? this.name === 'flex' ? 'box' : 'inline-box' : spec === 2012 ? this.name === 'flex' ? 'flexbox' : 'inline-flexbox' : spec === 'final' ? this.name : void 0);
};
DisplayFlex.prototype.replace = function(string, prefix) {
return this.prefixed(prefix);
};
DisplayFlex.prototype.old = function(prefix) {
var prefixed;
prefixed = this.prefixed(prefix);
if (prefixed) {
2015-01-30 14:24:39 +01:00
return new OldValue(this.name, prefixed);
2014-11-03 14:32:38 +01:00
}
};
return DisplayFlex;
})(Value);
module.exports = DisplayFlex;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../old-value":39,"../value":47,"./flex-spec":25}],17:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var FillAvailable, OldValue, Value,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
OldValue = require('../old-value');
Value = require('../value');
FillAvailable = (function(_super) {
__extends(FillAvailable, _super);
function FillAvailable() {
return FillAvailable.__super__.constructor.apply(this, arguments);
}
FillAvailable.names = ['fill-available'];
FillAvailable.prototype.replace = function(string, prefix) {
if (prefix === '-moz-') {
return string.replace(this.regexp(), '$1-moz-available$3');
} else {
return FillAvailable.__super__.replace.apply(this, arguments);
}
};
FillAvailable.prototype.old = function(prefix) {
if (prefix === '-moz-') {
2015-01-30 14:24:39 +01:00
return new OldValue(this.name, '-moz-available');
2014-11-03 14:32:38 +01:00
} else {
return FillAvailable.__super__.old.apply(this, arguments);
}
};
return FillAvailable;
})(Value);
module.exports = FillAvailable;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../old-value":39,"../value":47}],18:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
2015-01-30 14:24:39 +01:00
var FilterValue, OldFilterValue, OldValue, Value, utils,
2014-11-03 14:32:38 +01:00
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
2015-01-30 14:24:39 +01:00
OldValue = require('../old-value');
2014-11-03 14:32:38 +01:00
Value = require('../value');
2015-01-30 14:24:39 +01:00
utils = require('../utils');
OldFilterValue = (function(_super) {
__extends(OldFilterValue, _super);
function OldFilterValue() {
return OldFilterValue.__super__.constructor.apply(this, arguments);
}
OldFilterValue.prototype.clean = function(decl) {
return decl.value = utils.editList(decl.value, (function(_this) {
return function(props) {
if (props.every(function(i) {
return i.indexOf(_this.unprefixed) !== 0;
})) {
return props;
}
return props.filter(function(i) {
return i.indexOf(_this.prefixed) === -1;
});
};
})(this));
};
return OldFilterValue;
})(OldValue);
2014-11-03 14:32:38 +01:00
FilterValue = (function(_super) {
__extends(FilterValue, _super);
function FilterValue() {
return FilterValue.__super__.constructor.apply(this, arguments);
}
FilterValue.names = ['filter'];
FilterValue.prototype.replace = function(value, prefix) {
if (prefix === '-webkit-') {
if (value.indexOf('-webkit-filter') === -1) {
return FilterValue.__super__.replace.apply(this, arguments) + ', ' + value;
} else {
return value;
}
} else {
return FilterValue.__super__.replace.apply(this, arguments);
}
};
2015-01-30 14:24:39 +01:00
FilterValue.prototype.old = function(prefix) {
return new OldFilterValue(this.name, prefix + this.name);
};
2014-11-03 14:32:38 +01:00
return FilterValue;
})(Value);
module.exports = FilterValue;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../old-value":39,"../utils":46,"../value":47}],19:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Declaration, Filter,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
Filter = (function(_super) {
__extends(Filter, _super);
function Filter() {
return Filter.__super__.constructor.apply(this, arguments);
}
Filter.names = ['filter'];
Filter.prototype.check = function(decl) {
var v;
v = decl.value;
return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1 && v.indexOf('data:image/svg+xml') === -1;
};
return Filter;
})(Declaration);
module.exports = Filter;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6}],20:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Declaration, FlexBasis, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
FlexBasis = (function(_super) {
__extends(FlexBasis, _super);
function FlexBasis() {
return FlexBasis.__super__.constructor.apply(this, arguments);
}
FlexBasis.names = ['flex-basis', 'flex-preferred-size'];
FlexBasis.prototype.normalize = function() {
return 'flex-basis';
};
FlexBasis.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return prefix + 'flex-preferred-size';
} else {
return FlexBasis.__super__.prefixed.apply(this, arguments);
}
};
FlexBasis.prototype.set = function(decl, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012 || spec === 'final') {
return FlexBasis.__super__.set.apply(this, arguments);
}
};
return FlexBasis;
})(Declaration);
module.exports = FlexBasis;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6,"./flex-spec":25}],21:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Declaration, FlexDirection, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
FlexDirection = (function(_super) {
__extends(FlexDirection, _super);
function FlexDirection() {
return FlexDirection.__super__.constructor.apply(this, arguments);
}
FlexDirection.names = ['flex-direction', 'box-direction', 'box-orient'];
FlexDirection.prototype.normalize = function(prop) {
return 'flex-direction';
};
FlexDirection.prototype.insert = function(decl, prefix, prefixes) {
var already, cloned, dir, orient, spec, value, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
already = decl.parent.some(function(i) {
return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
});
if (already) {
return;
}
value = decl.value;
orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
cloned = this.clone(decl);
cloned.prop = prefix + 'box-orient';
cloned.value = orient;
if (this.needCascade(decl)) {
cloned.before = this.calcBefore(prefixes, decl, prefix);
}
decl.parent.insertBefore(decl, cloned);
cloned = this.clone(decl);
cloned.prop = prefix + 'box-direction';
cloned.value = dir;
if (this.needCascade(decl)) {
cloned.before = this.calcBefore(prefixes, decl, prefix);
}
return decl.parent.insertBefore(decl, cloned);
} else {
return FlexDirection.__super__.insert.apply(this, arguments);
}
};
FlexDirection.prototype.old = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return [prefix + 'box-orient', prefix + 'box-direction'];
} else {
return FlexDirection.__super__.old.apply(this, arguments);
}
};
return FlexDirection;
})(Declaration);
module.exports = FlexDirection;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6,"./flex-spec":25}],22:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Declaration, FlexFlow, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
FlexFlow = (function(_super) {
__extends(FlexFlow, _super);
function FlexFlow() {
return FlexFlow.__super__.constructor.apply(this, arguments);
}
FlexFlow.names = ['flex-flow'];
FlexFlow.prototype.set = function(decl, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return FlexFlow.__super__.set.apply(this, arguments);
} else if (spec === 'final') {
return FlexFlow.__super__.set.apply(this, arguments);
}
};
return FlexFlow;
})(Declaration);
module.exports = FlexFlow;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6,"./flex-spec":25}],23:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Declaration, Flex, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
Flex = (function(_super) {
__extends(Flex, _super);
function Flex() {
return Flex.__super__.constructor.apply(this, arguments);
}
Flex.names = ['flex-grow', 'flex-positive'];
Flex.prototype.normalize = function() {
return 'flex';
};
Flex.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return prefix + 'box-flex';
} else if (spec === 2012) {
return prefix + 'flex-positive';
} else {
return Flex.__super__.prefixed.apply(this, arguments);
}
};
return Flex;
})(Declaration);
module.exports = Flex;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6,"./flex-spec":25}],24:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Declaration, FlexShrink, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
FlexShrink = (function(_super) {
__extends(FlexShrink, _super);
function FlexShrink() {
return FlexShrink.__super__.constructor.apply(this, arguments);
}
FlexShrink.names = ['flex-shrink', 'flex-negative'];
FlexShrink.prototype.normalize = function() {
return 'flex-shrink';
};
FlexShrink.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return prefix + 'flex-negative';
} else {
return FlexShrink.__super__.prefixed.apply(this, arguments);
}
};
FlexShrink.prototype.set = function(decl, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012 || spec === 'final') {
return FlexShrink.__super__.set.apply(this, arguments);
}
};
return FlexShrink;
})(Declaration);
module.exports = FlexShrink;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6,"./flex-spec":25}],25:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
module.exports = function(prefix) {
var spec;
spec = prefix === '-webkit- 2009' || prefix === '-moz-' ? 2009 : prefix === '-ms-' ? 2012 : prefix === '-webkit-' ? 'final' : void 0;
if (prefix === '-webkit- 2009') {
prefix = '-webkit-';
}
return [spec, prefix];
};
}).call(this);
2015-01-30 14:24:39 +01:00
},{}],26:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
2015-01-30 14:24:39 +01:00
var FlexValues, OldValue, Value,
2014-11-03 14:32:38 +01:00
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
2015-01-30 14:24:39 +01:00
OldValue = require('../old-value');
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
Value = require('../value');
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
FlexValues = (function(_super) {
__extends(FlexValues, _super);
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
function FlexValues() {
return FlexValues.__super__.constructor.apply(this, arguments);
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
FlexValues.names = ['flex', 'flex-grow', 'flex-shrink', 'flex-basis'];
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
FlexValues.prototype.prefixed = function(prefix) {
return this.all.prefixed(this.name, prefix);
};
FlexValues.prototype.replace = function(string, prefix) {
return string.replace(this.regexp(), '$1' + this.prefixed(prefix) + '$3');
};
FlexValues.prototype.old = function(prefix) {
return new OldValue(this.name, this.prefixed(prefix));
};
return FlexValues;
})(Value);
module.exports = FlexValues;
}).call(this);
},{"../old-value":39,"../value":47}],27:[function(require,module,exports){
(function() {
var Declaration, FlexWrap, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
FlexWrap = (function(_super) {
__extends(FlexWrap, _super);
function FlexWrap() {
return FlexWrap.__super__.constructor.apply(this, arguments);
}
FlexWrap.names = ['flex-wrap'];
FlexWrap.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec !== 2009) {
return FlexWrap.__super__.set.apply(this, arguments);
}
2014-11-03 14:32:38 +01:00
};
return FlexWrap;
})(Declaration);
module.exports = FlexWrap;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6,"./flex-spec":25}],28:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Declaration, Flex, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
Flex = (function(_super) {
__extends(Flex, _super);
function Flex() {
return Flex.__super__.constructor.apply(this, arguments);
}
Flex.names = ['flex', 'box-flex'];
Flex.oldValues = {
'auto': '1',
'none': '0'
};
Flex.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return prefix + 'box-flex';
} else {
return Flex.__super__.prefixed.apply(this, arguments);
}
};
Flex.prototype.normalize = function() {
return 'flex';
};
Flex.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2009) {
decl.value = decl.value.split(' ')[0];
decl.value = Flex.oldValues[decl.value] || decl.value;
return Flex.__super__.set.call(this, decl, prefix);
} else {
return Flex.__super__.set.apply(this, arguments);
}
};
return Flex;
})(Declaration);
module.exports = Flex;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6,"./flex-spec":25}],29:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Fullscreen, Selector,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Selector = require('../selector');
Fullscreen = (function(_super) {
__extends(Fullscreen, _super);
function Fullscreen() {
return Fullscreen.__super__.constructor.apply(this, arguments);
}
Fullscreen.names = [':fullscreen'];
Fullscreen.prototype.prefixed = function(prefix) {
if ('-webkit-' === prefix) {
return ':-webkit-full-screen';
} else if ('-moz-' === prefix) {
return ':-moz-full-screen';
} else {
return ":" + prefix + "fullscreen";
}
};
return Fullscreen;
})(Selector);
module.exports = Fullscreen;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../selector":44}],30:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Gradient, OldValue, Value, isDirection, list, utils,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
OldValue = require('../old-value');
Value = require('../value');
utils = require('../utils');
list = require('postcss/lib/list');
isDirection = /top|left|right|bottom/gi;
Gradient = (function(_super) {
__extends(Gradient, _super);
function Gradient() {
return Gradient.__super__.constructor.apply(this, arguments);
}
Gradient.names = ['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'];
Gradient.prototype.replace = function(string, prefix) {
return list.space(string).map((function(_this) {
return function(value) {
var after, args, close, params;
if (value.slice(0, +_this.name.length + 1 || 9e9) !== _this.name + '(') {
return value;
}
close = value.lastIndexOf(')');
after = value.slice(close + 1);
args = value.slice(_this.name.length + 1, +(close - 1) + 1 || 9e9);
params = list.comma(args);
params = _this.newDirection(params);
if (prefix === '-webkit- old') {
2014-11-20 07:04:47 +01:00
if (args.indexOf('px') === -1) {
return _this.oldWebkit(value, args, params, after);
}
2014-11-03 14:32:38 +01:00
} else {
_this.convertDirection(params);
return prefix + _this.name + '(' + params.join(', ') + ')' + after;
}
};
})(this)).join(' ');
};
Gradient.prototype.directions = {
top: 'bottom',
left: 'right',
bottom: 'top',
right: 'left'
};
Gradient.prototype.oldDirections = {
'top': 'left bottom, left top',
'left': 'right top, left top',
'bottom': 'left top, left bottom',
'right': 'left top, right top',
'top right': 'left bottom, right top',
'top left': 'right bottom, left top',
'right top': 'left bottom, right top',
'right bottom': 'left top, right bottom',
'bottom right': 'left top, right bottom',
'bottom left': 'right top, left bottom',
'left top': 'right bottom, left top',
'left bottom': 'right top, left bottom'
};
Gradient.prototype.newDirection = function(params) {
var first, value;
first = params[0];
if (first.indexOf('to ') === -1 && isDirection.test(first)) {
first = first.split(' ');
first = (function() {
var _i, _len, _results;
_results = [];
for (_i = 0, _len = first.length; _i < _len; _i++) {
value = first[_i];
_results.push(this.directions[value.toLowerCase()] || value);
}
return _results;
}).call(this);
params[0] = 'to ' + first.join(' ');
}
return params;
};
Gradient.prototype.oldWebkit = function(value, args, params, after) {
if (this.name !== 'linear-gradient') {
return value;
}
if (params[0] && params[0].indexOf('deg') !== -1) {
return value;
}
if (args.indexOf('-corner') !== -1) {
return value;
}
if (args.indexOf('-side') !== -1) {
return value;
}
params = this.oldDirection(params);
params = this.colorStops(params);
return '-webkit-gradient(linear, ' + params.join(', ') + ')' + after;
};
Gradient.prototype.convertDirection = function(params) {
if (params.length > 0) {
if (params[0].slice(0, 3) === 'to ') {
return params[0] = this.fixDirection(params[0]);
} else if (params[0].indexOf('deg') !== -1) {
return params[0] = this.fixAngle(params[0]);
} else if (params[0].indexOf(' at ') !== -1) {
return this.fixRadial(params);
}
}
};
Gradient.prototype.fixDirection = function(param) {
var value;
param = param.split(' ');
param.splice(0, 1);
param = (function() {
var _i, _len, _results;
_results = [];
for (_i = 0, _len = param.length; _i < _len; _i++) {
value = param[_i];
_results.push(this.directions[value.toLowerCase()] || value);
}
return _results;
}).call(this);
return param.join(' ');
};
Gradient.prototype.roundFloat = function(float, digits) {
return parseFloat(float.toFixed(digits));
};
Gradient.prototype.fixAngle = function(param) {
param = parseFloat(param);
param = Math.abs(450 - param) % 360;
param = this.roundFloat(param, 3);
return "" + param + "deg";
};
Gradient.prototype.oldDirection = function(params) {
var direction;
if (params.length === 0) {
params;
}
if (params[0].indexOf('to ') !== -1) {
direction = params[0].replace(/^to\s+/, '');
direction = this.oldDirections[direction];
params[0] = direction;
return params;
} else {
direction = this.oldDirections.bottom;
return [direction].concat(params);
}
};
Gradient.prototype.colorStops = function(params) {
return params.map(function(param, i) {
var color, match, position, _ref;
if (i === 0) {
return param;
}
_ref = list.space(param), color = _ref[0], position = _ref[1];
if (position == null) {
match = param.match(/^(.*\))(\d.*)$/);
if (match) {
color = match[1];
position = match[2];
}
}
if (position && position.indexOf(')') !== -1) {
color += ' ' + position;
position = void 0;
}
if (i === 1 && (position === void 0 || position === '0%')) {
return "from(" + color + ")";
} else if (i === params.length - 1 && (position === void 0 || position === '100%')) {
return "to(" + color + ")";
} else if (position) {
return "color-stop(" + position + ", " + color + ")";
} else {
return "color-stop(" + color + ")";
}
});
};
Gradient.prototype.fixRadial = function(params) {
var first;
first = params[0].split(/\s+at\s+/);
return params.splice(0, 1, first[1], first[0]);
};
Gradient.prototype.old = function(prefix) {
var regexp, string, type;
if (prefix === '-webkit-') {
type = this.name === 'linear-gradient' ? 'linear' : 'radial';
string = '-gradient';
regexp = utils.regexp("-webkit-(" + type + "-gradient|gradient\\(\\s*" + type + ")", false);
2015-01-30 14:24:39 +01:00
return new OldValue(this.name, prefix + this.name, string, regexp);
2014-11-03 14:32:38 +01:00
} else {
return Gradient.__super__.old.apply(this, arguments);
}
};
2015-01-30 14:24:39 +01:00
Gradient.prototype.add = function(decl, prefix) {
var prop;
prop = decl.prop;
if (prop === 'list-style' || prop === 'list-style-image' || prop === 'content') {
if (prefix === '-webkit-' || prefix === '-webkit- old') {
return Gradient.__super__.add.apply(this, arguments);
}
} else {
return Gradient.__super__.add.apply(this, arguments);
}
};
2014-11-03 14:32:38 +01:00
return Gradient;
})(Value);
module.exports = Gradient;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../old-value":39,"../utils":46,"../value":47,"postcss/lib/list":102}],31:[function(require,module,exports){
(function() {
var Declaration, InlineLogical,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
InlineLogical = (function(_super) {
__extends(InlineLogical, _super);
function InlineLogical() {
return InlineLogical.__super__.constructor.apply(this, arguments);
}
InlineLogical.names = ['border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', 'border-start', 'border-end', 'margin-start', 'margin-end', 'padding-start', 'padding-end'];
InlineLogical.prototype.prefixed = function(prop, prefix) {
return prefix + prop.replace('-inline', '');
};
InlineLogical.prototype.normalize = function(prop) {
return prop.replace(/(margin|padding|border)-(start|end)/, '$1-inline-$2');
};
return InlineLogical;
})(Declaration);
module.exports = InlineLogical;
}).call(this);
},{"../declaration":6}],32:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Declaration, JustifyContent, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
JustifyContent = (function(_super) {
__extends(JustifyContent, _super);
function JustifyContent() {
return JustifyContent.__super__.constructor.apply(this, arguments);
}
JustifyContent.names = ['justify-content', 'flex-pack', 'box-pack'];
JustifyContent.oldValues = {
'flex-end': 'end',
'flex-start': 'start',
'space-between': 'justify',
'space-around': 'distribute'
};
JustifyContent.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return prefix + 'box-pack';
} else if (spec === 2012) {
return prefix + 'flex-pack';
} else {
return JustifyContent.__super__.prefixed.apply(this, arguments);
}
};
JustifyContent.prototype.normalize = function(prop) {
return 'justify-content';
};
JustifyContent.prototype.set = function(decl, prefix) {
var spec, value;
spec = flexSpec(prefix)[0];
if (spec === 2009 || spec === 2012) {
value = JustifyContent.oldValues[decl.value] || decl.value;
decl.value = value;
if (spec !== 2009 || value !== 'distribute') {
return JustifyContent.__super__.set.call(this, decl, prefix);
}
} else if (spec === 'final') {
return JustifyContent.__super__.set.apply(this, arguments);
}
};
return JustifyContent;
})(Declaration);
module.exports = JustifyContent;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6,"./flex-spec":25}],33:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Declaration, Order, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
Order = (function(_super) {
__extends(Order, _super);
function Order() {
return Order.__super__.constructor.apply(this, arguments);
}
Order.names = ['order', 'flex-order', 'box-ordinal-group'];
Order.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return prefix + 'box-ordinal-group';
} else if (spec === 2012) {
return prefix + 'flex-order';
} else {
return Order.__super__.prefixed.apply(this, arguments);
}
};
Order.prototype.normalize = function(prop) {
return 'order';
};
Order.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2009) {
decl.value = (parseInt(decl.value) + 1).toString();
return Order.__super__.set.call(this, decl, prefix);
} else {
return Order.__super__.set.apply(this, arguments);
}
};
return Order;
})(Declaration);
module.exports = Order;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6,"./flex-spec":25}],34:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Placeholder, Selector,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Selector = require('../selector');
Placeholder = (function(_super) {
__extends(Placeholder, _super);
function Placeholder() {
return Placeholder.__super__.constructor.apply(this, arguments);
}
Placeholder.names = ['::placeholder'];
Placeholder.prototype.possible = function() {
return Placeholder.__super__.possible.apply(this, arguments).concat('-moz- old');
};
Placeholder.prototype.prefixed = function(prefix) {
if ('-webkit-' === prefix) {
return '::-webkit-input-placeholder';
} else if ('-ms-' === prefix) {
return ':-ms-input-placeholder';
} else if ('-moz- old' === prefix) {
return ':-moz-placeholder';
} else {
return "::" + prefix + "placeholder";
}
};
return Placeholder;
})(Selector);
module.exports = Placeholder;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../selector":44}],35:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Declaration, TransformDecl,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
TransformDecl = (function(_super) {
__extends(TransformDecl, _super);
function TransformDecl() {
return TransformDecl.__super__.constructor.apply(this, arguments);
}
TransformDecl.names = ['transform', 'transform-origin'];
TransformDecl.functions3d = ['matrix3d', 'translate3d', 'translateZ', 'scale3d', 'scaleZ', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'perspective'];
TransformDecl.prototype.keykrameParents = function(decl) {
var parent;
parent = decl.parent;
while (parent) {
if (parent.type === 'atrule' && parent.name === 'keyframes') {
return true;
}
parent = parent.parent;
}
return false;
};
TransformDecl.prototype.contain3d = function(decl) {
var func, _i, _len, _ref;
if (decl.prop === 'transform-origin') {
return false;
}
_ref = TransformDecl.functions3d;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
func = _ref[_i];
if (decl.value.indexOf("" + func + "(") !== -1) {
return true;
}
}
return false;
};
TransformDecl.prototype.insert = function(decl, prefix, prefixes) {
if (prefix === '-ms-') {
if (!this.contain3d(decl) && !this.keykrameParents(decl)) {
return TransformDecl.__super__.insert.apply(this, arguments);
}
} else if (prefix === '-o-') {
if (!this.contain3d(decl)) {
return TransformDecl.__super__.insert.apply(this, arguments);
}
} else {
return TransformDecl.__super__.insert.apply(this, arguments);
}
};
return TransformDecl;
})(Declaration);
module.exports = TransformDecl;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../declaration":6}],36:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var TransformValue, Value,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Value = require('../value');
TransformValue = (function(_super) {
__extends(TransformValue, _super);
function TransformValue() {
return TransformValue.__super__.constructor.apply(this, arguments);
}
TransformValue.names = ['transform'];
TransformValue.prototype.replace = function(value, prefix) {
if (prefix === '-ms-') {
return value;
} else {
return TransformValue.__super__.replace.apply(this, arguments);
}
};
return TransformValue;
})(Value);
module.exports = TransformValue;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"../value":47}],37:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var capitalize, names, prefix;
capitalize = function(str) {
return str.slice(0, 1).toUpperCase() + str.slice(1);
};
names = {
ie: 'IE',
ie_mob: 'IE Mobile',
ios_saf: 'iOS',
op_mini: 'Opera Mini',
op_mob: 'Opera Mobile',
and_chr: 'Chrome for Android',
2015-01-30 14:24:39 +01:00
and_ff: 'Firefox for Android',
and_uc: 'UC for Android'
2014-11-03 14:32:38 +01:00
};
prefix = function(name, transition, prefixes) {
var out;
out = ' ' + name + (transition ? '*' : '') + ': ';
out += prefixes.map(function(i) {
return i.replace(/^-(.*)-$/g, '$1');
}).join(', ');
out += "\n";
return out;
};
module.exports = function(prefixes) {
var atrules, browser, data, list, name, needTransition, out, props, selector, selectors, string, transitionProp, useTransition, value, values, version, versions, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
if (prefixes.browsers.selected.length === 0) {
return "No browsers selected";
}
versions = [];
_ref = prefixes.browsers.selected;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
browser = _ref[_i];
_ref1 = browser.split(' '), name = _ref1[0], version = _ref1[1];
name = names[name] || capitalize(name);
if (versions[name]) {
versions[name].push(version);
} else {
versions[name] = [version];
}
}
out = "Browsers:\n";
for (browser in versions) {
list = versions[browser];
list = list.sort(function(a, b) {
return parseFloat(b) - parseFloat(a);
});
out += ' ' + browser + ': ' + list.join(', ') + "\n";
}
atrules = '';
_ref2 = prefixes.add;
for (name in _ref2) {
data = _ref2[name];
if (name[0] === '@' && data.prefixes) {
atrules += prefix(name, false, data.prefixes);
}
}
if (atrules !== '') {
out += "\nAt-Rules:\n" + atrules;
}
selectors = '';
_ref3 = prefixes.add.selectors;
for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
selector = _ref3[_j];
if (selector.prefixes) {
selectors += prefix(selector.name, false, selector.prefixes);
}
}
if (selectors !== '') {
out += "\nSelectors:\n" + selectors;
}
values = '';
props = '';
useTransition = false;
needTransition = (_ref4 = prefixes.add.transition) != null ? _ref4.prefixes : void 0;
_ref5 = prefixes.add;
for (name in _ref5) {
data = _ref5[name];
if (name[0] !== '@' && data.prefixes) {
transitionProp = needTransition && prefixes.data[name].transition;
if (transitionProp) {
useTransition = true;
}
props += prefix(name, transitionProp, data.prefixes);
}
if (!data.values) {
continue;
}
if (prefixes.transitionProps.some(function(i) {
return i === name;
})) {
continue;
}
_ref6 = data.values;
for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) {
value = _ref6[_k];
string = prefix(value.name, false, value.prefixes);
if (values.indexOf(string) === -1) {
values += string;
}
}
}
if (useTransition) {
props += " * - can be used in transition\n";
}
if (props !== '') {
out += "\nProperties:\n" + props;
}
if (values !== '') {
out += "\nValues:\n" + values;
}
if (atrules === '' && selectors === '' && props === '' && values === '') {
out += '\nAwesome! Your browsers don\'t require any vendor prefixes.' + '\nNow you can remove Autoprefixer from build steps.';
}
return out;
};
}).call(this);
2015-01-30 14:24:39 +01:00
},{}],38:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var OldSelector;
OldSelector = (function() {
function OldSelector(selector, prefix) {
var _i, _len, _ref;
this.prefix = prefix;
this.prefixed = selector.prefixed(this.prefix);
this.regexp = selector.regexp(this.prefix);
this.prefixeds = [];
_ref = selector.possible();
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
prefix = _ref[_i];
this.prefixeds.push([selector.prefixed(prefix), selector.regexp(prefix)]);
}
this.unprefixed = selector.name;
this.nameRegexp = selector.regexp();
}
OldSelector.prototype.isHack = function(rule) {
var before, index, regexp, rules, some, string, _i, _len, _ref, _ref1;
index = rule.parent.index(rule) + 1;
2015-01-30 14:24:39 +01:00
rules = rule.parent.nodes;
2014-11-03 14:32:38 +01:00
while (index < rules.length) {
before = rules[index].selector;
if (!before) {
return true;
}
if (before.indexOf(this.unprefixed) !== -1 && before.match(this.nameRegexp)) {
return false;
}
some = false;
_ref = this.prefixeds;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
_ref1 = _ref[_i], string = _ref1[0], regexp = _ref1[1];
if (before.indexOf(string) !== -1 && before.match(regexp)) {
some = true;
break;
}
}
if (!some) {
return true;
}
index += 1;
}
return true;
};
OldSelector.prototype.check = function(rule) {
if (rule.selector.indexOf(this.prefixed) === -1) {
return false;
}
if (!rule.selector.match(this.regexp)) {
return false;
}
if (this.isHack(rule)) {
return false;
}
return true;
};
return OldSelector;
})();
module.exports = OldSelector;
}).call(this);
2015-01-30 14:24:39 +01:00
},{}],39:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var OldValue, utils;
utils = require('./utils');
OldValue = (function() {
2015-01-30 14:24:39 +01:00
function OldValue(unprefixed, prefixed, string, regexp) {
this.unprefixed = unprefixed;
this.prefixed = prefixed;
2014-11-03 14:32:38 +01:00
this.string = string;
this.regexp = regexp;
2015-01-30 14:24:39 +01:00
this.regexp || (this.regexp = utils.regexp(this.prefixed));
this.string || (this.string = this.prefixed);
2014-11-03 14:32:38 +01:00
}
OldValue.prototype.check = function(value) {
if (value.indexOf(this.string) !== -1) {
return !!value.match(this.regexp);
} else {
return false;
}
};
return OldValue;
})();
module.exports = OldValue;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"./utils":46}],40:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
2015-01-30 14:24:39 +01:00
var Browsers, Prefixer, clone, utils, vendor,
__hasProp = {}.hasOwnProperty;
2014-11-03 14:32:38 +01:00
Browsers = require('./browsers');
2015-01-30 14:24:39 +01:00
utils = require('./utils');
2014-11-03 14:32:38 +01:00
vendor = require('postcss/lib/vendor');
2015-01-30 14:24:39 +01:00
clone = function(obj, parent) {
var cloned, i, value;
if (typeof obj !== 'object') {
return obj;
}
cloned = new obj.constructor();
for (i in obj) {
if (!__hasProp.call(obj, i)) continue;
value = obj[i];
if (i === 'parent' && typeof value === 'object') {
if (parent) {
cloned[i] = parent;
}
} else if (i === 'source') {
cloned[i] = value;
} else if (value instanceof Array) {
cloned[i] = value.map(function(i) {
return clone(i, cloned);
});
} else if (i !== '_autoprefixerPrefix' && i !== '_autoprefixerValues') {
cloned[i] = clone(value, cloned);
}
}
return cloned;
};
2014-11-03 14:32:38 +01:00
Prefixer = (function() {
Prefixer.hack = function(klass) {
var name, _i, _len, _ref, _results;
this.hacks || (this.hacks = {});
_ref = klass.names;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
name = _ref[_i];
_results.push(this.hacks[name] = klass);
}
return _results;
};
Prefixer.load = function(name, prefixes, all) {
var klass, _ref;
klass = (_ref = this.hacks) != null ? _ref[name] : void 0;
if (klass) {
return new klass(name, prefixes, all);
} else {
return new this(name, prefixes, all);
}
};
Prefixer.clone = function(node, overrides) {
2015-01-30 14:24:39 +01:00
var cloned, name;
cloned = clone(node);
for (name in overrides) {
cloned[name] = overrides[name];
2014-11-03 14:32:38 +01:00
}
return cloned;
};
function Prefixer(name, prefixes, all) {
this.name = name;
this.prefixes = prefixes;
this.all = all;
}
Prefixer.prototype.parentPrefix = function(node) {
var prefix;
prefix = node._autoprefixerPrefix != null ? node._autoprefixerPrefix : node.type === 'decl' && node.prop[0] === '-' ? vendor.prefix(node.prop) : node.type === 'root' ? false : node.type === 'rule' && node.selector.indexOf(':-') !== -1 ? node.selector.match(/:(-\w+-)/)[1] : node.type === 'atrule' && node.name[0] === '-' ? vendor.prefix(node.name) : this.parentPrefix(node.parent);
if (Browsers.prefixes().indexOf(prefix) === -1) {
prefix = false;
}
return node._autoprefixerPrefix = prefix;
};
Prefixer.prototype.process = function(node) {
var added, parent, prefix, prefixes, _i, _j, _len, _len1, _ref;
if (!this.check(node)) {
return;
}
parent = this.parentPrefix(node);
prefixes = [];
_ref = this.prefixes;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
prefix = _ref[_i];
if (parent && parent !== utils.removeNote(prefix)) {
continue;
}
prefixes.push(prefix);
}
added = [];
for (_j = 0, _len1 = prefixes.length; _j < _len1; _j++) {
prefix = prefixes[_j];
if (this.add(node, prefix, added.concat([prefix]))) {
added.push(prefix);
}
}
return added;
};
Prefixer.prototype.clone = function(node, overrides) {
return Prefixer.clone(node, overrides);
};
return Prefixer;
})();
module.exports = Prefixer;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"./browsers":5,"./utils":46,"postcss/lib/vendor":113}],41:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
2015-01-30 14:24:39 +01:00
var AtRule, Browsers, Declaration, Prefixes, Processor, Resolution, Selector, Supports, Value, declsCache, utils, vendor;
2014-11-03 14:32:38 +01:00
Declaration = require('./declaration');
2015-01-30 14:24:39 +01:00
Resolution = require('./resolution');
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
Processor = require('./processor');
2014-11-03 14:32:38 +01:00
Supports = require('./supports');
Browsers = require('./browsers');
Selector = require('./selector');
2015-01-30 14:24:39 +01:00
AtRule = require('./at-rule');
2014-11-03 14:32:38 +01:00
Value = require('./value');
2015-01-30 14:24:39 +01:00
utils = require('./utils');
vendor = require('postcss/lib/vendor');
2014-11-03 14:32:38 +01:00
Selector.hack(require('./hacks/fullscreen'));
Selector.hack(require('./hacks/placeholder'));
Declaration.hack(require('./hacks/flex'));
Declaration.hack(require('./hacks/order'));
Declaration.hack(require('./hacks/filter'));
Declaration.hack(require('./hacks/flex-flow'));
Declaration.hack(require('./hacks/flex-grow'));
Declaration.hack(require('./hacks/flex-wrap'));
Declaration.hack(require('./hacks/align-self'));
Declaration.hack(require('./hacks/flex-basis'));
Declaration.hack(require('./hacks/align-items'));
Declaration.hack(require('./hacks/flex-shrink'));
Declaration.hack(require('./hacks/break-inside'));
Declaration.hack(require('./hacks/border-image'));
Declaration.hack(require('./hacks/align-content'));
Declaration.hack(require('./hacks/border-radius'));
2015-01-30 14:24:39 +01:00
Declaration.hack(require('./hacks/block-logical'));
Declaration.hack(require('./hacks/inline-logical'));
2014-11-03 14:32:38 +01:00
Declaration.hack(require('./hacks/transform-decl'));
Declaration.hack(require('./hacks/flex-direction'));
Declaration.hack(require('./hacks/justify-content'));
Declaration.hack(require('./hacks/background-size'));
Value.hack(require('./hacks/gradient'));
2015-01-30 14:24:39 +01:00
Value.hack(require('./hacks/crisp-edges'));
Value.hack(require('./hacks/flex-values'));
2014-11-03 14:32:38 +01:00
Value.hack(require('./hacks/display-flex'));
Value.hack(require('./hacks/filter-value'));
Value.hack(require('./hacks/fill-available'));
Value.hack(require('./hacks/transform-value'));
declsCache = {};
Prefixes = (function() {
function Prefixes(data, browsers, options) {
var _ref;
this.data = data;
this.browsers = browsers;
this.options = options != null ? options : {};
_ref = this.preprocess(this.select(this.data)), this.add = _ref[0], this.remove = _ref[1];
this.processor = new Processor(this);
}
Prefixes.prototype.transitionProps = ['transition', 'transition-property'];
Prefixes.prototype.cleaner = function() {
var empty;
if (!this.cleanerCache) {
if (this.browsers.selected.length) {
empty = new Browsers(this.browsers.data, []);
this.cleanerCache = new Prefixes(this.data, empty, this.options);
} else {
return this;
}
}
return this.cleanerCache;
};
Prefixes.prototype.select = function(list) {
var add, all, data, name, notes, selected;
selected = {
add: {},
remove: {}
};
for (name in list) {
data = list[name];
add = data.browsers.map(function(i) {
var params;
params = i.split(' ');
return {
browser: params[0] + ' ' + params[1],
note: params[2]
};
});
notes = add.filter(function(i) {
return i.note;
}).map((function(_this) {
return function(i) {
return _this.browsers.prefix(i.browser) + ' ' + i.note;
};
})(this));
notes = utils.uniq(notes);
add = add.filter((function(_this) {
return function(i) {
return _this.browsers.isSelected(i.browser);
};
})(this)).map((function(_this) {
return function(i) {
var prefix;
prefix = _this.browsers.prefix(i.browser);
if (i.note) {
return prefix + ' ' + i.note;
} else {
return prefix;
}
};
})(this));
add = this.sort(utils.uniq(add));
all = data.browsers.map((function(_this) {
return function(i) {
return _this.browsers.prefix(i);
};
})(this));
if (data.mistakes) {
all = all.concat(data.mistakes);
}
all = all.concat(notes);
all = utils.uniq(all);
if (add.length) {
selected.add[name] = add;
if (add.length < all.length) {
selected.remove[name] = all.filter(function(i) {
return add.indexOf(i) === -1;
});
}
} else {
selected.remove[name] = all;
}
}
return selected;
};
Prefixes.prototype.sort = function(prefixes) {
return prefixes.sort(function(a, b) {
var aLength, bLength;
aLength = utils.removeNote(a).length;
bLength = utils.removeNote(b).length;
if (aLength === bLength) {
return b.length - a.length;
} else {
return bLength - aLength;
}
});
};
Prefixes.prototype.preprocess = function(selected) {
var add, name, old, olds, prefix, prefixed, prefixes, prop, props, remove, selector, value, values, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _ref, _ref1, _ref2;
add = {
selectors: [],
'@supports': new Supports(this)
};
_ref = selected.add;
for (name in _ref) {
prefixes = _ref[name];
2015-01-30 14:24:39 +01:00
if (name === '@keyframes' || name === '@viewport') {
add[name] = new AtRule(name, prefixes, this);
} else if (name === '@resolution') {
add[name] = new Resolution(name, prefixes, this);
2014-11-03 14:32:38 +01:00
} else if (this.data[name].selector) {
add.selectors.push(Selector.load(name, prefixes, this));
} else {
props = this.data[name].transition ? this.transitionProps : this.data[name].props;
if (props) {
value = Value.load(name, prefixes, this);
for (_i = 0, _len = props.length; _i < _len; _i++) {
prop = props[_i];
if (!add[prop]) {
add[prop] = {
values: []
};
}
add[prop].values.push(value);
}
}
if (!this.data[name].props) {
values = ((_ref1 = add[name]) != null ? _ref1.values : void 0) || [];
add[name] = Declaration.load(name, prefixes, this);
add[name].values = values;
}
}
}
remove = {
selectors: []
};
_ref2 = selected.remove;
for (name in _ref2) {
prefixes = _ref2[name];
if (this.data[name].selector) {
selector = Selector.load(name, prefixes);
for (_j = 0, _len1 = prefixes.length; _j < _len1; _j++) {
prefix = prefixes[_j];
remove.selectors.push(selector.old(prefix));
}
2015-01-30 14:24:39 +01:00
} else if (name === '@keyframes' || name === '@viewport') {
2014-11-03 14:32:38 +01:00
for (_k = 0, _len2 = prefixes.length; _k < _len2; _k++) {
prefix = prefixes[_k];
prefixed = '@' + prefix + name.slice(1);
remove[prefixed] = {
remove: true
};
}
2015-01-30 14:24:39 +01:00
} else if (name === '@resolution') {
remove[name] = new Resolution(name, prefixes, this);
2014-11-03 14:32:38 +01:00
} else {
props = this.data[name].transition ? this.transitionProps : this.data[name].props;
if (props) {
value = Value.load(name, [], this);
for (_l = 0, _len3 = prefixes.length; _l < _len3; _l++) {
prefix = prefixes[_l];
old = value.old(prefix);
if (old) {
for (_m = 0, _len4 = props.length; _m < _len4; _m++) {
prop = props[_m];
if (!remove[prop]) {
remove[prop] = {};
}
if (!remove[prop].values) {
remove[prop].values = [];
}
remove[prop].values.push(old);
}
}
}
}
if (!this.data[name].props) {
for (_n = 0, _len5 = prefixes.length; _n < _len5; _n++) {
prefix = prefixes[_n];
prop = vendor.unprefixed(name);
olds = this.decl(name).old(name, prefix);
for (_o = 0, _len6 = olds.length; _o < _len6; _o++) {
prefixed = olds[_o];
if (!remove[prefixed]) {
remove[prefixed] = {};
}
remove[prefixed].remove = true;
}
}
}
}
}
return [add, remove];
};
Prefixes.prototype.decl = function(prop) {
var decl;
decl = declsCache[prop];
if (decl) {
return decl;
} else {
return declsCache[prop] = Declaration.load(prop);
}
};
Prefixes.prototype.unprefixed = function(prop) {
prop = vendor.unprefixed(prop);
return this.decl(prop).normalize(prop);
};
Prefixes.prototype.prefixed = function(prop, prefix) {
prop = vendor.unprefixed(prop);
return this.decl(prop).prefixed(prop, prefix);
};
Prefixes.prototype.values = function(type, prop) {
var data, global, values, _ref, _ref1;
data = this[type];
global = (_ref = data['*']) != null ? _ref.values : void 0;
values = (_ref1 = data[prop]) != null ? _ref1.values : void 0;
if (global && values) {
return utils.uniq(global.concat(values));
} else {
return global || values || [];
}
};
Prefixes.prototype.group = function(decl) {
var checker, index, length, rule, unprefixed;
rule = decl.parent;
index = rule.index(decl);
2015-01-30 14:24:39 +01:00
length = rule.nodes.length;
2014-11-03 14:32:38 +01:00
unprefixed = this.unprefixed(decl.prop);
checker = (function(_this) {
return function(step, callback) {
var other;
index += step;
while (index >= 0 && index < length) {
2015-01-30 14:24:39 +01:00
other = rule.nodes[index];
2014-11-03 14:32:38 +01:00
if (other.type === 'decl') {
if (step === -1 && other.prop === unprefixed) {
if (!Browsers.withPrefix(other.value)) {
break;
}
}
if (_this.unprefixed(other.prop) !== unprefixed) {
break;
} else if (callback(other) === true) {
return true;
}
if (step === +1 && other.prop === unprefixed) {
if (!Browsers.withPrefix(other.value)) {
break;
}
}
}
index += step;
}
return false;
};
})(this);
return {
up: function(callback) {
return checker(-1, callback);
},
down: function(callback) {
return checker(+1, callback);
}
};
};
return Prefixes;
})();
module.exports = Prefixes;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"./at-rule":4,"./browsers":5,"./declaration":6,"./hacks/align-content":7,"./hacks/align-items":8,"./hacks/align-self":9,"./hacks/background-size":10,"./hacks/block-logical":11,"./hacks/border-image":12,"./hacks/border-radius":13,"./hacks/break-inside":14,"./hacks/crisp-edges":15,"./hacks/display-flex":16,"./hacks/fill-available":17,"./hacks/filter":19,"./hacks/filter-value":18,"./hacks/flex":28,"./hacks/flex-basis":20,"./hacks/flex-direction":21,"./hacks/flex-flow":22,"./hacks/flex-grow":23,"./hacks/flex-shrink":24,"./hacks/flex-values":26,"./hacks/flex-wrap":27,"./hacks/fullscreen":29,"./hacks/gradient":30,"./hacks/inline-logical":31,"./hacks/justify-content":32,"./hacks/order":33,"./hacks/placeholder":34,"./hacks/transform-decl":35,"./hacks/transform-value":36,"./processor":42,"./resolution":43,"./selector":44,"./supports":45,"./utils":46,"./value":47,"postcss/lib/vendor":113}],42:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Processor, Value, utils, vendor;
vendor = require('postcss/lib/vendor');
Value = require('./value');
utils = require('./utils');
Processor = (function() {
function Processor(prefixes) {
this.prefixes = prefixes;
}
Processor.prototype.add = function(css) {
2015-01-30 14:24:39 +01:00
var keyframes, resolution, supports, viewport;
resolution = this.prefixes.add['@resolution'];
2014-11-03 14:32:38 +01:00
keyframes = this.prefixes.add['@keyframes'];
2015-01-30 14:24:39 +01:00
viewport = this.prefixes.add['@viewport'];
2014-11-03 14:32:38 +01:00
supports = this.prefixes.add['@supports'];
css.eachAtRule((function(_this) {
return function(rule) {
if (rule.name === 'keyframes') {
if (!_this.disabled(rule)) {
return keyframes != null ? keyframes.process(rule) : void 0;
}
2015-01-30 14:24:39 +01:00
} else if (rule.name === 'viewport') {
if (!_this.disabled(rule)) {
return viewport != null ? viewport.process(rule) : void 0;
}
2014-11-03 14:32:38 +01:00
} else if (rule.name === 'supports') {
if (!_this.disabled(rule)) {
return supports.process(rule);
}
2015-01-30 14:24:39 +01:00
} else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) {
if (!_this.disabled(rule)) {
return resolution != null ? resolution.process(rule) : void 0;
}
2014-11-03 14:32:38 +01:00
}
};
})(this));
css.eachRule((function(_this) {
return function(rule) {
var selector, _i, _len, _ref, _results;
if (_this.disabled(rule)) {
return;
}
_ref = _this.prefixes.add.selectors;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
selector = _ref[_i];
_results.push(selector.process(rule));
}
return _results;
};
})(this));
css.eachDecl((function(_this) {
return function(decl) {
var prefix;
prefix = _this.prefixes.add[decl.prop];
if (prefix && prefix.prefixes) {
if (!_this.disabled(decl)) {
return prefix.process(decl);
}
}
};
})(this));
return css.eachDecl((function(_this) {
return function(decl) {
var unprefixed, value, _i, _len, _ref;
if (_this.disabled(decl)) {
return;
}
unprefixed = _this.prefixes.unprefixed(decl.prop);
_ref = _this.prefixes.values('add', unprefixed);
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
value = _ref[_i];
value.process(decl);
}
return Value.save(_this.prefixes, decl);
};
})(this));
};
Processor.prototype.remove = function(css) {
2015-01-30 14:24:39 +01:00
var checker, resolution, _i, _len, _ref;
resolution = this.prefixes.remove['@resolution'];
2014-11-03 14:32:38 +01:00
css.eachAtRule((function(_this) {
return function(rule, i) {
if (_this.prefixes.remove['@' + rule.name]) {
if (!_this.disabled(rule)) {
return rule.parent.remove(i);
}
2015-01-30 14:24:39 +01:00
} else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) {
return resolution != null ? resolution.clean(rule) : void 0;
2014-11-03 14:32:38 +01:00
}
};
})(this));
_ref = this.prefixes.remove.selectors;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
checker = _ref[_i];
css.eachRule((function(_this) {
return function(rule, i) {
if (checker.check(rule)) {
if (!_this.disabled(rule)) {
return rule.parent.remove(i);
}
}
};
})(this));
}
return css.eachDecl((function(_this) {
return function(decl, i) {
var notHack, rule, unprefixed, _j, _len1, _ref1, _ref2;
if (_this.disabled(decl)) {
return;
}
rule = decl.parent;
unprefixed = _this.prefixes.unprefixed(decl.prop);
if ((_ref1 = _this.prefixes.remove[decl.prop]) != null ? _ref1.remove : void 0) {
notHack = _this.prefixes.group(decl).down(function(other) {
return other.prop === unprefixed;
});
2015-01-30 14:24:39 +01:00
if (notHack && !_this.withHackValue(decl)) {
if (decl.style('before').indexOf("\n") > -1) {
2014-11-03 14:32:38 +01:00
_this.reduceSpaces(decl);
}
rule.remove(i);
return;
}
}
_ref2 = _this.prefixes.values('remove', unprefixed);
for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
checker = _ref2[_j];
if (checker.check(decl.value)) {
2015-01-30 14:24:39 +01:00
unprefixed = checker.unprefixed;
notHack = _this.prefixes.group(decl).down(function(other) {
return other.value.indexOf(unprefixed) !== -1;
});
if (notHack) {
rule.remove(i);
return;
} else if (checker.clean) {
checker.clean(decl);
return;
}
2014-11-03 14:32:38 +01:00
}
}
};
})(this));
};
2015-01-30 14:24:39 +01:00
Processor.prototype.withHackValue = function(decl) {
return decl.prop === '-webkit-background-clip' && decl.value === 'text';
};
2014-11-03 14:32:38 +01:00
Processor.prototype.disabled = function(node) {
var status;
if (node._autoprefixerDisabled != null) {
return node._autoprefixerDisabled;
2015-01-30 14:24:39 +01:00
} else if (node.nodes) {
2014-11-03 14:32:38 +01:00
status = void 0;
node.each(function(i) {
if (i.type !== 'comment') {
return;
}
if (i.text === 'autoprefixer: off') {
status = false;
return false;
} else if (i.text === 'autoprefixer: on') {
status = true;
return false;
}
});
return node._autoprefixerDisabled = status != null ? !status : node.parent ? this.disabled(node.parent) : false;
} else {
return node._autoprefixerDisabled = this.disabled(node.parent);
}
};
Processor.prototype.reduceSpaces = function(decl) {
var diff, parts, prevMin, stop;
stop = false;
this.prefixes.group(decl).up(function(other) {
return stop = true;
});
if (stop) {
return;
}
2015-01-30 14:24:39 +01:00
parts = decl.style('before').split("\n");
2014-11-03 14:32:38 +01:00
prevMin = parts[parts.length - 1].length;
diff = false;
return this.prefixes.group(decl).down(function(other) {
var last;
2015-01-30 14:24:39 +01:00
parts = other.style('before').split("\n");
2014-11-03 14:32:38 +01:00
last = parts.length - 1;
if (parts[last].length > prevMin) {
if (diff === false) {
diff = parts[last].length - prevMin;
}
parts[last] = parts[last].slice(0, -diff);
return other.before = parts.join("\n");
}
});
};
return Processor;
})();
module.exports = Processor;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"./utils":46,"./value":47,"postcss/lib/vendor":113}],43:[function(require,module,exports){
(function() {
var Prefixer, Resolution, n2f, regexp, split, utils,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Prefixer = require('./prefixer');
utils = require('./utils');
n2f = require('num2fraction');
regexp = /(min|max)-resolution\s*:\s*\d*\.?\d+(dppx|dpi)/gi;
split = /(min|max)-resolution(\s*:\s*)(\d*\.?\d+)(dppx|dpi)/i;
Resolution = (function(_super) {
__extends(Resolution, _super);
function Resolution() {
return Resolution.__super__.constructor.apply(this, arguments);
}
Resolution.prototype.prefixName = function(prefix, name) {
return name = prefix === '-moz-' ? name + '--moz-device-pixel-ratio' : prefix + name + '-device-pixel-ratio';
};
Resolution.prototype.prefixQuery = function(prefix, name, colon, value, units) {
if (units === 'dpi') {
value = Number(value / 96);
}
if (prefix === '-o-') {
value = n2f(value);
}
return this.prefixName(prefix, name) + colon + value;
};
Resolution.prototype.clean = function(rule) {
var prefix, _i, _len, _ref;
if (!this.bad) {
this.bad = [];
_ref = this.prefixes;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
prefix = _ref[_i];
this.bad.push(this.prefixName(prefix, 'min'));
this.bad.push(this.prefixName(prefix, 'max'));
}
}
return rule.params = utils.editList(rule.params, (function(_this) {
return function(queries) {
return queries.filter(function(query) {
return _this.bad.every(function(i) {
return query.indexOf(i) === -1;
});
});
};
})(this));
};
Resolution.prototype.process = function(rule) {
var parent, prefixes;
parent = this.parentPrefix(rule);
prefixes = parent ? [parent] : this.prefixes;
return rule.params = utils.editList(rule.params, (function(_this) {
return function(origin, prefixed) {
var prefix, processed, query, _i, _j, _len, _len1;
for (_i = 0, _len = origin.length; _i < _len; _i++) {
query = origin[_i];
if (query.indexOf('min-resolution') === -1 && query.indexOf('max-resolution') === -1) {
prefixed.push(query);
continue;
}
for (_j = 0, _len1 = prefixes.length; _j < _len1; _j++) {
prefix = prefixes[_j];
if (prefix !== '-moz-' || query.indexOf('dppx') !== -1) {
processed = query.replace(regexp, function(str) {
var parts;
parts = str.match(split);
return _this.prefixQuery(prefix, parts[1], parts[2], parts[3], parts[4]);
});
prefixed.push(processed);
}
}
prefixed.push(query);
}
return utils.uniq(prefixed);
};
})(this));
};
return Resolution;
})(Prefixer);
module.exports = Resolution;
}).call(this);
},{"./prefixer":40,"./utils":46,"num2fraction":95}],44:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Browsers, OldSelector, Prefixer, Selector, utils,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
OldSelector = require('./old-selector');
Prefixer = require('./prefixer');
Browsers = require('./browsers');
utils = require('./utils');
Selector = (function(_super) {
__extends(Selector, _super);
function Selector(name, prefixes, all) {
this.name = name;
this.prefixes = prefixes;
this.all = all;
this.regexpCache = {};
}
Selector.prototype.check = function(rule) {
if (rule.selector.indexOf(this.name) !== -1) {
return !!rule.selector.match(this.regexp());
} else {
return false;
}
};
Selector.prototype.prefixed = function(prefix) {
return this.name.replace(/^([^\w]*)/, '$1' + prefix);
};
Selector.prototype.regexp = function(prefix) {
var name;
if (this.regexpCache[prefix]) {
return this.regexpCache[prefix];
}
name = prefix ? this.prefixed(prefix) : this.name;
return this.regexpCache[prefix] = RegExp("(^|[^:\"'=])" + (utils.escapeRegexp(name)), "gi");
};
Selector.prototype.possible = function() {
return Browsers.prefixes();
};
Selector.prototype.prefixeds = function(rule) {
var prefix, prefixeds, _i, _len, _ref;
if (rule._autoprefixerPrefixeds) {
return rule._autoprefixerPrefixeds;
}
prefixeds = {};
_ref = this.possible();
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
prefix = _ref[_i];
prefixeds[prefix] = this.replace(rule.selector, prefix);
}
return rule._autoprefixerPrefixeds = prefixeds;
};
Selector.prototype.already = function(rule, prefixeds, prefix) {
var before, index, key, prefixed, some;
index = rule.parent.index(rule) - 1;
while (index >= 0) {
2015-01-30 14:24:39 +01:00
before = rule.parent.nodes[index];
2014-11-03 14:32:38 +01:00
if (before.type !== 'rule') {
return false;
}
some = false;
for (key in prefixeds) {
prefixed = prefixeds[key];
if (before.selector === prefixed) {
if (prefix === key) {
return true;
} else {
some = true;
break;
}
}
}
if (!some) {
return false;
}
index -= 1;
}
return false;
};
Selector.prototype.replace = function(selector, prefix) {
return selector.replace(this.regexp(), '$1' + this.prefixed(prefix));
};
Selector.prototype.add = function(rule, prefix) {
var cloned, prefixeds;
prefixeds = this.prefixeds(rule);
if (this.already(rule, prefixeds, prefix)) {
return;
}
cloned = this.clone(rule, {
selector: prefixeds[prefix]
});
return rule.parent.insertBefore(rule, cloned);
};
Selector.prototype.old = function(prefix) {
return new OldSelector(this, prefix);
};
return Selector;
})(Prefixer);
module.exports = Selector;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"./browsers":5,"./old-selector":38,"./prefixer":40,"./utils":46}],45:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var Prefixes, Supports, Value, findCondition, findDecl, list, postcss, split, utils;
Prefixes = require('./prefixes');
Value = require('./value');
utils = require('./utils');
postcss = require('postcss');
list = require('postcss/lib/list');
split = /\(\s*([^\(\):]+)\s*:([^\)]+)/;
2014-11-20 07:04:47 +01:00
findDecl = /\(\s*([^\(\):]+)\s*:\s*(.+)\s*\)/g;
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
findCondition = /(not\s*)?\(\s*([^\(\):]+)\s*:\s*(.+?(?!\s*or\s*).+?)\s*\)*\s*\)\s*or\s*/gi;
2014-11-03 14:32:38 +01:00
Supports = (function() {
function Supports(all) {
this.all = all;
}
Supports.prototype.virtual = function(prop, value) {
var rule;
rule = postcss.parse('a{}').first;
rule.append({
prop: prop,
value: value,
before: ''
});
return rule;
};
Supports.prototype.prefixed = function(prop, value) {
var decl, prefixer, rule, _i, _j, _len, _len1, _ref, _ref1;
rule = this.virtual(prop, value);
prefixer = this.all.add[prop];
if (prefixer != null) {
if (typeof prefixer.process === "function") {
prefixer.process(rule.first);
}
}
2015-01-30 14:24:39 +01:00
_ref = rule.nodes;
2014-11-03 14:32:38 +01:00
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
decl = _ref[_i];
_ref1 = this.all.values('add', prop);
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
value = _ref1[_j];
value.process(decl);
}
Value.save(this.all, decl);
}
2015-01-30 14:24:39 +01:00
return rule.nodes;
2014-11-03 14:32:38 +01:00
};
Supports.prototype.clean = function(params) {
return params.replace(findCondition, (function(_this) {
return function(all) {
var check, checker, prop, unprefixed, value, _, _i, _len, _ref, _ref1, _ref2;
if (all.slice(0, 3).toLowerCase() === 'not') {
return all;
}
_ref = all.match(split), _ = _ref[0], prop = _ref[1], value = _ref[2];
unprefixed = _this.all.unprefixed(prop);
if ((_ref1 = _this.all.cleaner().remove[prop]) != null ? _ref1.remove : void 0) {
check = new RegExp('(\\(|\\s)' + utils.escapeRegexp(unprefixed) + ':');
if (check.test(params)) {
return '';
}
}
_ref2 = _this.all.cleaner().values('remove', unprefixed);
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
checker = _ref2[_i];
if (checker.check(value)) {
return '';
}
}
return all;
};
})(this)).replace(/\(\s*\((.*)\)\s*\)/g, '($1)');
};
Supports.prototype.process = function(rule) {
rule.params = this.clean(rule.params);
return rule.params = rule.params.replace(findDecl, (function(_this) {
return function(all, prop, value) {
var i, stringed;
stringed = (function() {
var _i, _len, _ref, _results;
_ref = this.prefixed(prop, value);
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
i = _ref[_i];
_results.push("(" + i.prop + ": " + i.value + ")");
}
return _results;
}).call(_this);
if (stringed.length === 1) {
return stringed[0];
} else {
return '(' + stringed.join(' or ') + ')';
}
};
})(this));
};
return Supports;
})();
module.exports = Supports;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"./prefixes":41,"./utils":46,"./value":47,"postcss":107,"postcss/lib/list":102}],46:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
2015-01-30 14:24:39 +01:00
var list;
list = require('postcss/lib/list');
2014-11-03 14:32:38 +01:00
module.exports = {
error: function(text) {
var err;
err = new Error(text);
err.autoprefixer = true;
throw err;
},
uniq: function(array) {
var filtered, i, _i, _len;
filtered = [];
for (_i = 0, _len = array.length; _i < _len; _i++) {
i = array[_i];
if (filtered.indexOf(i) === -1) {
filtered.push(i);
}
}
return filtered;
},
removeNote: function(string) {
if (string.indexOf(' ') === -1) {
return string;
} else {
return string.split(' ')[0];
}
},
escapeRegexp: function(string) {
return string.replace(/[.?*+\^\$\[\]\\(){}|\-]/g, '\\$&');
},
regexp: function(word, escape) {
if (escape == null) {
escape = true;
}
if (escape) {
word = this.escapeRegexp(word);
}
return RegExp("(^|[\\s,(])(" + word + "($|[\\s(,]))", "gi");
2015-01-30 14:24:39 +01:00
},
editList: function(value, callback) {
var changed, join, origin;
origin = list.comma(value);
changed = callback(origin, []);
if (origin === changed) {
return value;
} else {
join = value.match(/,\s*/);
join = join ? join[0] : ', ';
return changed.join(join);
}
2014-11-03 14:32:38 +01:00
}
};
}).call(this);
2015-01-30 14:24:39 +01:00
},{"postcss/lib/list":102}],47:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function() {
var OldValue, Prefixer, Value, utils, vendor,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Prefixer = require('./prefixer');
OldValue = require('./old-value');
utils = require('./utils');
vendor = require('postcss/lib/vendor');
Value = (function(_super) {
__extends(Value, _super);
function Value() {
return Value.__super__.constructor.apply(this, arguments);
}
Value.save = function(prefixes, decl) {
var already, cloned, prefix, prefixed, propPrefix, rule, trimmed, value, _ref, _results;
_ref = decl._autoprefixerValues;
_results = [];
for (prefix in _ref) {
value = _ref[prefix];
if (value === decl.value) {
continue;
}
propPrefix = vendor.prefix(decl.prop);
if (propPrefix === prefix) {
_results.push(decl.value = value);
} else if (propPrefix === '-pie-') {
continue;
} else {
prefixed = prefixes.prefixed(decl.prop, prefix);
rule = decl.parent;
if (rule.every(function(i) {
return i.prop !== prefixed;
})) {
trimmed = value.replace(/\s+/, ' ');
already = rule.some(function(i) {
return i.prop === decl.prop && i.value.replace(/\s+/, ' ') === trimmed;
});
if (!already) {
2015-01-30 14:24:39 +01:00
if (value.indexOf('-webkit-filter') !== -1 && (decl.prop === 'transition' || decl.prop === 'trasition-property')) {
_results.push(decl.value = value);
} else {
cloned = this.clone(decl, {
value: value
});
_results.push(decl.parent.insertBefore(decl, cloned));
}
2014-11-03 14:32:38 +01:00
} else {
_results.push(void 0);
}
} else {
_results.push(void 0);
}
}
}
return _results;
};
Value.prototype.check = function(decl) {
var value;
value = decl.value;
if (value.indexOf(this.name) !== -1) {
return !!value.match(this.regexp());
} else {
return false;
}
};
Value.prototype.regexp = function() {
return this.regexpCache || (this.regexpCache = utils.regexp(this.name));
};
Value.prototype.replace = function(string, prefix) {
return string.replace(this.regexp(), '$1' + prefix + '$2');
};
Value.prototype.add = function(decl, prefix) {
var value, _ref;
decl._autoprefixerValues || (decl._autoprefixerValues = {});
value = decl._autoprefixerValues[prefix] || ((_ref = decl._value) != null ? _ref.raw : void 0) || decl.value;
value = this.replace(value, prefix);
if (value) {
return decl._autoprefixerValues[prefix] = value;
}
};
Value.prototype.old = function(prefix) {
2015-01-30 14:24:39 +01:00
return new OldValue(this.name, prefix + this.name);
2014-11-03 14:32:38 +01:00
};
return Value;
})(Prefixer);
module.exports = Value;
}).call(this);
2015-01-30 14:24:39 +01:00
},{"./old-value":39,"./prefixer":40,"./utils":46,"postcss/lib/vendor":113}],48:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
},{}],49:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var base64 = require('base64-js')
var ieee754 = require('ieee754')
var isArray = require('is-array')
exports.Buffer = Buffer
2015-01-30 14:24:39 +01:00
exports.SlowBuffer = SlowBuffer
2014-11-03 14:32:38 +01:00
exports.INSPECT_MAX_BYTES = 50
Buffer.poolSize = 8192 // not used by this implementation
var kMaxLength = 0x3fffffff
2015-01-30 14:24:39 +01:00
var rootParent = {}
2014-11-03 14:32:38 +01:00
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
* === false Use Object implementation (most compatible, even IE6)
*
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
* Opera 11.6+, iOS 4.2+.
*
* Note:
*
* - Implementation must support adding new properties to `Uint8Array` instances.
* Firefox 4-29 lacked support, fixed in Firefox 30+.
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
*
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
*
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
* incorrect length in some situations.
*
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will
* get the Object implementation, which is slower but will work correctly.
*/
Buffer.TYPED_ARRAY_SUPPORT = (function () {
try {
var buf = new ArrayBuffer(0)
var arr = new Uint8Array(buf)
arr.foo = function () { return 42 }
return 42 === arr.foo() && // typed array instances can be augmented
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
} catch (e) {
return false
}
})()
/**
* Class: Buffer
* =============
*
* The Buffer constructor returns instances of `Uint8Array` that are augmented
* with function properties for all the node `Buffer` API functions. We use
* `Uint8Array` so that square bracket notation works as expected -- it returns
* a single octet.
*
* By augmenting the instances, we can avoid modifying the `Uint8Array`
* prototype.
*/
function Buffer (subject, encoding, noZero) {
if (!(this instanceof Buffer))
return new Buffer(subject, encoding, noZero)
var type = typeof subject
// Find the length
var length
if (type === 'number')
length = subject > 0 ? subject >>> 0 : 0
else if (type === 'string') {
length = Buffer.byteLength(subject, encoding)
} else if (type === 'object' && subject !== null) { // assume object is array-like
if (subject.type === 'Buffer' && isArray(subject.data))
subject = subject.data
length = +subject.length > 0 ? Math.floor(+subject.length) : 0
} else
throw new TypeError('must start with number, buffer, array or string')
2015-01-30 14:24:39 +01:00
if (length > kMaxLength)
2014-11-03 14:32:38 +01:00
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
'size: 0x' + kMaxLength.toString(16) + ' bytes')
var buf
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Preferred: Return an augmented `Uint8Array` instance for best performance
buf = Buffer._augment(new Uint8Array(length))
} else {
// Fallback: Return THIS instance of Buffer (created by `new`)
buf = this
buf.length = length
buf._isBuffer = true
}
var i
if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {
// Speed optimization -- use set if we're copying from a typed array
buf._set(subject)
} else if (isArrayish(subject)) {
// Treat array-ish objects as a byte array
if (Buffer.isBuffer(subject)) {
for (i = 0; i < length; i++)
buf[i] = subject.readUInt8(i)
} else {
for (i = 0; i < length; i++)
buf[i] = ((subject[i] % 256) + 256) % 256
}
} else if (type === 'string') {
buf.write(subject, 0, encoding)
} else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {
for (i = 0; i < length; i++) {
buf[i] = 0
}
}
2015-01-30 14:24:39 +01:00
if (length > 0 && length <= Buffer.poolSize)
buf.parent = rootParent
return buf
}
function SlowBuffer(subject, encoding, noZero) {
if (!(this instanceof SlowBuffer))
return new SlowBuffer(subject, encoding, noZero)
var buf = new Buffer(subject, encoding, noZero)
delete buf.parent
2014-11-03 14:32:38 +01:00
return buf
}
Buffer.isBuffer = function (b) {
return !!(b != null && b._isBuffer)
}
Buffer.compare = function (a, b) {
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b))
throw new TypeError('Arguments must be Buffers')
var x = a.length
var y = b.length
for (var i = 0, len = Math.min(x, y); i < len && a[i] === b[i]; i++) {}
if (i !== len) {
x = a[i]
y = b[i]
}
if (x < y) return -1
if (y < x) return 1
return 0
}
Buffer.isEncoding = function (encoding) {
switch (String(encoding).toLowerCase()) {
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'binary':
case 'base64':
case 'raw':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return true
default:
return false
}
}
Buffer.concat = function (list, totalLength) {
if (!isArray(list)) throw new TypeError('Usage: Buffer.concat(list[, length])')
if (list.length === 0) {
return new Buffer(0)
} else if (list.length === 1) {
return list[0]
}
var i
if (totalLength === undefined) {
totalLength = 0
for (i = 0; i < list.length; i++) {
totalLength += list[i].length
}
}
var buf = new Buffer(totalLength)
var pos = 0
for (i = 0; i < list.length; i++) {
var item = list[i]
item.copy(buf, pos)
pos += item.length
}
return buf
}
Buffer.byteLength = function (str, encoding) {
var ret
str = str + ''
switch (encoding || 'utf8') {
case 'ascii':
case 'binary':
case 'raw':
ret = str.length
break
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
ret = str.length * 2
break
case 'hex':
ret = str.length >>> 1
break
case 'utf8':
case 'utf-8':
ret = utf8ToBytes(str).length
break
case 'base64':
ret = base64ToBytes(str).length
break
default:
ret = str.length
}
return ret
}
// pre-set for values that may exist in the future
Buffer.prototype.length = undefined
Buffer.prototype.parent = undefined
// toString(encoding, start=0, end=buffer.length)
Buffer.prototype.toString = function (encoding, start, end) {
var loweredCase = false
start = start >>> 0
end = end === undefined || end === Infinity ? this.length : end >>> 0
if (!encoding) encoding = 'utf8'
if (start < 0) start = 0
if (end > this.length) end = this.length
if (end <= start) return ''
while (true) {
switch (encoding) {
case 'hex':
return hexSlice(this, start, end)
case 'utf8':
case 'utf-8':
return utf8Slice(this, start, end)
case 'ascii':
return asciiSlice(this, start, end)
case 'binary':
return binarySlice(this, start, end)
case 'base64':
return base64Slice(this, start, end)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return utf16leSlice(this, start, end)
default:
if (loweredCase)
throw new TypeError('Unknown encoding: ' + encoding)
encoding = (encoding + '').toLowerCase()
loweredCase = true
}
}
}
Buffer.prototype.equals = function (b) {
2015-01-30 14:24:39 +01:00
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
2014-11-03 14:32:38 +01:00
return Buffer.compare(this, b) === 0
}
Buffer.prototype.inspect = function () {
var str = ''
var max = exports.INSPECT_MAX_BYTES
if (this.length > 0) {
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
if (this.length > max)
str += ' ... '
}
return '<Buffer ' + str + '>'
}
Buffer.prototype.compare = function (b) {
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
return Buffer.compare(this, b)
}
// `get` will be removed in Node 0.13+
Buffer.prototype.get = function (offset) {
console.log('.get() is deprecated. Access using array indexes instead.')
return this.readUInt8(offset)
}
// `set` will be removed in Node 0.13+
Buffer.prototype.set = function (v, offset) {
console.log('.set() is deprecated. Access using array indexes instead.')
return this.writeUInt8(v, offset)
}
function hexWrite (buf, string, offset, length) {
offset = Number(offset) || 0
var remaining = buf.length - offset
if (!length) {
length = remaining
} else {
length = Number(length)
if (length > remaining) {
length = remaining
}
}
// must be an even number of digits
var strLen = string.length
if (strLen % 2 !== 0) throw new Error('Invalid hex string')
if (length > strLen / 2) {
length = strLen / 2
}
for (var i = 0; i < length; i++) {
var byte = parseInt(string.substr(i * 2, 2), 16)
if (isNaN(byte)) throw new Error('Invalid hex string')
buf[offset + i] = byte
}
return i
}
function utf8Write (buf, string, offset, length) {
2015-01-30 14:24:39 +01:00
var charsWritten = blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
2014-11-03 14:32:38 +01:00
return charsWritten
}
function asciiWrite (buf, string, offset, length) {
var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length)
return charsWritten
}
function binaryWrite (buf, string, offset, length) {
return asciiWrite(buf, string, offset, length)
}
function base64Write (buf, string, offset, length) {
var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length)
return charsWritten
}
function utf16leWrite (buf, string, offset, length) {
2015-01-30 14:24:39 +01:00
var charsWritten = blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length, 2)
2014-11-03 14:32:38 +01:00
return charsWritten
}
Buffer.prototype.write = function (string, offset, length, encoding) {
// Support both (string, offset, length, encoding)
// and the legacy (string, encoding, offset, length)
if (isFinite(offset)) {
if (!isFinite(length)) {
encoding = length
length = undefined
}
} else { // legacy
var swap = encoding
encoding = offset
offset = length
length = swap
}
offset = Number(offset) || 0
2015-01-30 14:24:39 +01:00
if (length < 0 || offset < 0 || offset > this.length)
throw new RangeError('attempt to write outside buffer bounds');
2014-11-03 14:32:38 +01:00
var remaining = this.length - offset
if (!length) {
length = remaining
} else {
length = Number(length)
if (length > remaining) {
length = remaining
}
}
encoding = String(encoding || 'utf8').toLowerCase()
var ret
switch (encoding) {
case 'hex':
ret = hexWrite(this, string, offset, length)
break
case 'utf8':
case 'utf-8':
ret = utf8Write(this, string, offset, length)
break
case 'ascii':
ret = asciiWrite(this, string, offset, length)
break
case 'binary':
ret = binaryWrite(this, string, offset, length)
break
case 'base64':
ret = base64Write(this, string, offset, length)
break
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
ret = utf16leWrite(this, string, offset, length)
break
default:
throw new TypeError('Unknown encoding: ' + encoding)
}
return ret
}
Buffer.prototype.toJSON = function () {
return {
type: 'Buffer',
data: Array.prototype.slice.call(this._arr || this, 0)
}
}
function base64Slice (buf, start, end) {
if (start === 0 && end === buf.length) {
return base64.fromByteArray(buf)
} else {
return base64.fromByteArray(buf.slice(start, end))
}
}
function utf8Slice (buf, start, end) {
var res = ''
var tmp = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; i++) {
if (buf[i] <= 0x7F) {
res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i])
tmp = ''
} else {
tmp += '%' + buf[i].toString(16)
}
}
return res + decodeUtf8Char(tmp)
}
function asciiSlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; i++) {
2015-01-30 14:24:39 +01:00
ret += String.fromCharCode(buf[i] & 0x7F)
2014-11-03 14:32:38 +01:00
}
return ret
}
function binarySlice (buf, start, end) {
2015-01-30 14:24:39 +01:00
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; i++) {
ret += String.fromCharCode(buf[i])
}
return ret
2014-11-03 14:32:38 +01:00
}
function hexSlice (buf, start, end) {
var len = buf.length
if (!start || start < 0) start = 0
if (!end || end < 0 || end > len) end = len
var out = ''
for (var i = start; i < end; i++) {
out += toHex(buf[i])
}
return out
}
function utf16leSlice (buf, start, end) {
var bytes = buf.slice(start, end)
var res = ''
for (var i = 0; i < bytes.length; i += 2) {
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
}
return res
}
Buffer.prototype.slice = function (start, end) {
var len = this.length
start = ~~start
end = end === undefined ? len : ~~end
if (start < 0) {
start += len;
if (start < 0)
start = 0
} else if (start > len) {
start = len
}
if (end < 0) {
end += len
if (end < 0)
end = 0
} else if (end > len) {
end = len
}
if (end < start)
end = start
2015-01-30 14:24:39 +01:00
var newBuf
2014-11-03 14:32:38 +01:00
if (Buffer.TYPED_ARRAY_SUPPORT) {
2015-01-30 14:24:39 +01:00
newBuf = Buffer._augment(this.subarray(start, end))
2014-11-03 14:32:38 +01:00
} else {
var sliceLen = end - start
2015-01-30 14:24:39 +01:00
newBuf = new Buffer(sliceLen, undefined, true)
2014-11-03 14:32:38 +01:00
for (var i = 0; i < sliceLen; i++) {
newBuf[i] = this[i + start]
}
}
2015-01-30 14:24:39 +01:00
if (newBuf.length)
newBuf.parent = this.parent || this
return newBuf
2014-11-03 14:32:38 +01:00
}
/*
* Need to make sure that buffer isn't trying to write out of bounds.
*/
function checkOffset (offset, ext, length) {
if ((offset % 1) !== 0 || offset < 0)
throw new RangeError('offset is not uint')
if (offset + ext > length)
throw new RangeError('Trying to access beyond buffer length')
}
2015-01-30 14:24:39 +01:00
Buffer.prototype.readUIntLE = function (offset, byteLength, noAssert) {
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert)
checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100))
val += this[offset + i] * mul
return val
}
Buffer.prototype.readUIntBE = function (offset, byteLength, noAssert) {
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert)
checkOffset(offset, byteLength, this.length)
var val = this[offset + --byteLength]
var mul = 1
while (byteLength > 0 && (mul *= 0x100))
val += this[offset + --byteLength] * mul;
return val
}
2014-11-03 14:32:38 +01:00
Buffer.prototype.readUInt8 = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 1, this.length)
return this[offset]
}
Buffer.prototype.readUInt16LE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 2, this.length)
return this[offset] | (this[offset + 1] << 8)
}
Buffer.prototype.readUInt16BE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 2, this.length)
return (this[offset] << 8) | this[offset + 1]
}
Buffer.prototype.readUInt32LE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 4, this.length)
return ((this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16)) +
(this[offset + 3] * 0x1000000)
}
Buffer.prototype.readUInt32BE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 4, this.length)
return (this[offset] * 0x1000000) +
((this[offset + 1] << 16) |
(this[offset + 2] << 8) |
this[offset + 3])
}
2015-01-30 14:24:39 +01:00
Buffer.prototype.readIntLE = function (offset, byteLength, noAssert) {
offset = offset >>> 0
byteLength = byteLength >>> 0
2014-11-03 14:32:38 +01:00
if (!noAssert)
2015-01-30 14:24:39 +01:00
checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100))
val += this[offset + i] * mul
mul *= 0x80
if (val >= mul)
val -= Math.pow(2, 8 * byteLength)
return val
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
Buffer.prototype.readIntBE = function (offset, byteLength, noAssert) {
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert)
checkOffset(offset, byteLength, this.length)
var i = byteLength
var mul = 1
var val = this[offset + --i]
while (i > 0 && (mul *= 0x100))
val += this[offset + --i] * mul
mul *= 0x80
if (val >= mul)
val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readInt8 = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 1, this.length)
if (!(this[offset] & 0x80))
return (this[offset])
return ((0xff - this[offset] + 1) * -1)
}
Buffer.prototype.readInt16LE = function (offset, noAssert) {
2014-11-03 14:32:38 +01:00
if (!noAssert)
checkOffset(offset, 2, this.length)
var val = this[offset] | (this[offset + 1] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt16BE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 2, this.length)
var val = this[offset + 1] | (this[offset] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt32LE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 4, this.length)
return (this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16) |
(this[offset + 3] << 24)
}
Buffer.prototype.readInt32BE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 4, this.length)
return (this[offset] << 24) |
(this[offset + 1] << 16) |
(this[offset + 2] << 8) |
(this[offset + 3])
}
Buffer.prototype.readFloatLE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, true, 23, 4)
}
Buffer.prototype.readFloatBE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, false, 23, 4)
}
Buffer.prototype.readDoubleLE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, true, 52, 8)
}
Buffer.prototype.readDoubleBE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, false, 52, 8)
}
function checkInt (buf, value, offset, ext, max, min) {
if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance')
2015-01-30 14:24:39 +01:00
if (value > max || value < min) throw new RangeError('value is out of bounds')
if (offset + ext > buf.length) throw new RangeError('index out of range')
}
Buffer.prototype.writeUIntLE = function (value, offset, byteLength, noAssert) {
value = +value
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert)
checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
var mul = 1
var i = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100))
this[offset + i] = (value / mul) >>> 0 & 0xFF
return offset + byteLength
}
Buffer.prototype.writeUIntBE = function (value, offset, byteLength, noAssert) {
value = +value
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert)
checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
var i = byteLength - 1
var mul = 1
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100))
this[offset + i] = (value / mul) >>> 0 & 0xFF
return offset + byteLength
2014-11-03 14:32:38 +01:00
}
Buffer.prototype.writeUInt8 = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 1, 0xff, 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
this[offset] = value
return offset + 1
}
function objectWriteUInt16 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
(littleEndian ? i : 1 - i) * 8
}
}
Buffer.prototype.writeUInt16LE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value
this[offset + 1] = (value >>> 8)
} else objectWriteUInt16(this, value, offset, true)
return offset + 2
}
Buffer.prototype.writeUInt16BE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = value
} else objectWriteUInt16(this, value, offset, false)
return offset + 2
}
function objectWriteUInt32 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffffffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
}
}
Buffer.prototype.writeUInt32LE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset + 3] = (value >>> 24)
this[offset + 2] = (value >>> 16)
this[offset + 1] = (value >>> 8)
this[offset] = value
} else objectWriteUInt32(this, value, offset, true)
return offset + 4
}
Buffer.prototype.writeUInt32BE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = value
} else objectWriteUInt32(this, value, offset, false)
return offset + 4
}
2015-01-30 14:24:39 +01:00
Buffer.prototype.writeIntLE = function (value, offset, byteLength, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) {
checkInt(this,
value,
offset,
byteLength,
Math.pow(2, 8 * byteLength - 1) - 1,
-Math.pow(2, 8 * byteLength - 1))
}
var i = 0
var mul = 1
var sub = value < 0 ? 1 : 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100))
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
return offset + byteLength
}
Buffer.prototype.writeIntBE = function (value, offset, byteLength, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) {
checkInt(this,
value,
offset,
byteLength,
Math.pow(2, 8 * byteLength - 1) - 1,
-Math.pow(2, 8 * byteLength - 1))
}
var i = byteLength - 1
var mul = 1
var sub = value < 0 ? 1 : 0
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100))
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
return offset + byteLength
}
2014-11-03 14:32:38 +01:00
Buffer.prototype.writeInt8 = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 1, 0x7f, -0x80)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
if (value < 0) value = 0xff + value + 1
this[offset] = value
return offset + 1
}
Buffer.prototype.writeInt16LE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value
this[offset + 1] = (value >>> 8)
} else objectWriteUInt16(this, value, offset, true)
return offset + 2
}
Buffer.prototype.writeInt16BE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = value
} else objectWriteUInt16(this, value, offset, false)
return offset + 2
}
Buffer.prototype.writeInt32LE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value
this[offset + 1] = (value >>> 8)
this[offset + 2] = (value >>> 16)
this[offset + 3] = (value >>> 24)
} else objectWriteUInt32(this, value, offset, true)
return offset + 4
}
Buffer.prototype.writeInt32BE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (value < 0) value = 0xffffffff + value + 1
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = value
} else objectWriteUInt32(this, value, offset, false)
return offset + 4
}
function checkIEEE754 (buf, value, offset, ext, max, min) {
2015-01-30 14:24:39 +01:00
if (value > max || value < min) throw new RangeError('value is out of bounds')
if (offset + ext > buf.length) throw new RangeError('index out of range')
if (offset < 0) throw new RangeError('index out of range')
2014-11-03 14:32:38 +01:00
}
function writeFloat (buf, value, offset, littleEndian, noAssert) {
if (!noAssert)
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
ieee754.write(buf, value, offset, littleEndian, 23, 4)
return offset + 4
}
Buffer.prototype.writeFloatLE = function (value, offset, noAssert) {
return writeFloat(this, value, offset, true, noAssert)
}
Buffer.prototype.writeFloatBE = function (value, offset, noAssert) {
return writeFloat(this, value, offset, false, noAssert)
}
function writeDouble (buf, value, offset, littleEndian, noAssert) {
if (!noAssert)
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
ieee754.write(buf, value, offset, littleEndian, 52, 8)
return offset + 8
}
Buffer.prototype.writeDoubleLE = function (value, offset, noAssert) {
return writeDouble(this, value, offset, true, noAssert)
}
Buffer.prototype.writeDoubleBE = function (value, offset, noAssert) {
return writeDouble(this, value, offset, false, noAssert)
}
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function (target, target_start, start, end) {
var source = this
if (!start) start = 0
if (!end && end !== 0) end = this.length
2015-01-30 14:24:39 +01:00
if (target_start >= target.length) target_start = target.length
2014-11-03 14:32:38 +01:00
if (!target_start) target_start = 0
2015-01-30 14:24:39 +01:00
if (end > 0 && end < start) end = start
2014-11-03 14:32:38 +01:00
// Copy 0 bytes; we're done
2015-01-30 14:24:39 +01:00
if (end === start) return 0
if (target.length === 0 || source.length === 0) return 0
2014-11-03 14:32:38 +01:00
// Fatal error conditions
2015-01-30 14:24:39 +01:00
if (target_start < 0)
throw new RangeError('targetStart out of bounds')
if (start < 0 || start >= source.length) throw new RangeError('sourceStart out of bounds')
if (end < 0) throw new RangeError('sourceEnd out of bounds')
2014-11-03 14:32:38 +01:00
// Are we oob?
if (end > this.length)
end = this.length
if (target.length - target_start < end - start)
end = target.length - target_start + start
var len = end - start
if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
for (var i = 0; i < len; i++) {
target[i + target_start] = this[i + start]
}
} else {
target._set(this.subarray(start, start + len), target_start)
}
2015-01-30 14:24:39 +01:00
return len
2014-11-03 14:32:38 +01:00
}
// fill(value, start=0, end=buffer.length)
Buffer.prototype.fill = function (value, start, end) {
if (!value) value = 0
if (!start) start = 0
if (!end) end = this.length
2015-01-30 14:24:39 +01:00
if (end < start) throw new RangeError('end < start')
2014-11-03 14:32:38 +01:00
// Fill 0 bytes; we're done
if (end === start) return
if (this.length === 0) return
2015-01-30 14:24:39 +01:00
if (start < 0 || start >= this.length) throw new RangeError('start out of bounds')
if (end < 0 || end > this.length) throw new RangeError('end out of bounds')
2014-11-03 14:32:38 +01:00
var i
if (typeof value === 'number') {
for (i = start; i < end; i++) {
this[i] = value
}
} else {
var bytes = utf8ToBytes(value.toString())
var len = bytes.length
for (i = start; i < end; i++) {
this[i] = bytes[i % len]
}
}
return this
}
/**
* Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.
* Added in Node 0.12. Only available in browsers that support ArrayBuffer.
*/
Buffer.prototype.toArrayBuffer = function () {
if (typeof Uint8Array !== 'undefined') {
if (Buffer.TYPED_ARRAY_SUPPORT) {
return (new Buffer(this)).buffer
} else {
var buf = new Uint8Array(this.length)
for (var i = 0, len = buf.length; i < len; i += 1) {
buf[i] = this[i]
}
return buf.buffer
}
} else {
throw new TypeError('Buffer.toArrayBuffer not supported in this browser')
}
}
// HELPER FUNCTIONS
// ================
var BP = Buffer.prototype
/**
* Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
*/
Buffer._augment = function (arr) {
arr.constructor = Buffer
arr._isBuffer = true
// save reference to original Uint8Array get/set methods before overwriting
arr._get = arr.get
arr._set = arr.set
// deprecated, will be removed in node 0.13+
arr.get = BP.get
arr.set = BP.set
arr.write = BP.write
arr.toString = BP.toString
arr.toLocaleString = BP.toString
arr.toJSON = BP.toJSON
arr.equals = BP.equals
arr.compare = BP.compare
arr.copy = BP.copy
arr.slice = BP.slice
2015-01-30 14:24:39 +01:00
arr.readUIntLE = BP.readUIntLE
arr.readUIntBE = BP.readUIntBE
2014-11-03 14:32:38 +01:00
arr.readUInt8 = BP.readUInt8
arr.readUInt16LE = BP.readUInt16LE
arr.readUInt16BE = BP.readUInt16BE
arr.readUInt32LE = BP.readUInt32LE
arr.readUInt32BE = BP.readUInt32BE
2015-01-30 14:24:39 +01:00
arr.readIntLE = BP.readIntLE
arr.readIntBE = BP.readIntBE
2014-11-03 14:32:38 +01:00
arr.readInt8 = BP.readInt8
arr.readInt16LE = BP.readInt16LE
arr.readInt16BE = BP.readInt16BE
arr.readInt32LE = BP.readInt32LE
arr.readInt32BE = BP.readInt32BE
arr.readFloatLE = BP.readFloatLE
arr.readFloatBE = BP.readFloatBE
arr.readDoubleLE = BP.readDoubleLE
arr.readDoubleBE = BP.readDoubleBE
arr.writeUInt8 = BP.writeUInt8
2015-01-30 14:24:39 +01:00
arr.writeUIntLE = BP.writeUIntLE
arr.writeUIntBE = BP.writeUIntBE
2014-11-03 14:32:38 +01:00
arr.writeUInt16LE = BP.writeUInt16LE
arr.writeUInt16BE = BP.writeUInt16BE
arr.writeUInt32LE = BP.writeUInt32LE
arr.writeUInt32BE = BP.writeUInt32BE
2015-01-30 14:24:39 +01:00
arr.writeIntLE = BP.writeIntLE
arr.writeIntBE = BP.writeIntBE
2014-11-03 14:32:38 +01:00
arr.writeInt8 = BP.writeInt8
arr.writeInt16LE = BP.writeInt16LE
arr.writeInt16BE = BP.writeInt16BE
arr.writeInt32LE = BP.writeInt32LE
arr.writeInt32BE = BP.writeInt32BE
arr.writeFloatLE = BP.writeFloatLE
arr.writeFloatBE = BP.writeFloatBE
arr.writeDoubleLE = BP.writeDoubleLE
arr.writeDoubleBE = BP.writeDoubleBE
arr.fill = BP.fill
arr.inspect = BP.inspect
arr.toArrayBuffer = BP.toArrayBuffer
return arr
}
2015-01-30 14:24:39 +01:00
var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g
2014-11-03 14:32:38 +01:00
function base64clean (str) {
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = stringtrim(str).replace(INVALID_BASE64_RE, '')
2015-01-30 14:24:39 +01:00
// Node converts strings with length < 2 to ''
if (str.length < 2) return ''
2014-11-03 14:32:38 +01:00
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
while (str.length % 4 !== 0) {
str = str + '='
}
return str
}
function stringtrim (str) {
if (str.trim) return str.trim()
return str.replace(/^\s+|\s+$/g, '')
}
function isArrayish (subject) {
return isArray(subject) || Buffer.isBuffer(subject) ||
subject && typeof subject === 'object' &&
typeof subject.length === 'number'
}
function toHex (n) {
if (n < 16) return '0' + n.toString(16)
return n.toString(16)
}
2015-01-30 14:24:39 +01:00
function utf8ToBytes(string, units) {
var codePoint, length = string.length
var leadSurrogate = null
units = units || Infinity
var bytes = []
var i = 0
for (; i<length; i++) {
codePoint = string.charCodeAt(i)
// is surrogate component
if (codePoint > 0xD7FF && codePoint < 0xE000) {
// last char was a lead
if (leadSurrogate) {
// 2 leads in a row
if (codePoint < 0xDC00) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
leadSurrogate = codePoint
continue
}
// valid surrogate pair
else {
codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000
leadSurrogate = null
}
}
// no lead yet
else {
// unexpected trail
if (codePoint > 0xDBFF) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
}
// unpaired lead
else if (i + 1 === length) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
}
// valid lead
else {
leadSurrogate = codePoint
continue
}
2014-11-03 14:32:38 +01:00
}
}
2015-01-30 14:24:39 +01:00
// valid bmp char, but last char was a lead
else if (leadSurrogate) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
leadSurrogate = null
}
// encode utf8
if (codePoint < 0x80) {
if ((units -= 1) < 0) break
bytes.push(codePoint)
}
else if (codePoint < 0x800) {
if ((units -= 2) < 0) break
bytes.push(
codePoint >> 0x6 | 0xC0,
codePoint & 0x3F | 0x80
);
}
else if (codePoint < 0x10000) {
if ((units -= 3) < 0) break
bytes.push(
codePoint >> 0xC | 0xE0,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
);
}
else if (codePoint < 0x200000) {
if ((units -= 4) < 0) break
bytes.push(
codePoint >> 0x12 | 0xF0,
codePoint >> 0xC & 0x3F | 0x80,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
);
}
else {
throw new Error('Invalid code point')
}
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
return bytes
2014-11-03 14:32:38 +01:00
}
function asciiToBytes (str) {
var byteArray = []
for (var i = 0; i < str.length; i++) {
// Node's code seems to be doing this and not & 0x7F..
byteArray.push(str.charCodeAt(i) & 0xFF)
}
return byteArray
}
2015-01-30 14:24:39 +01:00
function utf16leToBytes (str, units) {
2014-11-03 14:32:38 +01:00
var c, hi, lo
var byteArray = []
for (var i = 0; i < str.length; i++) {
2015-01-30 14:24:39 +01:00
if ((units -= 2) < 0) break
2014-11-03 14:32:38 +01:00
c = str.charCodeAt(i)
hi = c >> 8
lo = c % 256
byteArray.push(lo)
byteArray.push(hi)
}
return byteArray
}
function base64ToBytes (str) {
2015-01-30 14:24:39 +01:00
return base64.toByteArray(base64clean(str))
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
function blitBuffer (src, dst, offset, length, unitSize) {
if (unitSize) length -= length % unitSize;
2014-11-03 14:32:38 +01:00
for (var i = 0; i < length; i++) {
if ((i + offset >= dst.length) || (i >= src.length))
break
dst[i + offset] = src[i]
}
return i
}
function decodeUtf8Char (str) {
try {
return decodeURIComponent(str)
} catch (err) {
return String.fromCharCode(0xFFFD) // UTF 8 invalid char
}
}
2015-01-30 14:24:39 +01:00
},{"base64-js":50,"ieee754":51,"is-array":52}],50:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
;(function (exports) {
'use strict';
var Arr = (typeof Uint8Array !== 'undefined')
? Uint8Array
: Array
var PLUS = '+'.charCodeAt(0)
var SLASH = '/'.charCodeAt(0)
var NUMBER = '0'.charCodeAt(0)
var LOWER = 'a'.charCodeAt(0)
var UPPER = 'A'.charCodeAt(0)
2015-01-30 14:24:39 +01:00
var PLUS_URL_SAFE = '-'.charCodeAt(0)
var SLASH_URL_SAFE = '_'.charCodeAt(0)
2014-11-03 14:32:38 +01:00
function decode (elt) {
var code = elt.charCodeAt(0)
2015-01-30 14:24:39 +01:00
if (code === PLUS ||
code === PLUS_URL_SAFE)
2014-11-03 14:32:38 +01:00
return 62 // '+'
2015-01-30 14:24:39 +01:00
if (code === SLASH ||
code === SLASH_URL_SAFE)
2014-11-03 14:32:38 +01:00
return 63 // '/'
if (code < NUMBER)
return -1 //no match
if (code < NUMBER + 10)
return code - NUMBER + 26 + 26
if (code < UPPER + 26)
return code - UPPER
if (code < LOWER + 26)
return code - LOWER + 26
}
function b64ToByteArray (b64) {
var i, j, l, tmp, placeHolders, arr
if (b64.length % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
}
// the number of equal signs (place holders)
// if there are two placeholders, than the two characters before it
// represent one byte
// if there is only one, then the three characters before it represent 2 bytes
// this is just a cheap hack to not do indexOf twice
var len = b64.length
placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0
// base64 is 4/3 + up to two characters of the original data
arr = new Arr(b64.length * 3 / 4 - placeHolders)
// if there are placeholders, only get up to the last complete 4 chars
l = placeHolders > 0 ? b64.length - 4 : b64.length
var L = 0
function push (v) {
arr[L++] = v
}
for (i = 0, j = 0; i < l; i += 4, j += 3) {
tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))
push((tmp & 0xFF0000) >> 16)
push((tmp & 0xFF00) >> 8)
push(tmp & 0xFF)
}
if (placeHolders === 2) {
tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)
push(tmp & 0xFF)
} else if (placeHolders === 1) {
tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2)
push((tmp >> 8) & 0xFF)
push(tmp & 0xFF)
}
return arr
}
function uint8ToBase64 (uint8) {
var i,
extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
output = "",
temp, length
function encode (num) {
return lookup.charAt(num)
}
function tripletToBase64 (num) {
return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)
}
// go through the array every three bytes, we'll deal with trailing stuff later
for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
output += tripletToBase64(temp)
}
// pad the end with zeros, but make sure to not forget the extra bytes
switch (extraBytes) {
case 1:
temp = uint8[uint8.length - 1]
output += encode(temp >> 2)
output += encode((temp << 4) & 0x3F)
output += '=='
break
case 2:
temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])
output += encode(temp >> 10)
output += encode((temp >> 4) & 0x3F)
output += encode((temp << 2) & 0x3F)
output += '='
break
}
return output
}
exports.toByteArray = b64ToByteArray
exports.fromByteArray = uint8ToBase64
}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
2015-01-30 14:24:39 +01:00
},{}],51:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
exports.read = function(buffer, offset, isLE, mLen, nBytes) {
var e, m,
eLen = nBytes * 8 - mLen - 1,
eMax = (1 << eLen) - 1,
eBias = eMax >> 1,
nBits = -7,
i = isLE ? (nBytes - 1) : 0,
d = isLE ? -1 : 1,
s = buffer[offset + i];
i += d;
e = s & ((1 << (-nBits)) - 1);
s >>= (-nBits);
nBits += eLen;
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);
m = e & ((1 << (-nBits)) - 1);
e >>= (-nBits);
nBits += mLen;
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);
if (e === 0) {
e = 1 - eBias;
} else if (e === eMax) {
return m ? NaN : ((s ? -1 : 1) * Infinity);
} else {
m = m + Math.pow(2, mLen);
e = e - eBias;
}
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
};
exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c,
eLen = nBytes * 8 - mLen - 1,
eMax = (1 << eLen) - 1,
eBias = eMax >> 1,
rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),
i = isLE ? 0 : (nBytes - 1),
d = isLE ? 1 : -1,
s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;
value = Math.abs(value);
if (isNaN(value) || value === Infinity) {
m = isNaN(value) ? 1 : 0;
e = eMax;
} else {
e = Math.floor(Math.log(value) / Math.LN2);
if (value * (c = Math.pow(2, -e)) < 1) {
e--;
c *= 2;
}
if (e + eBias >= 1) {
value += rt / c;
} else {
value += rt * Math.pow(2, 1 - eBias);
}
if (value * c >= 2) {
e++;
c /= 2;
}
if (e + eBias >= eMax) {
m = 0;
e = eMax;
} else if (e + eBias >= 1) {
m = (value * c - 1) * Math.pow(2, mLen);
e = e + eBias;
} else {
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
e = 0;
}
}
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);
e = (e << mLen) | m;
eLen += mLen;
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);
buffer[offset + i - d] |= s * 128;
};
2015-01-30 14:24:39 +01:00
},{}],52:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
/**
* isArray
*/
var isArray = Array.isArray;
/**
* toString
*/
var str = Object.prototype.toString;
/**
* Whether or not the given `val`
* is an array.
*
* example:
*
* isArray([]);
* // > true
* isArray(arguments);
* // > false
* isArray('');
* // > false
*
* @param {mixed} val
* @return {bool}
*/
module.exports = isArray || function (val) {
return !! val && '[object Array]' == str.call(val);
};
2015-01-30 14:24:39 +01:00
},{}],53:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function (process){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// resolves . and .. elements in a path array with directory names there
// must be no slashes, empty elements, or device names (c:\) in the array
// (so also no leading and trailing slashes - it does not distinguish
// relative and absolute paths)
function normalizeArray(parts, allowAboveRoot) {
// if the path tries to go above the root, `up` ends up > 0
var up = 0;
for (var i = parts.length - 1; i >= 0; i--) {
var last = parts[i];
if (last === '.') {
parts.splice(i, 1);
} else if (last === '..') {
parts.splice(i, 1);
up++;
} else if (up) {
parts.splice(i, 1);
up--;
}
}
// if the path is allowed to go above the root, restore leading ..s
if (allowAboveRoot) {
for (; up--; up) {
parts.unshift('..');
}
}
return parts;
}
// Split a filename into [root, dir, basename, ext], unix version
// 'root' is just a slash, or nothing.
var splitPathRe =
/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
var splitPath = function(filename) {
return splitPathRe.exec(filename).slice(1);
};
// path.resolve([from ...], to)
// posix version
exports.resolve = function() {
var resolvedPath = '',
resolvedAbsolute = false;
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
var path = (i >= 0) ? arguments[i] : process.cwd();
// Skip empty and invalid entries
if (typeof path !== 'string') {
throw new TypeError('Arguments to path.resolve must be strings');
} else if (!path) {
continue;
}
resolvedPath = path + '/' + resolvedPath;
resolvedAbsolute = path.charAt(0) === '/';
}
// At this point the path should be resolved to a full absolute path, but
// handle relative paths to be safe (might happen when process.cwd() fails)
// Normalize the path
resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
return !!p;
}), !resolvedAbsolute).join('/');
return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
};
// path.normalize(path)
// posix version
exports.normalize = function(path) {
var isAbsolute = exports.isAbsolute(path),
trailingSlash = substr(path, -1) === '/';
// Normalize the path
path = normalizeArray(filter(path.split('/'), function(p) {
return !!p;
}), !isAbsolute).join('/');
if (!path && !isAbsolute) {
path = '.';
}
if (path && trailingSlash) {
path += '/';
}
return (isAbsolute ? '/' : '') + path;
};
// posix version
exports.isAbsolute = function(path) {
return path.charAt(0) === '/';
};
// posix version
exports.join = function() {
var paths = Array.prototype.slice.call(arguments, 0);
return exports.normalize(filter(paths, function(p, index) {
if (typeof p !== 'string') {
throw new TypeError('Arguments to path.join must be strings');
}
return p;
}).join('/'));
};
// path.relative(from, to)
// posix version
exports.relative = function(from, to) {
from = exports.resolve(from).substr(1);
to = exports.resolve(to).substr(1);
function trim(arr) {
var start = 0;
for (; start < arr.length; start++) {
if (arr[start] !== '') break;
}
var end = arr.length - 1;
for (; end >= 0; end--) {
if (arr[end] !== '') break;
}
if (start > end) return [];
return arr.slice(start, end - start + 1);
}
var fromParts = trim(from.split('/'));
var toParts = trim(to.split('/'));
var length = Math.min(fromParts.length, toParts.length);
var samePartsLength = length;
for (var i = 0; i < length; i++) {
if (fromParts[i] !== toParts[i]) {
samePartsLength = i;
break;
}
}
var outputParts = [];
for (var i = samePartsLength; i < fromParts.length; i++) {
outputParts.push('..');
}
outputParts = outputParts.concat(toParts.slice(samePartsLength));
return outputParts.join('/');
};
exports.sep = '/';
exports.delimiter = ':';
exports.dirname = function(path) {
var result = splitPath(path),
root = result[0],
dir = result[1];
if (!root && !dir) {
// No dirname whatsoever
return '.';
}
if (dir) {
// It has a dirname, strip trailing slash
dir = dir.substr(0, dir.length - 1);
}
return root + dir;
};
exports.basename = function(path, ext) {
var f = splitPath(path)[2];
// TODO: make this comparison case-insensitive on windows?
if (ext && f.substr(-1 * ext.length) === ext) {
f = f.substr(0, f.length - ext.length);
}
return f;
};
exports.extname = function(path) {
return splitPath(path)[3];
};
function filter (xs, f) {
if (xs.filter) return xs.filter(f);
var res = [];
for (var i = 0; i < xs.length; i++) {
if (f(xs[i], i, xs)) res.push(xs[i]);
}
return res;
}
// String.prototype.substr - negative index don't work in IE8
var substr = 'ab'.substr(-1) === 'b'
? function (str, start, len) { return str.substr(start, len) }
: function (str, start, len) {
if (start < 0) start = str.length + start;
return str.substr(start, len);
}
;
}).call(this,require('_process'))
2015-01-30 14:24:39 +01:00
},{"_process":54}],54:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
// shim for using process in browser
var process = module.exports = {};
2015-01-30 14:24:39 +01:00
var queue = [];
var draining = false;
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
function drainQueue() {
if (draining) {
return;
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
draining = true;
var currentQueue;
var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
var i = -1;
while (++i < len) {
currentQueue[i]();
}
len = queue.length;
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
draining = false;
}
process.nextTick = function (fun) {
queue.push(fun);
if (!draining) {
setTimeout(drainQueue, 0);
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
2015-01-30 14:24:39 +01:00
process.version = ''; // empty string to avoid regexp issues
2014-11-03 14:32:38 +01:00
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
// TODO(shtylman)
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
2015-01-30 14:24:39 +01:00
process.umask = function() { return 0; };
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
},{}],55:[function(require,module,exports){
var caniuse = require('caniuse-db/data').agents;
var path = require('path');
var fs = require('fs');
var uniq = function (array) {
var filtered = [];
for ( var i = 0; i < array.length; i++ ) {
if ( filtered.indexOf(array[i]) == -1 ) filtered.push(array[i]);
}
return filtered;
};
normalizeVersion = function (data, version) {
if ( data.versions.indexOf(version) != -1 ) {
return version;
} else {
var alias = browserslist.versionAliases[data.name][version];
if ( alias ) return alias;
}
};
// Return array of browsers by selection queries:
//
// browserslist('IE >= 10, IE 8') //=> ['ie 11', 'ie 10', 'ie 8']
var browserslist = function (selections, opts) {
if ( typeof(opts) == 'undefined' ) opts = { };
if ( typeof(selections) == 'undefined' || selections === null ) {
var config = browserslist.readConfig(opts.path);
if ( config === false ) {
selections = browserslist.defaults;
} else {
selections = config;
}
}
if ( typeof(selections) == 'string' ) {
selections = selections.split(/,\s*/);
}
var result = [];
var query, match, array, used;
selections.forEach(function (selection) {
if ( selection.trim() === '' ) return;
used = false;
for ( var i in browserslist.queries ) {
query = browserslist.queries[i];
match = selection.match(query.regexp);
if ( match ) {
array = query.select.apply(browserslist, match.slice(1));
result = result.concat(array);
used = true;
break;
}
}
if ( !used ) {
throw 'Unknown browser query `' + selection + '`';
}
});
return uniq(result).sort(function (name1, name2) {
name1 = name1.split(' ');
name2 = name2.split(' ');
if ( name1[0] == name2[0] ) {
return parseFloat(name2[1]) - parseFloat(name1[1]);
} else {
return name1[0].localeCompare(name2[0]);
}
});
};
// Will be filled by Can I Use data below
browserslist.data = { };
browserslist.usage = {
global: { }
};
// Default browsers query
browserslist.defaults = [
'> 1%',
'last 2 versions',
'Firefox ESR',
'Opera 12.1'
];
// What browsers will be used in `last n version` query
browserslist.major = ['safari', 'opera', 'ios_saf', 'ie_mob', 'ie',
'firefox', 'chrome'];
// Browser names aliases
browserslist.aliases = {
fx: 'firefox',
ff: 'firefox',
ios: 'ios_saf',
explorer: 'ie',
blackberry: 'bb',
explorermobile: 'ie_mob',
operamini: 'op_mini',
operamobile: 'op_mob',
chromeandroid: 'and_chr',
firefoxandroid: 'and_ff'
};
// Aliases ot work with joined versions like `ios_saf 7.0-7.1`
browserslist.versionAliases = { };
// Get browser data by alias or case insensitive name
browserslist.byName = function (name) {
name = name.toLowerCase();
name = browserslist.aliases[name] || name;
var data = browserslist.data[name];
if ( !data ) throw 'Unknown browser ' + name;
return data;
};
// Find config, read file and parse it
browserslist.readConfig = function (from) {
if ( from === false ) return false;
if ( !fs.readFileSync ) return false;
if ( typeof(from) == 'undefined' ) from = '.';
var dirs = path.resolve(from).split(path.sep);
var config, stat;
while ( dirs.length ) {
config = dirs.concat(['browserslist']).join(path.sep);
if ( fs.existsSync(config) && fs.lstatSync(config).isFile() ) {
return browserslist.parseConfig( fs.readFileSync(config) );
}
dirs.pop();
}
return false;
};
// Return array of queries from config content
browserslist.parseConfig = function (string) {
return string.toString()
.replace(/#[^\n]*/g, '')
.split(/\n/)
.map(function (i) {
return i.trim();
})
.filter(function (i) {
return i !== '';
});
};
browserslist.queries = {
lastVersions: {
regexp: /^last (\d+) versions?$/i,
select: function (versions) {
var selected = [];
browserslist.major.forEach(function (name) {
var data = browserslist.byName(name);
var array = data.released.slice(-versions);
array = array.map(function (v) {
return data.name + ' ' + v;
});
selected = selected.concat(array);
});
return selected;
}
},
lastByBrowser: {
regexp: /^last (\d+) (\w+) versions?$/i,
select: function (versions, name) {
var data = browserslist.byName(name);
return data.released.slice(-versions).map(function (v) {
return data.name + ' ' + v;
});
}
},
globalStatistics: {
regexp: /^> (\d+\.?\d*)%$/,
select: function (popularity) {
popularity = parseFloat(popularity);
var result = [];
for ( var version in browserslist.usage.global ) {
if ( browserslist.usage.global[version] > popularity ) {
result.push(version);
}
}
return result;
}
},
countryStatistics: {
regexp: /^> (\d+\.?\d*)% in (\w\w)$/,
select: function (popularity, country) {
popularity = parseFloat(popularity);
country = country.toUpperCase();
var result = [];
var usage = browserslist.usage[country];
if ( !usage ) {
usage = { };
var data = require('caniuse-db/region-usage-json/' + country);
for ( var i in data.data ) {
fillUsage(usage, i, data.data[i]);
}
browserslist.usage[country] = usage;
}
for ( var version in usage ) {
if ( usage[version] > popularity ) {
result.push(version);
}
}
return result;
}
},
versions: {
regexp: /^(\w+) (>=?|<=?)\s*([\d\.]+)/,
select: function (name, sign, version) {
var data = browserslist.byName(name);
version = parseFloat(version);
var filter;
if ( sign == '>' ) {
filter = function (v) {
return parseFloat(v) > version;
};
} else if ( sign == '>=' ) {
filter = function (v) {
return parseFloat(v) >= version;
};
} else if ( sign == '<' ) {
filter = function (v) {
return parseFloat(v) < version;
};
} else if ( sign == '<=' ) {
filter = function (v) {
return parseFloat(v) <= version;
};
}
return data.released.filter(filter).map(function (v) {
return data.name + ' ' + v;
});
}
},
esr: {
regexp: /^(firefox|ff|fx) esr$/i,
select: function (versions) {
return ['firefox 31'];
}
},
direct: {
regexp: /^(\w+) ([\d\.]+)$/,
select: function (name, version) {
var data = browserslist.byName(name);
var alias = normalizeVersion(data, version);
if ( alias ) {
version = alias;
} else {
if ( version.indexOf('.') == -1 ) {
alias = version + '.0';
} else if ( /\.0$/.test(version) ) {
alias = version.replace(/\.0$/, '');
}
alias = normalizeVersion(data, alias);
if ( alias ) {
version = alias;
} else {
throw 'Unknown version ' + version + ' of ' + name;
}
}
return [data.name + ' ' + version];
}
}
};
// Get and convert Can I Use data
var normalize = function (versions) {
return versions.filter(function (version) {
return typeof(version) == 'string';
});
};
var fillUsage = function (result, name, data) {
for ( var i in data ) {
result[name + ' ' + i] = data[i];
}
};
for ( var name in caniuse ) {
browserslist.data[name] = {
name: name,
versions: normalize(caniuse[name].versions),
released: normalize(caniuse[name].versions.slice(0, -3))
};
fillUsage(browserslist.usage.global, name, caniuse[name].usage_global);
browserslist.versionAliases[name] = { };
for ( var i = 0; i < caniuse[name].versions.length; i++ ) {
if ( !caniuse[name].versions[i] ) continue;
var full = caniuse[name].versions[i];
if ( full.indexOf('-') != -1 ) {
var interval = full.split('-');
for ( var j = 0; j < interval.length; j++ ) {
browserslist.versionAliases[name][ interval[j] ] = full;
}
}
}
}
module.exports = browserslist;
},{"caniuse-db/data":56,"fs":48,"path":53}],56:[function(require,module,exports){
module.exports={"eras":{"e-36":"36 versions back","e-35":"35 versions back","e-34":"34 versions back","e-33":"33 versions back","e-32":"32 versions back","e-31":"31 versions back","e-30":"30 versions back","e-29":"29 versions back","e-28":"28 versions back","e-27":"27 versions back","e-26":"26 versions back","e-25":"25 versions back","e-24":"24 versions back","e-23":"23 versions back","e-22":"22 versions back","e-21":"21 versions back","e-20":"20 versions back","e-19":"19 versions back","e-18":"18 versions back","e-17":"17 versions back","e-16":"16 versions back","e-15":"15 versions back","e-14":"14 versions back","e-13":"13 versions back","e-12":"12 versions back","e-11":"11 versions back","e-10":"10 versions back","e-9":"9 versions back","e-8":"8 versions back","e-7":"7 versions back","e-6":"6 versions back","e-5":"5 versions back","e-4":"4 versions back","e-3":"3 versions back","e-2":"2 versions back","e-1":"Previous version","e0":"Current","e1":"Near future","e2":"Farther future","e3":"3 versions ahead"},"agents":{"ie":{"browser":"IE","abbr":"IE","prefix":"ms","type":"desktop","usage_global":{"5.5":0.009298,"6":0.0737794,"7":0.187802,"8":4.07799,"9":2.1329,"10":1.63656,"11":8.33707,"TP":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5.5","6","7","8","9","10","11","TP",null,null]},"firefox":{"browser":"Firefox","abbr":"FF","prefix":"moz","type":"desktop","usage_global":{"2":0.006597,"3":0.026388,"3.5":0.013194,"3.6":0.092358,"4":0.026388,"5":0.013194,"6":0.026388,"7":0.013194,"8":0.046179,"9":0.013194,"10":0.026388,"11":0.046179,"12":0.059373,"13":0.026388,"14":0.026388,"15":0.032985,"16":0.052776,"17":0.039582,"18":0.032985,"19":0.026388,"20":0.032985,"21":0.039582,"22":0.032985,"23":0.046179,"24":0.079164,"25":0.052776,"26":0.059373,"27":0.098955,"28":0.059373,"29":0.092358,"30":0.151731,"31":0.448596,"32":0.369432,"33":2.90928,"34":6.50464,"35":0.237492,"36":0.006597,"37":0.006597,"38":0},"versions":[null,"2","3","3.5","3.6","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38"]},"chrome":{"browser":"Chrome","abbr":"Chr.","prefix":"webkit","type":"desktop","usage_global":{"4":0.026388,"5":0.013194,"6":0.019791,"7":0.013194,"8":0.013194,"9":0.013194,"10":0.019791,"11":0.098955,"12":0.039582,"13":0.026388,"14":0.026388,"15":0.026388,"16":0.019791,"17":0.013194,"18":0.032985,"19":0.013194,"20":0.013194,"21":0.072567,"22":0.059373,"23":0.032985,"24":0.039582,"25":0.032985,"26":0.052776,"27":0.072567,"28":0.079164,"29":0.06597,"30":0.13194,"31":0.752058,"32":0.145134,"33":0.46179,"34":0.32985,"35":0.613521,"36":0.890595,"37":1.02253,"38":1.326,"39":25.3919,"40":0.125343,"41":0.184716,"42":0,"43":0},"versions":["4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43"]},"safari":{"browser":"Safari","abbr":"Saf.","prefix":"webkit","type":"desktop","usage_global":{"3.1":0,"3.2":0.008692,"4":0.052776,"5":0.125343,"5.1":0.409014,"6":0.098955,"6.1":0.277074,"7":0.448596,"7.1":0.567342,"8":1.00274},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.1","3.2","4","5","5.1","6","6.1","7","7.1","8",null,null,null]},"opera":{"browser":"Opera","abbr":"Op.","prefix":"webkit","type":"desktop","usage_global":{"9.5-9.6":0.00685,"10.0-10.1":0.013194,"10.5":0.008392,"10.6":0.007296,"11":0.014996,"11.1":0.008219,"11.5":0.00685,"11.6":0.013194,"12":0.013194,"12.1":0.19791,"15":0.00685,"16":0.00685,"17":0.00685,"18":0.013194,"19":0.006597,"20":0.013194,"21":0.006597,"22":0.006597,"23":0.013434,"24":0.013194,"25":0.026388,"26":0.606924,"27":0.006597,"28":0,"29":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,"9.5-9.6","10.0-10.1","10.5","10.6","
},{}],57:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
"title":"CSS3 Background-image options",
"description":"New properties to affect background images, including background-clip, background-origin and background-size",
"spec":"http://www.w3.org/TR/css3-background/#backgrounds",
"status":"cr",
"links":[
{
"url":"http://www.standardista.com/css3/css3-background-properties",
"title":"Detailed compatibility tables and demos"
},
{
"url":"http://www.css3files.com/background/",
"title":"Information page"
},
{
"url":"https://github.com/louisremi/background-size-polyfill",
"title":"Polyfill for IE7-8"
}
],
"bugs":[
{
"description":"iOS Safari has buggy behavior with `background-size: cover;` on a page's body."
2015-01-30 14:24:39 +01:00
},
{
"description":"iOS Safari has buggy behavior with `background-size: cover;` + `background-attachment: fixed;`"
2014-11-03 14:32:38 +01:00
}
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"y",
"10":"y",
2015-01-30 14:24:39 +01:00
"11":"y",
"TP":"y"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"a x",
"4":"y",
"5":"y",
"6":"y",
"7":"y",
"8":"y",
"9":"y",
"10":"y",
"11":"y",
"12":"y",
"13":"y",
"14":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
2015-01-30 14:24:39 +01:00
"36":"y",
"37":"y",
"38":"y"
2014-11-03 14:32:38 +01:00
},
"chrome":{
2015-01-30 14:24:39 +01:00
"4":"a #3",
"5":"a #3",
"6":"a #3",
"7":"a #3",
"8":"a #3",
"9":"a #3",
"10":"a #3",
"11":"a #3",
"12":"a #3",
"13":"a #3",
"14":"a #3",
2014-11-03 14:32:38 +01:00
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
2014-11-20 07:04:47 +01:00
"41":"y",
2015-01-30 14:24:39 +01:00
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"a #2 #3",
"3.2":"a #2 #3",
"4":"a #2 #3",
"5":"a #2 #3",
"5.1":"a #2 #3",
"6":"a #2 #3",
"6.1":"a #2 #3",
2014-11-03 14:32:38 +01:00
"7":"y",
"7.1":"y",
"8":"y"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"a x",
"10.5":"y",
"10.6":"y",
"11":"y",
"11.1":"y",
"11.5":"y",
"11.6":"y",
"12":"y",
"12.1":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
2015-01-30 14:24:39 +01:00
"27":"y",
"28":"y",
"29":"y"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
"3.2":"a",
"4.0-4.1":"a",
"4.2-4.3":"a",
2015-01-30 14:24:39 +01:00
"5.0-5.1":"a #3",
2014-11-03 14:32:38 +01:00
"6.0-6.1":"a",
"7.0-7.1":"y",
"8":"y",
"8.1":"y"
},
"op_mini":{
2015-01-30 14:24:39 +01:00
"5.0-8.0":"a #1"
2014-11-03 14:32:38 +01:00
},
"android":{
"2.1":"a x",
2015-01-30 14:24:39 +01:00
"2.2":"a x #3",
"2.3":"a x #3",
"3":"a #3",
"4":"a #3",
"4.1":"a #3",
"4.2-4.3":"a #3",
2014-11-03 14:32:38 +01:00
"4.4":"y",
"4.4.3-4.4.4":"y",
"37":"y"
},
"bb":{
"7":"y",
"10":"y"
},
"op_mob":{
"10":"y",
"11":"y",
"11.1":"y",
"11.5":"y",
"12":"y",
"12.1":"y",
"24":"y"
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2014-11-20 07:04:47 +01:00
"10":"y",
"11":"y"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
"9.9":"y"
}
},
2015-01-30 14:24:39 +01:00
"notes":"",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
2015-01-30 14:24:39 +01:00
"1":"Partial support in Opera Mini refers to not supporting background sizing or background attachments. However Opera Mini 7.5 supports background sizing (including cover and contain values).",
"2":"Partial support in Safari 6 refers to not supporting background sizing offset from edges syntax.",
"3":"Does not support `background-size` values in the `background` shorthand"
2014-11-03 14:32:38 +01:00
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":85.13,
"usage_perc_a":7.59,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
"keywords":"",
"ie_id":"",
"chrome_id":"",
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],58:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
"title":"CSS3 Border images",
"description":"Method of using images for borders",
"spec":"http://www.w3.org/TR/css3-background/#the-border-image",
"status":"cr",
"links":[
{
"url":"http://www.css3files.com/border/",
"title":"Information page"
},
{
"url":"http://docs.webplatform.org/wiki/css/properties/border-image",
"title":"WebPlatform Docs"
}
],
"bugs":[
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
2015-01-30 14:24:39 +01:00
"11":"y",
"TP":"y"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"a x",
"3.6":"a x",
"4":"a x",
"5":"a x",
"6":"a x",
"7":"a x",
"8":"a x",
"9":"a x",
"10":"a x",
"11":"a x",
"12":"a x",
"13":"a x",
"14":"a x",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
2015-01-30 14:24:39 +01:00
"36":"y",
"37":"y",
"38":"y"
2014-11-03 14:32:38 +01:00
},
"chrome":{
"4":"a x",
"5":"a x",
"6":"a x",
"7":"a x",
"8":"a x",
"9":"a x",
"10":"a x",
"11":"a x",
"12":"a x",
"13":"a x",
"14":"a x",
"15":"y x",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
2014-11-20 07:04:47 +01:00
"41":"y",
2015-01-30 14:24:39 +01:00
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"a x",
"3.2":"a x",
"4":"a x",
"5":"a x",
"5.1":"a x",
"6":"y",
"6.1":"y",
"7":"y",
"7.1":"y",
"8":"y"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"a",
"10.6":"a",
"11":"a x",
"11.1":"a x",
"11.5":"a x",
"11.6":"a x",
"12":"a x",
"12.1":"a x",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
2015-01-30 14:24:39 +01:00
"27":"y",
"28":"y",
"29":"y"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
"3.2":"a x",
"4.0-4.1":"a x",
"4.2-4.3":"a x",
"5.0-5.1":"a x",
"6.0-6.1":"y",
"7.0-7.1":"y",
"8":"y",
"8.1":"y"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"a x",
"2.2":"a x",
"2.3":"a x",
"3":"a x",
"4":"a x",
"4.1":"a x",
"4.2-4.3":"a x",
"4.4":"y",
"4.4.3-4.4.4":"y",
"37":"y"
},
"bb":{
"7":"a x",
"10":"y"
},
"op_mob":{
"10":"n",
"11":"a x",
"11.1":"a x",
"11.5":"a x",
"12":"a x",
"12.1":"a x",
"24":"y"
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2014-11-20 07:04:47 +01:00
"10":"n",
"11":"y"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
"9.9":"y"
}
},
"notes":"Note that both the border-style and border-width must be specified for border-images to work according to spec, though older implementations may not have this requirement. Partial support refers to supporting the shorthand syntax, but not the individual properties (border-image-source, border-image-slice, etc). ",
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":80.88,
"usage_perc_a":4.66,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
"keywords":"",
"ie_id":"",
"chrome_id":"",
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],59:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
"title":"CSS3 Border-radius (rounded corners)",
"description":"Method of making the border corners round",
"spec":"http://www.w3.org/TR/css3-background/#the-border-radius",
"status":"cr",
"links":[
{
"url":"http://border-radius.com",
"title":"Border-radius CSS Generator"
},
{
"url":"http://muddledramblings.com/table-of-css3-border-radius-compliance",
"title":"Detailed compliance table"
},
{
"url":"http://www.css3files.com/border/#borderradius",
"title":"Information page"
},
{
"url":"http://css3pie.com/",
"title":"Polyfill which includes border-radius"
},
{
"url":"http://docs.webplatform.org/wiki/css/properties/border-radius",
"title":"WebPlatform Docs"
}
],
"bugs":[
{
"description":"Safari does not apply `border-radius` correctly to image borders: http://stackoverflow.com/q/17202128"
},
{
"description":"Android Browser 2.3 does not support % value for `border-radius`."
},
{
"description":"Border-radius does not work on fieldset elements in IE9."
},
{
"description":"The stock browser on the Samsung Galaxy S4 with Android 4.2 does not support the `border-radius` shorthand property but does support the long-hand properties for each corner like `border-top-left-radius`."
}
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"y",
"10":"y",
2015-01-30 14:24:39 +01:00
"11":"y",
"TP":"y"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"a x",
"3":"y x",
"3.5":"y x",
"3.6":"y x",
"4":"y",
"5":"y",
"6":"y",
"7":"y",
"8":"y",
"9":"y",
"10":"y",
"11":"y",
"12":"y",
"13":"y",
"14":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
2015-01-30 14:24:39 +01:00
"36":"y",
"37":"y",
"38":"y"
2014-11-03 14:32:38 +01:00
},
"chrome":{
"4":"y x",
"5":"y",
"6":"y",
"7":"y",
"8":"y",
"9":"y",
"10":"y",
"11":"y",
"12":"y",
"13":"y",
"14":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
2014-11-20 07:04:47 +01:00
"41":"y",
2015-01-30 14:24:39 +01:00
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"y x",
"3.2":"y x",
"4":"y x",
"5":"y",
"5.1":"y",
"6":"y",
"6.1":"y",
"7":"y",
"7.1":"y",
"8":"y"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"y",
"10.6":"y",
"11":"y",
"11.1":"y",
"11.5":"y",
"11.6":"y",
"12":"y",
"12.1":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
2015-01-30 14:24:39 +01:00
"27":"y",
"28":"y",
"29":"y"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
"3.2":"y x",
"4.0-4.1":"y",
"4.2-4.3":"y",
"5.0-5.1":"y",
"6.0-6.1":"y",
"7.0-7.1":"y",
"8":"y",
"8.1":"y"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"y x",
"2.2":"y",
"2.3":"y",
"3":"y",
"4":"y",
"4.1":"y",
"4.2-4.3":"y",
"4.4":"y",
"4.4.3-4.4.4":"y",
"37":"y"
},
"bb":{
"7":"y",
"10":"y"
},
"op_mob":{
"10":"n",
"11":"y",
"11.1":"y",
"11.5":"y",
"12":"y",
"12.1":"y",
"24":"y"
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2014-11-20 07:04:47 +01:00
"10":"y",
"11":"y"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
"9.9":"y"
}
},
"notes":"",
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":89.66,
2014-11-03 14:32:38 +01:00
"usage_perc_a":0.01,
"ucprefix":false,
"parent":"",
"keywords":"roundedcorners, border radius,-moz-border-radius",
"ie_id":"",
"chrome_id":"",
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],60:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
"title":"calc() as CSS unit value",
"description":"Method of allowing calculated values for length units, i.e. `width: calc(100% - 3em)`",
"spec":"http://www.w3.org/TR/css3-values/#calc",
"status":"cr",
"links":[
{
"url":"http://hacks.mozilla.org/2010/06/css3-calc/",
"title":"Mozilla Hacks article"
},
{
"url":"https://developer.mozilla.org/en/CSS/-moz-calc",
"title":"MDN article"
},
{
"url":"http://docs.webplatform.org/wiki/css/functions/calc",
"title":"WebPlatform Docs"
}
],
"bugs":[
{
"description":"Safari 7.0 and older and Chrome 26 and older don't support viewport units in `calc()` expressions (fixed since then)."
},
{
"description":"`calc()` doesn't work [inside a transform in IE](http://connect.microsoft.com/IE/feedback/details/814380/css3-using-calc-inside-a-transform-is-invalid)"
},
{
"description":"IE9 appears to ignore `calc()` expressions when `display:table` is used."
},
{
"description":"Safari 6 has a bug where an element with a width defined using `calc()` has its width reset when changing the height using JS (fixed in Safari 7)."
},
{
"description":"IE11 and other browsers to a lesser extent have trouble supporting `calc()` inside [color or transform values](http://codepen.io/thebabydino/pen/wfraH)."
2014-11-20 07:04:47 +01:00
},
{
"description":"IE10 crashes when a div with a property using `calc()` has a child with [same property with `inherit`](http://stackoverflow.com/questions/19423384/css-less-calc-method-is-crashing-my-ie10)."
},
{
"description":"IE 9 - 11 don't render `box-shadow` when `calc()` is used for any of the values."
2014-11-03 14:32:38 +01:00
}
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"a",
"10":"y",
2015-01-30 14:24:39 +01:00
"11":"y",
"TP":"y"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
2015-01-30 14:24:39 +01:00
"36":"y",
"37":"y",
"38":"y"
2014-11-03 14:32:38 +01:00
},
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
2014-11-20 07:04:47 +01:00
"41":"y",
2015-01-30 14:24:39 +01:00
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
"5.1":"n",
"6":"y x",
"6.1":"y",
"7":"y",
"7.1":"y",
"8":"y"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
2015-01-30 14:24:39 +01:00
"27":"y",
"28":"y",
"29":"y"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"y x",
"7.0-7.1":"y",
"8":"y",
"8.1":"y"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
"4.4":"a",
"4.4.3-4.4.4":"a",
"37":"y"
},
"bb":{
"7":"n",
"10":"y x"
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
"24":"y"
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2014-11-20 07:04:47 +01:00
"10":"y",
"11":"y"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
"9.9":"n"
}
},
"notes":"Support can be somewhat emulated in older versions of IE using the non-standard `expression()` syntax. Partial support in IE9 refers to the browser crashing when used as a `background-position` value. Partial support in Android Browser 4.4 refers to the browser lacking the ability to multiply and divide values.",
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":75.77,
"usage_perc_a":5.66,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
"keywords":"",
"ie_id":"csscalc",
"chrome_id":"5765241438732288",
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],61:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
"title":"CSS3 Animation",
"description":"Complex method of animating certain properties of an element",
"spec":"http://www.w3.org/TR/css3-animations/",
"status":"wd",
"links":[
{
"url":"http://robertnyman.com/2010/05/06/css3-animations/",
"title":"Blog post on usage"
},
{
"url":"http://www.css3files.com/animation/",
"title":"Information page"
},
{
"url":"http://docs.webplatform.org/wiki/css/properties/animations",
"title":"WebPlatform Docs"
}
],
"bugs":[
{
"description":"'animation-fill-mode' property is not supported in Android browser below 2.3."
},
{
"description":"iOS 6.1 and below do not support animation on pseudo-elements."
},
{
"description":"@keyframes not supported in an inline or scoped stylesheet in Firefox (bug 830056)"
}
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"y",
2015-01-30 14:24:39 +01:00
"11":"y",
"TP":"y"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
"4":"n",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
2015-01-30 14:24:39 +01:00
"36":"y",
"37":"y",
"38":"y"
2014-11-03 14:32:38 +01:00
},
"chrome":{
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y x",
"37":"y x",
"38":"y x",
2014-11-20 07:04:47 +01:00
"39":"y x",
"40":"y x",
"41":"y x",
2015-01-30 14:24:39 +01:00
"42":"y x",
"43":"y x"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"y x",
"5":"y x",
"5.1":"y x",
"6":"y x",
"6.1":"y x",
"7":"y x",
"7.1":"y x",
"8":"y x"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"y x",
"12.1":"y",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
2015-01-30 14:24:39 +01:00
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
"3.2":"y x",
"4.0-4.1":"y x",
"4.2-4.3":"y x",
"5.0-5.1":"y x",
"6.0-6.1":"y x",
"7.0-7.1":"y x",
"8":"y x",
"8.1":"y x"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"a x",
"2.2":"a x",
"2.3":"a x",
"3":"a x",
"4":"y x",
"4.1":"y x",
"4.2-4.3":"y x",
"4.4":"y x",
"4.4.3-4.4.4":"y x",
"37":"y x"
},
"bb":{
"7":"y x",
"10":"y x"
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"y",
"24":"y x"
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y x"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2014-11-20 07:04:47 +01:00
"10":"y",
"11":"y"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
"9.9":"y x"
}
},
"notes":"Partial support in Android browser refers to buggy behavior in different scenarios.",
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":87.15,
"usage_perc_a":0.15,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
"keywords":"animations,css-animations,keyframe,keyframes",
"ie_id":"",
"chrome_id":"",
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],62:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
module.exports={
"title":"CSS box-decoration-break",
"description":"Controls whether the box's margins, borders, padding, and other decorations wrap the broken edges of the box fragments (when the box is split by a break (page/column/region/line).",
"spec":"http://www.w3.org/TR/css3-break/#break-decoration",
"status":"wd",
"links":[
{
"url":"https://developer.mozilla.org/en-US/docs/Web/CSS/box-decoration-break",
"title":"MDN article"
},
{
"url":"http://jsbin.com/xojoro/edit?css,output",
"title":"Demo of effect on box border"
}
],
"bugs":[
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
2015-01-30 14:24:39 +01:00
"11":"n",
"TP":"n"
2014-11-20 07:04:47 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n",
"30":"n",
"31":"n",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
2015-01-30 14:24:39 +01:00
"36":"y",
"37":"y",
"38":"y"
2014-11-20 07:04:47 +01:00
},
"chrome":{
2015-01-30 14:24:39 +01:00
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"y x",
"23":"y x",
2014-11-20 07:04:47 +01:00
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y x",
"37":"y x",
"38":"y x",
"39":"y x",
"40":"y x",
"41":"y x",
2015-01-30 14:24:39 +01:00
"42":"y x",
"43":"y x"
2014-11-20 07:04:47 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
"5.1":"n",
"6":"n",
"6.1":"y x",
2014-11-20 07:04:47 +01:00
"7":"y x",
"7.1":"y x",
"8":"y x"
},
"opera":{
"9":"u",
"9.5-9.6":"u",
"10.0-10.1":"u",
"10.5":"u",
"10.6":"u",
2015-01-30 14:24:39 +01:00
"11":"y",
"11.1":"y",
"11.5":"y",
"11.6":"y",
"12":"y",
"12.1":"y",
2014-11-20 07:04:47 +01:00
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
2015-01-30 14:24:39 +01:00
"27":"y x",
"28":"y x",
"29":"y x"
2014-11-20 07:04:47 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"n",
2014-11-20 07:04:47 +01:00
"7.0-7.1":"y x",
"8":"y x",
"8.1":"y x"
},
"op_mini":{
"5.0-8.0":"y"
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
2014-11-20 07:04:47 +01:00
"4.4":"y x",
"4.4.3-4.4.4":"y x",
"37":"y x"
},
"bb":{
"7":"u",
2015-01-30 14:24:39 +01:00
"10":"y x"
2014-11-20 07:04:47 +01:00
},
"op_mob":{
"10":"u",
2015-01-30 14:24:39 +01:00
"11":"y",
"11.1":"y",
"11.5":"y",
"12":"y",
"12.1":"y",
2014-11-20 07:04:47 +01:00
"24":"y x"
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y x"
2014-11-20 07:04:47 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-20 07:04:47 +01:00
},
"ie_mob":{
"10":"n",
"11":"n"
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"n"
2014-11-20 07:04:47 +01:00
}
},
"notes":"",
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":69.86,
2014-11-20 07:04:47 +01:00
"usage_perc_a":0,
"ucprefix":false,
"parent":"",
"keywords":"box-decoration,box decoration,break",
"ie_id":"",
"chrome_id":"",
2015-01-30 14:24:39 +01:00
"shown":true
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
},{}],63:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
"title":"CSS3 Box-shadow",
"description":"Method of displaying an inner or outer shadow effect to elements",
"spec":"http://www.w3.org/TR/css3-background/#box-shadow",
"status":"cr",
"links":[
{
"url":"https://developer.mozilla.org/En/CSS/-moz-box-shadow",
"title":"MDN article"
},
{
"url":"http://westciv.com/tools/boxshadows/index.html",
"title":"Live editor"
},
{
"url":"http://tests.themasta.com/blogstuff/boxshadowdemo.html",
"title":"Demo of various effects"
},
{
"url":"http://www.css3files.com/shadow/",
"title":"Information page"
},
{
"url":"http://docs.webplatform.org/wiki/css/properties/box-shadow",
"title":"WebPlatform Docs"
}
],
"bugs":[
{
2015-01-30 14:24:39 +01:00
"description":"Safari 6, iOS 6 and Android 2.3 default browser don't work with a 0px value for \"blur-radius\".\r\ne.g. `-webkit-box-shadow: 5px 1px 0px 1px #f04e29;`\r\ndoesn't work, but\r\n`-webkit-box-shadow: 5px 1px 1px 1px #f04e29`\r\ndoes."
2014-11-03 14:32:38 +01:00
}
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"y",
"10":"y",
2015-01-30 14:24:39 +01:00
"11":"y",
"TP":"y"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"y x",
"3.6":"y x",
"4":"y",
"5":"y",
"6":"y",
"7":"y",
"8":"y",
"9":"y",
"10":"y",
"11":"y",
"12":"y",
"13":"y",
"14":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
2015-01-30 14:24:39 +01:00
"36":"y",
"37":"y",
"38":"y"
2014-11-03 14:32:38 +01:00
},
"chrome":{
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y",
"11":"y",
"12":"y",
"13":"y",
"14":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
2014-11-20 07:04:47 +01:00
"41":"y",
2015-01-30 14:24:39 +01:00
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"a x",
"3.2":"a x",
"4":"a x",
"5":"y x",
"5.1":"y",
"6":"y",
"6.1":"y",
"7":"y",
"7.1":"y",
"8":"y"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"y",
"10.6":"y",
"11":"y",
"11.1":"y",
"11.5":"y",
"11.6":"y",
"12":"y",
"12.1":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
2015-01-30 14:24:39 +01:00
"27":"y",
"28":"y",
"29":"y"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
"3.2":"a x",
"4.0-4.1":"y x",
"4.2-4.3":"y x",
"5.0-5.1":"y",
"6.0-6.1":"y",
"7.0-7.1":"y",
"8":"y",
"8.1":"y"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"a x",
"2.2":"a x",
"2.3":"a x",
"3":"a x",
"4":"y",
"4.1":"y",
"4.2-4.3":"y",
"4.4":"y",
"4.4.3-4.4.4":"y",
"37":"y"
},
"bb":{
"7":"y x",
"10":"y"
},
"op_mob":{
"10":"n",
"11":"y",
"11.1":"y",
"11.5":"y",
"12":"y",
"12.1":"y",
"24":"y"
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2014-11-20 07:04:47 +01:00
"10":"y",
"11":"y"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
"9.9":"y"
}
},
"notes":"Can be partially emulated in older IE versions using the non-standard \"shadow\" filter. Partial support in Safari, iOS Safari and Android Browser refers to missing \"inset\" and blur radius value support.",
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":89.42,
"usage_perc_a":0.22,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
"keywords":"box-shadows,boxshadows,box shadow,shaow",
"ie_id":"",
"chrome_id":"",
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],64:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"Crisp Edges Image Rendering Algorithm",
"description":"Forces images to be scaled with an algorithm that preserves contrast and edges in the image, and which does not smooth colors or introduce blur to the image in the process. This is intended for images such as pixel art.",
"spec":"http://dev.w3.org/csswg/css-images-3/#valdef-image-rendering-crisp-edges",
"status":"unoff",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering",
"title":"MDN article"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
],
"categories":[
"CSS",
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
2015-01-30 14:24:39 +01:00
"11":"n",
"TP":"n"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
2015-01-30 14:24:39 +01:00
"3.6":"y x",
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
2014-11-03 14:32:38 +01:00
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y x",
"37":"y x",
2015-01-30 14:24:39 +01:00
"38":"y x"
2014-11-03 14:32:38 +01:00
},
2015-01-30 14:24:39 +01:00
"chrome":{
2014-11-03 14:32:38 +01:00
"4":"n",
"5":"n",
2015-01-30 14:24:39 +01:00
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"a x #1",
"11":"a x #1",
"12":"a x #1",
"13":"a x #1",
"14":"a x #1",
"15":"a x #1",
"16":"a x #1",
"17":"a x #1",
"18":"a x #1",
"19":"a x #1",
"20":"a x #1",
"21":"a x #1",
"22":"a x #1",
"23":"a x #1",
"24":"a x #1",
"25":"a x #1",
"26":"a x #1",
"27":"a x #1",
"28":"a x #1",
"29":"a x #1",
"30":"a x #1",
"31":"a x #1",
"32":"a x #1",
"33":"a x #1",
"34":"a x #1",
"35":"a x #1",
"36":"a x #1",
"37":"a x #1",
"38":"a x #1",
"39":"a x #1",
"40":"a x #1",
"41":"a x #1",
"42":"a x #1",
"43":"a x #1"
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
"5.1":"a x #1",
"6":"a x #1",
"6.1":"a x #1",
"7":"a x #1",
"7.1":"a x #1",
"8":"a x #1"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
2015-01-30 14:24:39 +01:00
"11.6":"y x",
"12":"y x",
"12.1":"y x",
"15":"a x #1",
"16":"a x #1",
"17":"a x #1",
"18":"a x #1",
"19":"a x #1",
"20":"a x #1",
"21":"a x #1",
"22":"a x #1",
"23":"a x #1",
"24":"a x #1",
"25":"a x #1",
"26":"a x #1",
"27":"a x #1",
"28":"a x #1",
"29":"a x #1"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
2015-01-30 14:24:39 +01:00
"5.0-5.1":"a x #1",
"6.0-6.1":"a x #1",
"7.0-7.1":"a x #1",
"8":"a x #1",
"8.1":"a x #1"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
2015-01-30 14:24:39 +01:00
"4.1":"u",
"4.2-4.3":"u",
"4.4":"u",
"4.4.3-4.4.4":"u",
"37":"a x #1"
2014-11-03 14:32:38 +01:00
},
"bb":{
"7":"n",
2015-01-30 14:24:39 +01:00
"10":"n"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
2015-01-30 14:24:39 +01:00
"12":"y x",
"12.1":"y x",
"24":"a x #1"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"a x #1"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y x"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2014-11-20 07:04:47 +01:00
"10":"n",
"11":"n"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"u"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
2015-01-30 14:24:39 +01:00
"1":"Chrome, Safari and Opera use non-standard value `-webkit-optimize-contrasts` instead of `crisp-edges`"
2014-11-03 14:32:38 +01:00
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":12.21,
"usage_perc_a":53.95,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"image-rendering,crisp-edges",
"ie_id":"",
2014-11-03 14:32:38 +01:00
"chrome_id":"",
2015-01-30 14:24:39 +01:00
"shown":false
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
},{}],65:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS Device Adaptation",
"description":"A standard way to override the size of viewport in web page, standardizing and replacing Apple's own popular <meta> viewport implementation.",
"spec":"http://www.w3.org/TR/css-device-adapt/",
"status":"wd",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"https://dev.opera.com/articles/view/an-introduction-to-meta-viewport-and-viewport/",
"title":"Introduction to meta viewport and @viewport in Opera Mobile"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://msdn.microsoft.com/en-us/library/ie/hh708740(v=vs.85).aspx",
"title":"Device adaptation in Internet Explorer 10"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
],
"categories":[
2015-01-30 14:24:39 +01:00
"CSS"
2014-11-03 14:32:38 +01:00
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
2015-01-30 14:24:39 +01:00
"10":"a x #1",
"11":"a x #1",
"TP":"a x #1"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
2015-01-30 14:24:39 +01:00
"3.6":"n",
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n",
"30":"n",
"31":"n",
"32":"n",
"33":"n",
"34":"n",
"35":"n",
"36":"n",
"37":"n",
"38":"n"
2014-11-03 14:32:38 +01:00
},
"chrome":{
2015-01-30 14:24:39 +01:00
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n",
"30":"n",
"31":"n",
"32":"n",
"33":"n",
"34":"n",
"35":"n",
"36":"n",
"37":"n",
"38":"n",
"39":"n",
"40":"n",
"41":"n",
"42":"n",
"43":"n"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"n",
"3.2":"n",
2015-01-30 14:24:39 +01:00
"4":"n",
"5":"n",
"5.1":"n",
"6":"n",
"6.1":"u",
"7":"u",
"7.1":"u",
"8":"u"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
2015-01-30 14:24:39 +01:00
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"n",
"7.0-7.1":"n",
"8":"n",
"8.1":"n"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
2015-01-30 14:24:39 +01:00
"5.0-8.0":"a x #2"
2014-11-03 14:32:38 +01:00
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
"4.4":"n",
"4.4.3-4.4.4":"n",
"37":"n"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"n",
"10":"n"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
2015-01-30 14:24:39 +01:00
"11":"a x #2",
"11.1":"a x #2",
"11.5":"a x #2",
"12":"a x #2",
"12.1":"a x #2",
"24":"n"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"n"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"n"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"a x #1",
"11":"a x #1"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"n"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
2015-01-30 14:24:39 +01:00
"1":"IE only supports the 'width' and 'height' properties.",
"2":"Opera Mobile and Opera Mini only support the 'orientation' property."
2014-11-03 14:32:38 +01:00
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":0,
"usage_perc_a":13.81,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"viewport",
"ie_id":"",
"chrome_id":"",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],66:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS Filter Effects",
"description":"Method of applying filter effects (like blur, grayscale, brightness, contrast and hue) to elements, previously only possible by using SVG.",
"spec":"http://www.w3.org/TR/filter-effects/",
2014-11-03 14:32:38 +01:00
"status":"wd",
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"http://html5-demos.appspot.com/static/css/filters/index.html",
"title":"Demo file for WebKit browsers"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://www.html5rocks.com/en/tutorials/filters/understanding-css/",
"title":"HTML5Rocks article"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://dl.dropbox.com/u/3260327/angular/CSS3ImageManipulation.html",
"title":"Filter editor"
},
{
"url":"http://bennettfeely.com/filters/",
"title":"Filter Playground"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
],
"categories":[
2015-01-30 14:24:39 +01:00
"CSS",
2014-11-03 14:32:38 +01:00
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n",
"TP":"n"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
2015-01-30 14:24:39 +01:00
"3.6":"a",
"4":"a",
"5":"a",
"6":"a",
"7":"a",
"8":"a",
"9":"a",
"10":"a",
"11":"a",
"12":"a",
"13":"a",
"14":"a",
"15":"a",
"16":"a",
"17":"a",
"18":"a",
"19":"a",
"20":"a",
"21":"a",
"22":"a",
"23":"a",
"24":"a",
"25":"a",
"26":"a",
"27":"a",
"28":"a",
"29":"a",
"30":"a",
"31":"a",
"32":"a",
"33":"a",
"34":"a d #1",
"35":"y",
"36":"y",
"37":"y",
"38":"y"
},
"chrome":{
2014-11-03 14:32:38 +01:00
"4":"n",
"5":"n",
2015-01-30 14:24:39 +01:00
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
2014-11-03 14:32:38 +01:00
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
2015-01-30 14:24:39 +01:00
"36":"y x",
"37":"y x",
"38":"y x",
"39":"y x",
"40":"y x",
"41":"y x",
"42":"y x",
"43":"y x"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
2015-01-30 14:24:39 +01:00
"5.1":"n",
2014-11-03 14:32:38 +01:00
"6":"y x",
"6.1":"y x",
"7":"y x",
"7.1":"y x",
"8":"y x"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
2015-01-30 14:24:39 +01:00
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
"3.2":"n",
"4.0-4.1":"n",
2015-01-30 14:24:39 +01:00
"4.2-4.3":"n",
"5.0-5.1":"n",
2014-11-03 14:32:38 +01:00
"6.0-6.1":"y x",
"7.0-7.1":"y x",
"8":"y x",
"8.1":"y x"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
2015-01-30 14:24:39 +01:00
"4.4":"y x",
"4.4.3-4.4.4":"y x",
"37":"y x"
2014-11-03 14:32:38 +01:00
},
"bb":{
"7":"n",
2015-01-30 14:24:39 +01:00
"10":"y x"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
2015-01-30 14:24:39 +01:00
"24":"y x"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y x"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"a"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2014-11-20 07:04:47 +01:00
"10":"n",
"11":"n"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"y x"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"Note that this property is significantly different from and incompatible with Microsoft's [older \"filter\" property](http://msdn.microsoft.com/en-us/library/ie/ms530752%28v=vs.85%29.aspx).\r\n\r\nPartial support in Firefox before version 34 [only implemented the url() function of the filter property](https://developer.mozilla.org/en-US/docs/Web/CSS/filter#Browser_compatibility)",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
2015-01-30 14:24:39 +01:00
"1":"Supported in Firefox under the `layout.css.filters.enabled` flag."
2014-11-03 14:32:38 +01:00
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":60.79,
"usage_perc_a":11.71,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"sepia,hue-rotate,invert,saturate",
"ie_id":"filters",
2014-11-03 14:32:38 +01:00
"chrome_id":"",
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],67:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS Gradients",
"description":"Method of defining a linear or radial color gradient as a CSS image.",
"spec":"http://www.w3.org/TR/css3-images/",
2014-11-03 14:32:38 +01:00
"status":"cr",
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"http://www.colorzilla.com/gradient-editor/",
"title":"Cross-browser editor"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://www.css3files.com/gradient/",
"title":"Information page"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://css3pie.com/",
"title":"Tool to emulate support in IE"
},
{
"url":"http://docs.webplatform.org/wiki/css/functions/linear-gradient",
"title":"WebPlatform Docs"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
],
"categories":[
2015-01-30 14:24:39 +01:00
"CSS3"
2014-11-03 14:32:38 +01:00
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
2015-01-30 14:24:39 +01:00
"10":"y",
"11":"y",
"TP":"y"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
2015-01-30 14:24:39 +01:00
"3.5":"n",
"3.6":"y x",
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y"
2014-11-03 14:32:38 +01:00
},
"chrome":{
"4":"a x",
"5":"a x",
"6":"a x",
"7":"a x",
"8":"a x",
"9":"a x",
2015-01-30 14:24:39 +01:00
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
"41":"y",
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"a x",
"5":"a x",
2015-01-30 14:24:39 +01:00
"5.1":"y x",
"6":"y x",
"6.1":"y",
"7":"y",
"7.1":"y",
"8":"y"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
2015-01-30 14:24:39 +01:00
"11.1":"a x",
"11.5":"a x",
"11.6":"y x",
"12":"y x",
"12.1":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y"
},
"ios_saf":{
"3.2":"a x",
"4.0-4.1":"a x",
"4.2-4.3":"a x",
"5.0-5.1":"y x",
"6.0-6.1":"y x",
"7.0-7.1":"y",
"8":"y",
"8.1":"y"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"a x",
"2.2":"a x",
2014-11-03 14:32:38 +01:00
"2.3":"a x",
"3":"a x",
2015-01-30 14:24:39 +01:00
"4":"y x",
"4.1":"y x",
"4.2-4.3":"y x",
"4.4":"y",
"4.4.3-4.4.4":"y",
"37":"y"
2014-11-03 14:32:38 +01:00
},
"bb":{
"7":"a x",
2015-01-30 14:24:39 +01:00
"10":"y x"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
"11":"n",
2015-01-30 14:24:39 +01:00
"11.1":"a x",
"11.5":"a x",
"12":"y x",
"12.1":"y",
"24":"y"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"y",
"11":"y"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"y x"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"Syntax used by browsers with prefixed support may be incompatible with that for proper support. \r\n\r\nPartial support in Opera 11.10 and 11.50 also refers to only having support for linear gradients.\r\n\r\nSupport can be somewhat emulated in older IE versions using the non-standard \"gradient\" filter. \r\n\r\nFirefox 10+, Opera 11.6+, Chrome 26+ and IE10+ also support the new \"to (side)\" syntax.",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":86.91,
"usage_perc_a":0.54,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"linear,linear-gradient,gradiant",
"ie_id":"gradients",
"chrome_id":"5785905063264256",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],68:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS Hyphenation",
"description":"Method of controlling when words at the end of lines should be hyphenated using the \"hyphens\" property.",
"spec":"http://www.w3.org/TR/css3-text/#hyphenation",
"status":"wd",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"https://developer.mozilla.org/en/CSS/hyphens",
"title":"MDN article"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://blog.fontdeck.com/post/9037028497/hyphens",
"title":"Blog post"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://docs.webplatform.org/wiki/css/properties/hyphens",
"title":"WebPlatform Docs"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
],
"categories":[
2015-01-30 14:24:39 +01:00
"CSS3"
2014-11-03 14:32:38 +01:00
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
2015-01-30 14:24:39 +01:00
"10":"y x",
"11":"y x",
"TP":"y x"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
2015-01-30 14:24:39 +01:00
"4":"n",
"5":"n",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y x",
"37":"y x",
"38":"y x"
2014-11-03 14:32:38 +01:00
},
"chrome":{
2015-01-30 14:24:39 +01:00
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n",
"30":"n",
"31":"n",
"32":"n",
"33":"n",
"34":"n",
"35":"n",
"36":"n",
"37":"n",
"38":"n",
"39":"n",
"40":"n",
"41":"n",
"42":"n",
"43":"n"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"n",
2015-01-30 14:24:39 +01:00
"5":"n",
"5.1":"y x",
"6":"y x",
"6.1":"y x",
"7":"y x",
"7.1":"y x",
"8":"y x"
},
"opera":{
"9":"n",
2014-11-03 14:32:38 +01:00
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
2015-01-30 14:24:39 +01:00
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
"3.2":"n",
"4.0-4.1":"n",
2015-01-30 14:24:39 +01:00
"4.2-4.3":"y x",
"5.0-5.1":"y x",
"6.0-6.1":"y x",
"7.0-7.1":"y x",
"8":"y x",
"8.1":"y x"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
"4.4":"n",
"4.4.3-4.4.4":"n",
"37":"n"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"n",
"10":"n"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
2015-01-30 14:24:39 +01:00
"24":"n"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"n"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y x"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
"9.9":"a x"
}
},
2015-01-30 14:24:39 +01:00
"notes":"Chrome 29- and Android 4.0 Browser support \"-webkit-hyphens: none\", but not the \"auto\" property. Chrome 30+ doesn't support it either.",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":32.28,
"usage_perc_a":3.78,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"hyphen,shy",
2014-11-03 14:32:38 +01:00
"ie_id":"",
"chrome_id":"",
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],69:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS Logical Properties",
"description":"Use start/end properties that depend on LTR or RTL writing direction instead of left/right",
"spec":"http://dev.w3.org/csswg/css-logical-props/",
"status":"wd",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-margin-start",
"title":"MDN -moz-margin-start"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-padding-start",
"title":"MDN -moz-padding-start"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
2015-01-30 14:24:39 +01:00
2014-11-03 14:32:38 +01:00
],
"categories":[
2015-01-30 14:24:39 +01:00
"CSS",
"CSS3"
2014-11-03 14:32:38 +01:00
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
2015-01-30 14:24:39 +01:00
"9":"n",
"10":"n",
"11":"n",
"TP":"n"
2014-11-03 14:32:38 +01:00
},
"firefox":{
2015-01-30 14:24:39 +01:00
"2":"n",
"3":"a x #1",
"3.5":"a x #1",
"3.6":"a x #1",
"4":"a x #1",
"5":"a x #1",
"6":"a x #1",
"7":"a x #1",
"8":"a x #1",
"9":"a x #1",
"10":"a x #1",
"11":"a x #1",
"12":"a x #1",
"13":"a x #1",
"14":"a x #1",
"15":"a x #1",
"16":"a x #1",
"17":"a x #1",
"18":"a x #1",
"19":"a x #1",
"20":"a x #1",
"21":"a x #1",
"22":"a x #1",
"23":"a x #1",
"24":"a x #1",
"25":"a x #1",
"26":"a x #1",
"27":"a x #1",
"28":"a x #1",
"29":"a x #1",
"30":"a x #1",
"31":"a x #1",
"32":"a x #1",
"33":"a x #1",
"34":"a x #1",
"35":"a x #1",
"36":"a x #1",
"37":"a x #1",
"38":"a x #1"
2014-11-03 14:32:38 +01:00
},
"chrome":{
2015-01-30 14:24:39 +01:00
"4":"a x #1",
"5":"a x #1",
"6":"a x #1",
"7":"a x #1",
"8":"a x #1",
"9":"a x #1",
"10":"a x #1",
"11":"a x #1",
"12":"a x #1",
"13":"a x #1",
"14":"a x #1",
"15":"a x #1",
"16":"a x #1",
"17":"a x #1",
"18":"a x #1",
"19":"a x #1",
"20":"a x #1",
"21":"a x #1",
"22":"a x #1",
"23":"a x #1",
"24":"a x #1",
"25":"a x #1",
"26":"a x #1",
"27":"a x #1",
"28":"a x #1",
"29":"a x #1",
"30":"a x #1",
"31":"a x #1",
"32":"a x #1",
"33":"a x #1",
"34":"a x #1",
"35":"a x #1",
"36":"a x #1",
"37":"a x #1",
"38":"a x #1",
"39":"a x #1",
"40":"a x #1",
"41":"a x #1",
"42":"a x #1",
"43":"a x #1"
2014-11-03 14:32:38 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"a x #1",
"3.2":"a x #1",
"4":"a x #1",
"5":"a x #1",
"5.1":"a x #1",
"6":"a x #1",
"6.1":"a x #1",
"7":"a x #1",
"7.1":"a x #1",
"8":"a x #1"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
2015-01-30 14:24:39 +01:00
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
"15":"a x #1",
"16":"a x #1",
"17":"a x #1",
"18":"a x #1",
"19":"a x #1",
"20":"a x #1",
"21":"a x #1",
"22":"a x #1",
"23":"a x #1",
"24":"a x #1",
"25":"a x #1",
"26":"a x #1",
"27":"a x #1",
"28":"a x #1",
"29":"a x #1"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"a x #1",
"4.0-4.1":"a x #1",
"4.2-4.3":"a x #1",
"5.0-5.1":"a x #1",
"6.0-6.1":"a x #1",
"7.0-7.1":"a x #1",
"8":"a x #1",
"8.1":"a x #1"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"u",
"2.2":"u",
"2.3":"u",
"3":"u",
"4":"u",
"4.1":"u",
"4.2-4.3":"u",
"4.4":"u",
"4.4.3-4.4.4":"u",
"37":"a x #1"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"u",
"10":"u"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
"24":"a x #1"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"a x #1"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"a x #1"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"u"
2014-11-03 14:32:38 +01:00
}
},
"notes":"",
"notes_by_num":{
2015-01-30 14:24:39 +01:00
"1":"Supports only margin-start, margin-end, padding-start and padding-end"
2014-11-03 14:32:38 +01:00
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":0,
"usage_perc_a":66.24,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"margin,padding,start,end,left,,right",
2014-11-03 14:32:38 +01:00
"ie_id":"",
"chrome_id":"",
2015-01-30 14:24:39 +01:00
"shown":false
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
},{}],70:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS Masks",
"description":"Method of displaying part of an element, using a selected image as a mask",
"spec":"http://www.w3.org/TR/css-masking/",
"status":"cr",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"http://docs.webplatform.org/wiki/css/properties/mask",
2014-11-03 14:32:38 +01:00
"title":"WebPlatform Docs"
},
{
2015-01-30 14:24:39 +01:00
"url":"http://www.html5rocks.com/en/tutorials/masking/adobe/",
"title":"HTML5 Rocks article"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://thenittygritty.co/css-masking",
"title":"Detailed blog post"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
2015-01-30 14:24:39 +01:00
2014-11-03 14:32:38 +01:00
],
"categories":[
"CSS"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
2015-01-30 14:24:39 +01:00
"11":"n",
"TP":"n"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
2015-01-30 14:24:39 +01:00
"3.5":"a",
"3.6":"a",
"4":"a",
"5":"a",
"6":"a",
"7":"a",
"8":"a",
"9":"a",
"10":"a",
"11":"a",
"12":"a",
"13":"a",
"14":"a",
"15":"a",
"16":"a",
"17":"a",
"18":"a",
"19":"a",
"20":"a",
"21":"a",
"22":"a",
"23":"a",
"24":"a",
"25":"a",
"26":"a",
"27":"a",
"28":"a",
"29":"a",
"30":"a",
"31":"a",
"32":"a",
"33":"a",
"34":"a",
"35":"a",
"36":"a",
"37":"a",
"38":"a"
2014-11-03 14:32:38 +01:00
},
"chrome":{
2015-01-30 14:24:39 +01:00
"4":"a x",
"5":"a x",
"6":"a x",
"7":"a x",
"8":"a x",
"9":"a x",
"10":"a x",
"11":"a x",
"12":"a x",
"13":"a x",
"14":"a x",
"15":"a x",
"16":"a x",
"17":"a x",
"18":"a x",
"19":"a x",
"20":"a x",
"21":"a x",
"22":"a x",
"23":"a x",
"24":"a x",
"25":"a x",
"26":"a x",
"27":"a x",
"28":"a x",
"29":"a x",
"30":"a x",
"31":"a x",
"32":"a x",
"33":"a x",
"34":"a x",
"35":"a x",
"36":"a x",
"37":"a x",
"38":"a x",
"39":"a x",
"40":"a x",
"41":"a x",
"42":"a x",
"43":"a x"
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"a x",
"5":"a x",
"5.1":"a x",
"6":"a x",
"6.1":"a x",
"7":"a x",
"7.1":"a x",
"8":"a x"
},
"opera":{
2014-11-03 14:32:38 +01:00
"9":"n",
2015-01-30 14:24:39 +01:00
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
2014-11-03 14:32:38 +01:00
"11":"n",
2015-01-30 14:24:39 +01:00
"11.1":"n",
"11.5":"n",
"11.6":"n",
2014-11-03 14:32:38 +01:00
"12":"n",
"12.1":"n",
2015-01-30 14:24:39 +01:00
"15":"a x",
"16":"a x",
"17":"a x",
"18":"a x",
"19":"a x",
"20":"a x",
"21":"a x",
"22":"a x",
"23":"a x",
"24":"a x",
"25":"a x",
"26":"a x",
"27":"a x",
"28":"a x",
"29":"a x"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"a x",
"4.0-4.1":"a x",
"4.2-4.3":"a x",
"5.0-5.1":"a x",
"6.0-6.1":"a x",
"7.0-7.1":"a x",
"8":"a x",
"8.1":"a x"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"a x",
"2.2":"a x",
"2.3":"a x",
"3":"a x",
"4":"a x",
"4.1":"a x",
"4.2-4.3":"a x",
"4.4":"a x",
"4.4.3-4.4.4":"a x",
"37":"a x"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"a x",
"10":"a x"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
2015-01-30 14:24:39 +01:00
"24":"a x"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"a x"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"a"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2014-11-20 07:04:47 +01:00
"10":"n",
"11":"n"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"a x"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"Partial support in WebKit/Blink browsers refers to supporting the mask-image and mask-box-image properties, but lacks support for other parts of the spec. Partial support in Firefox refers to only support for inline SVG mask elements i.e. mask: url(#foo).",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
2015-01-30 14:24:39 +01:00
2014-11-03 14:32:38 +01:00
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":0,
"usage_perc_a":76.49,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
"keywords":"",
2015-01-30 14:24:39 +01:00
"ie_id":"masks",
"chrome_id":"5381559662149632",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],71:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"Media Queries: resolution feature",
"description":"Allows a media query to be set based on the device pixels used per CSS unit. While the standard uses `min`/`max-resolution` for this, some browsers support the older non-standard `device-pixel-ratio` media query.",
"spec":"http://www.w3.org/TR/css3-mediaqueries/#resolution",
"status":"rec",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"http://www.w3.org/blog/CSS/2012/06/14/unprefix-webkit-device-pixel-ratio/",
"title":"How to unprefix -webkit-device-pixel-ratio"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
2015-01-30 14:24:39 +01:00
2014-11-03 14:32:38 +01:00
],
"categories":[
2015-01-30 14:24:39 +01:00
"CSS",
2014-11-03 14:32:38 +01:00
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
2015-01-30 14:24:39 +01:00
"9":"a #1",
"10":"a #1",
"11":"a #1",
"TP":"a #2"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
2015-01-30 14:24:39 +01:00
"3.5":"a #3",
"3.6":"a #3",
"4":"a #3",
"5":"a #3",
"6":"a #3",
"7":"a #3",
"8":"a #3",
"9":"a #3",
"10":"a #3",
"11":"a #3",
"12":"a #3",
"13":"a #3",
"14":"a #3",
"15":"a #3",
2014-11-03 14:32:38 +01:00
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
2015-01-30 14:24:39 +01:00
"36":"y",
"37":"y",
"38":"y"
2014-11-03 14:32:38 +01:00
},
"chrome":{
2015-01-30 14:24:39 +01:00
"4":"a x #4",
"5":"a x #4",
"6":"a x #4",
"7":"a x #4",
"8":"a x #4",
"9":"a x #4",
"10":"a x #4",
"11":"a x #4",
"12":"a x #4",
"13":"a x #4",
"14":"a x #4",
"15":"a x #4",
"16":"a x #4",
"17":"a x #4",
"18":"a x #4",
"19":"a x #4",
"20":"a x #4",
"21":"a x #4",
"22":"a x #4",
"23":"a x #4",
"24":"a x #4",
"25":"a x #4",
"26":"a x #4",
"27":"a x #4",
"28":"a x #4",
2014-11-03 14:32:38 +01:00
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
2014-11-20 07:04:47 +01:00
"41":"y",
2015-01-30 14:24:39 +01:00
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"n",
"3.2":"n",
"4":"a x #4",
"5":"a x #4",
"5.1":"a x #4",
"6":"a x #4",
"6.1":"a x #4",
"7":"a x #4",
"7.1":"a x #4",
"8":"a x #4"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
2015-01-30 14:24:39 +01:00
"9.5-9.6":"a x #4",
"10.0-10.1":"a x #4",
"10.5":"a x #4",
"10.6":"a x #4",
"11":"a x #4",
"11.1":"a x #4",
"11.5":"a x #4",
"11.6":"a x #4",
"12":"a x #4",
2014-11-03 14:32:38 +01:00
"12.1":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
2015-01-30 14:24:39 +01:00
"27":"y",
"28":"y",
"29":"y"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"u",
"4.0-4.1":"a x #4",
"4.2-4.3":"a x #4",
"5.0-5.1":"a x #4",
"6.0-6.1":"a x #4",
"7.0-7.1":"a x #4",
"8":"a x #4",
"8.1":"a x #4"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
2015-01-30 14:24:39 +01:00
"5.0-8.0":"a #1"
2014-11-03 14:32:38 +01:00
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"u",
"2.2":"u",
"2.3":"u",
"3":"u",
"4":"a x #4",
"4.1":"a x #4",
"4.2-4.3":"a x #4",
2014-11-03 14:32:38 +01:00
"4.4":"y",
"4.4.3-4.4.4":"y",
"37":"y"
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"a x #4",
"10":"a x #4"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
2015-01-30 14:24:39 +01:00
"10":"u",
"11":"u",
"11.1":"u",
"11.5":"u",
"12":"u",
2014-11-03 14:32:38 +01:00
"12.1":"y",
"24":"y"
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"a #1",
"11":"a #1"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"a x #4"
2014-11-03 14:32:38 +01:00
}
},
"notes":"",
"notes_by_num":{
2015-01-30 14:24:39 +01:00
"1":"Supports the `dpi` unit, but does not support `dppx` or `dpcm` units.",
"2":"Supports the `dpi` and `dppx` units, but does not support `dpcm` units.",
"3":"Firefox before 16 supports only `dpi` unit, but you can set `2dppx` per `min--moz-device-pixel-ratio: 2`",
"4":"Supporte the non-standard `min`/`max-device-pixel-ratio`"
2014-11-03 14:32:38 +01:00
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":57.96,
"usage_perc_a":34.61,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
2015-01-30 14:24:39 +01:00
"parent":"css-mediaqueries",
"keywords":"@media,device-pixel-ratio,resolution",
"ie_id":"mediaqueriesresolutionfeature,dppxunitfortheresolutionmediaquery",
"chrome_id":"5944509615570944",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],72:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":":placeholder-shown CSS pseudo-class",
"description":"The :placeholder-shown pseudo-class represents the placeholder contents of a form field with placeholder text.",
"spec":"http://dev.w3.org/csswg/selectors/#placeholder",
"status":"unoff",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"http://msdn.microsoft.com/en-us/library/ie/hh772745(v=vs.85).aspx",
"title":"MSDN article"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://css-tricks.com/snippets/css/style-placeholder-text/",
"title":"CSS-Tricks article with all prefixes"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://wiki.csswg.org/ideas/placeholder-styling",
"title":"CSSWG discussion"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
2015-01-30 14:24:39 +01:00
2014-11-03 14:32:38 +01:00
],
"categories":[
2015-01-30 14:24:39 +01:00
"CSS"
2014-11-03 14:32:38 +01:00
],
"stats":{
"ie":{
2015-01-30 14:24:39 +01:00
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"a x",
"11":"a x",
"TP":"a x"
2014-11-03 14:32:38 +01:00
},
"firefox":{
2015-01-30 14:24:39 +01:00
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
"4":"a x",
"5":"a x",
"6":"a x",
"7":"a x",
"8":"a x",
"9":"a x",
"10":"a x",
"11":"a x",
"12":"a x",
"13":"a x",
"14":"a x",
"15":"a x",
"16":"a x",
"17":"a x",
"18":"a x",
"19":"a x",
"20":"a x",
"21":"a x",
"22":"a x",
"23":"a x",
"24":"a x",
"25":"a x",
"26":"a x",
"27":"a x",
"28":"a x",
"29":"a x",
"30":"a x",
"31":"a x",
"32":"a x",
"33":"a x",
"34":"a x",
"35":"a x",
"36":"a x",
"37":"a x",
"38":"a x"
2014-11-03 14:32:38 +01:00
},
"chrome":{
"4":"a x",
"5":"a x",
"6":"a x",
"7":"a x",
"8":"a x",
"9":"a x",
2015-01-30 14:24:39 +01:00
"10":"a x",
"11":"a x",
"12":"a x",
"13":"a x",
"14":"a x",
"15":"a x",
"16":"a x",
"17":"a x",
"18":"a x",
"19":"a x",
"20":"a x",
"21":"a x",
"22":"a x",
"23":"a x",
"24":"a x",
"25":"a x",
"26":"a x",
"27":"a x",
"28":"a x",
"29":"a x",
"30":"a x",
"31":"a x",
"32":"a x",
"33":"a x",
"34":"a x",
"35":"a x",
"36":"a x",
"37":"a x",
"38":"a x",
"39":"a x",
"40":"a x",
"41":"a x",
"42":"a x",
"43":"a x"
2014-11-03 14:32:38 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"n",
"3.2":"n",
"4":"n",
2014-11-03 14:32:38 +01:00
"5":"a x",
2015-01-30 14:24:39 +01:00
"5.1":"a x",
"6":"a x",
"6.1":"a x",
"7":"a x",
"7.1":"a x",
"8":"a x"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
2015-01-30 14:24:39 +01:00
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
"15":"a x",
"16":"a x",
"17":"a x",
"18":"a x",
"19":"a x",
"20":"a x",
"21":"a x",
"22":"a x",
"23":"a x",
"24":"a x",
"25":"a x",
"26":"a x",
"27":"a x",
"28":"a x",
"29":"a x"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"n",
"4.0-4.1":"n",
2014-11-03 14:32:38 +01:00
"4.2-4.3":"a x",
2015-01-30 14:24:39 +01:00
"5.0-5.1":"a x",
"6.0-6.1":"a x",
"7.0-7.1":"a x",
"8":"a x",
"8.1":"a x"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
2015-01-30 14:24:39 +01:00
"5.0-8.0":"n"
2014-11-03 14:32:38 +01:00
},
"android":{
"2.1":"a x",
"2.2":"a x",
"2.3":"a x",
"3":"a x",
2015-01-30 14:24:39 +01:00
"4":"a x",
"4.1":"a x",
"4.2-4.3":"a x",
"4.4":"a x",
"4.4.3-4.4.4":"a x",
"37":"a x"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"u",
"10":"a x"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
"24":"a x"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"a x"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"a x"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"a x",
"11":"a x"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"a x"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"Partial support refers to support for alternative syntax: ::-webkit-input-placeholder (Chrome/Safari/Opera),\r\n::-moz-placeholder (Firefox) and \r\n:-ms-input-placeholder (IE). ",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":0,
"usage_perc_a":86.95,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"::placeholder,placeholder",
2014-11-03 14:32:38 +01:00
"ie_id":"",
"chrome_id":"",
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],73:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"::selection CSS pseudo-element",
"description":"The ::selection CSS pseudo-element applies rules to the portion of a document that has been highlighted (e.g., selected with the mouse or another pointing device) by the user.",
"spec":"https://developer.mozilla.org/en-US/docs/Web/CSS/::selection",
"status":"unoff",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"http://quirksmode.org/css/selectors/selection.html",
"title":"::selection test"
},
{
"url":"http://docs.webplatform.org/wiki/css/selectors/pseudo-elements/::selection",
"title":"WebPlatform Docs"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
],
"categories":[
2015-01-30 14:24:39 +01:00
"CSS"
2014-11-03 14:32:38 +01:00
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
2015-01-30 14:24:39 +01:00
"9":"y",
"10":"y",
"11":"y",
"TP":"y"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"y x",
"3":"y x",
"3.5":"y x",
"3.6":"y x",
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y x",
2015-01-30 14:24:39 +01:00
"37":"y x",
"38":"y x"
},
"chrome":{
"4":"y",
"5":"y",
"6":"y",
"7":"y",
"8":"y",
"9":"y",
"10":"y",
"11":"y",
"12":"y",
"13":"y",
"14":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
2014-11-03 14:32:38 +01:00
"37":"y",
"38":"y",
"39":"y",
"40":"y",
2014-11-20 07:04:47 +01:00
"41":"y",
2015-01-30 14:24:39 +01:00
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"y",
"3.2":"y",
"4":"y",
"5":"y",
"5.1":"y",
"6":"y",
"6.1":"y",
"7":"y",
"7.1":"y",
"8":"y"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
2015-01-30 14:24:39 +01:00
"9.5-9.6":"y",
"10.0-10.1":"y",
"10.5":"y",
"10.6":"y",
"11":"y",
"11.1":"y",
"11.5":"y",
2014-11-03 14:32:38 +01:00
"11.6":"y",
"12":"y",
"12.1":"y",
2015-01-30 14:24:39 +01:00
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
2014-11-03 14:32:38 +01:00
"24":"y",
"25":"y",
"26":"y",
2015-01-30 14:24:39 +01:00
"27":"y",
"28":"y",
"29":"y"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"n",
"7.0-7.1":"n",
"8":"n",
"8.1":"n"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
2015-01-30 14:24:39 +01:00
"4.4":"y",
"4.4.3-4.4.4":"y",
"37":"y"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"n",
"10":"n"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
2015-01-30 14:24:39 +01:00
"10":"u",
"11":"u",
"11.1":"u",
"11.5":"y",
"12":"y",
"12.1":"y",
"24":"y"
},
"and_chr":{
"40":"y"
},
"and_ff":{
"33":"y x"
},
2014-11-03 14:32:38 +01:00
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"y",
"11":"y"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
"9.9":"n"
}
},
2015-01-30 14:24:39 +01:00
"notes":"",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":75.25,
2014-11-03 14:32:38 +01:00
"usage_perc_a":0,
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"::selection,selection",
2014-11-03 14:32:38 +01:00
"ie_id":"",
"chrome_id":"",
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],74:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS Shapes Level 1",
"description":"Allows geometric shapes to be set in CSS to define an area for text to flow around.",
"spec":"http://www.w3.org/TR/css-shapes/",
"status":"cr",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"http://html.adobe.com/webplatform/layout/shapes/",
"title":"Adobe demos and samples"
},
{
"url":"http://html.adobe.com/webplatform/layout/shapes/browser-support/",
"title":"CSS shapes support test by Adobe"
},
{
"url":"http://alistapart.com/article/css-shapes-101",
"title":"A List Apart article"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
2015-01-30 14:24:39 +01:00
"11":"n",
"TP":"n"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
2015-01-30 14:24:39 +01:00
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n",
"30":"n",
"31":"n",
"32":"n",
"33":"n",
"34":"n",
"35":"n",
"36":"n",
"37":"n",
"38":"n"
2014-11-03 14:32:38 +01:00
},
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
2015-01-30 14:24:39 +01:00
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n",
"30":"n",
"31":"n",
"32":"n",
"33":"n",
"34":"n d #1",
"35":"n d #1",
"36":"n d #1",
2014-11-03 14:32:38 +01:00
"37":"y",
"38":"y",
"39":"y",
"40":"y",
2014-11-20 07:04:47 +01:00
"41":"y",
2015-01-30 14:24:39 +01:00
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
"5.1":"n",
"6":"n",
2015-01-30 14:24:39 +01:00
"6.1":"n",
"7":"n",
"7.1":"y x",
"8":"y x"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
2015-01-30 14:24:39 +01:00
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
2014-11-03 14:32:38 +01:00
"24":"y",
"25":"y",
"26":"y",
2015-01-30 14:24:39 +01:00
"27":"y",
"28":"y",
"29":"y"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"n",
2015-01-30 14:24:39 +01:00
"7.0-7.1":"n",
"8":"y x",
"8.1":"y x"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
2015-01-30 14:24:39 +01:00
"5.0-8.0":"n"
2014-11-03 14:32:38 +01:00
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
2015-01-30 14:24:39 +01:00
"4.4":"n",
"4.4.3-4.4.4":"n",
2014-11-03 14:32:38 +01:00
"37":"y"
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"n",
"10":"n"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
2015-01-30 14:24:39 +01:00
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
2014-11-03 14:32:38 +01:00
"24":"y"
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"n"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2014-11-20 07:04:47 +01:00
"10":"n",
"11":"n"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
"9.9":"n"
}
},
"notes":"",
"notes_by_num":{
2015-01-30 14:24:39 +01:00
"1":"Enabled in Chrome through the \"experimental Web Platform features\" flag in chrome://flags"
2014-11-03 14:32:38 +01:00
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":46.02,
2014-11-03 14:32:38 +01:00
"usage_perc_a":0,
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"circle,ellipse,polygon,inset,shape-outside,shape-inside",
"ie_id":"shapes",
"chrome_id":"5163890719588352",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],75:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS position:sticky",
"description":"Keeps elements positioned as \"fixed\" or \"relative\" depending on how it appears in the viewport. As a result the element is \"stuck\" when necessary while scrolling.",
"spec":"http://dev.w3.org/csswg/css-position/#sticky-positioning",
"status":"unoff",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"http://updates.html5rocks.com/2012/08/Stick-your-landings-position-sticky-lands-in-WebKit",
"title":"HTML5Rocks"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"https://developer.mozilla.org/en-US/docs/Web/CSS/position",
"title":"MDN article"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://docs.webplatform.org/wiki/css/properties/position",
"title":"WebPlatform Docs"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"https://github.com/filamentgroup/fixed-sticky",
"title":"Polyfill"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"https://github.com/wilddeer/stickyfill",
"title":"Another polyfill"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
{
2015-01-30 14:24:39 +01:00
"description":"Firefox and Safari do not appear to support [sticky table headers](http://jsfiddle.net/Mf4YT/2/). (see also [Firefox bug](https://bugzilla.mozilla.org/show_bug.cgi?id=975644))"
2014-11-03 14:32:38 +01:00
}
],
"categories":[
2015-01-30 14:24:39 +01:00
"CSS"
2014-11-03 14:32:38 +01:00
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n",
"TP":"n"
2014-11-03 14:32:38 +01:00
},
"firefox":{
2015-01-30 14:24:39 +01:00
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n d #1",
"27":"n d #1",
"28":"n d #1",
"29":"n d #1",
"30":"n d #1",
"31":"n d #1",
2014-11-03 14:32:38 +01:00
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
2015-01-30 14:24:39 +01:00
"38":"y"
},
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n d #2",
"24":"n d #2",
"25":"n d #2",
"26":"n d #2",
"27":"n d #2",
"28":"n d #2",
"29":"n d #2",
"30":"n d #2",
"31":"n d #2",
"32":"n d #2",
"33":"n d #2",
"34":"n d #2",
"35":"n d #2",
"36":"n d #2",
"37":"n",
"38":"n",
"39":"n",
"40":"n",
"41":"n",
"42":"n",
"43":"n"
2014-11-03 14:32:38 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
"5.1":"n",
"6":"n",
2014-11-03 14:32:38 +01:00
"6.1":"y x",
"7":"y x",
"7.1":"y x",
"8":"y x"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
2015-01-30 14:24:39 +01:00
"12.1":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"y x",
2014-11-03 14:32:38 +01:00
"7.0-7.1":"y x",
"8":"y x",
"8.1":"y x"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
"4.4":"n",
"4.4.3-4.4.4":"n",
"37":"n"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"n",
"10":"n"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
2015-01-30 14:24:39 +01:00
"12.1":"n",
"24":"n"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"n"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"n"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
2015-01-30 14:24:39 +01:00
"1":"Can be enabled in Firefox by setting the about:config preference layout.css.sticky.enabled to true",
"2":"Enabled in Chrome through the \"experimental Web Platform features\" flag in chrome://flags"
2014-11-03 14:32:38 +01:00
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":20.09,
"usage_perc_a":0,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"",
"ie_id":"positionsticky",
"chrome_id":"6190250464378880",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],76:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS3 text-align-last",
"description":"CSS property to describe how the last line of a block or a line right before a forced line break when `text-align` is `justify`.",
"spec":"http://www.w3.org/TR/css3-text/#text-align-last-property",
2014-11-03 14:32:38 +01:00
"status":"wd",
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"https://developer.mozilla.org/en-US/docs/Web/CSS/text-align-last",
"title":"MDN text-align-last"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://blogs.adobe.com/webplatform/2014/02/25/improving-your-sites-visual-details-css3-text-align-last/",
"title":"Adobe Web Platform Article"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
2015-01-30 14:24:39 +01:00
"5.5":"a #1",
"6":"a #1",
"7":"a #1",
"8":"a #1",
"9":"a #1",
"10":"a #1",
"11":"a #1",
"TP":"a #1"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
2015-01-30 14:24:39 +01:00
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"y x",
"13":"y x",
"14":"y x",
2014-11-03 14:32:38 +01:00
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
2015-01-30 14:24:39 +01:00
"34":"y x",
"35":"y x",
"36":"y x",
"37":"y x",
"38":"y x"
2014-11-03 14:32:38 +01:00
},
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
2015-01-30 14:24:39 +01:00
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n",
"30":"n",
"31":"n",
"32":"n",
"33":"n",
"34":"n",
"35":"n d #2",
"36":"n d #2",
"37":"n d #2",
"38":"n d #2",
"39":"n d #2",
"40":"n d #2",
"41":"n d #2",
"42":"n d #2",
"43":"n d #2"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"n",
"3.2":"n",
2015-01-30 14:24:39 +01:00
"4":"n",
"5":"n",
"5.1":"n",
"6":"n",
2014-11-03 14:32:38 +01:00
"6.1":"n",
"7":"n",
"7.1":"n",
"8":"n"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
2015-01-30 14:24:39 +01:00
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n d #3",
"23":"n d #3",
"24":"n d #3",
"25":"n d #3",
"26":"n d #3",
"27":"n d #3",
"28":"n d #3",
"29":"n d #3"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"n",
2014-11-03 14:32:38 +01:00
"7.0-7.1":"n",
"8":"n",
"8.1":"n"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
2015-01-30 14:24:39 +01:00
"4.4":"n",
"4.4.3-4.4.4":"n",
"37":"n"
2014-11-03 14:32:38 +01:00
},
"bb":{
"7":"n",
2015-01-30 14:24:39 +01:00
"10":"n"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
2015-01-30 14:24:39 +01:00
"24":"n"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"n"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y x"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"a #1",
"11":"a #1"
2014-11-20 07:04:47 +01:00
},
2014-11-03 14:32:38 +01:00
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"n"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
2015-01-30 14:24:39 +01:00
"1":"In Internet Explorer, the start and end values are not supported.",
"2":"Enabled through the \"Enable Experimental Web Platform Features\" flag in chrome://flags",
"3":"Enabled through the \"Enable Experimental Web Platform Features\" flag in opera://flags"
2014-11-03 14:32:38 +01:00
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":11.65,
"usage_perc_a":17.19,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"text align last",
2014-11-03 14:32:38 +01:00
"ie_id":"",
"chrome_id":"",
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],77:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS3 Transitions",
"description":"Simple method of animating certain properties of an element",
"spec":"http://www.w3.org/TR/css3-transitions/",
2014-11-03 14:32:38 +01:00
"status":"wd",
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"http://www.webdesignerdepot.com/2010/01/css-transitions-101/",
"title":"Article on usage"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://www.css3files.com/transition/",
"title":"Information page"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://www.the-art-of-web.com/css/timing-function/",
"title":"Examples on timing functions"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://www.opera.com/docs/specs/presto2.12/css/transitions/",
"title":"Animation of property types support in Opera"
},
{
"url":"http://docs.webplatform.org/wiki/css/properties/transition",
2014-11-03 14:32:38 +01:00
"title":"WebPlatform Docs"
}
],
"bugs":[
{
2015-01-30 14:24:39 +01:00
"description":"Not supported on any pseudo-elements besides ::before and ::after for Firefox, Chrome 26+, Opera 16+ and IE10+."
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"description":"Transitionable properties with calc() derived values are not supported below and including IE11 (http://connect.microsoft.com/IE/feedback/details/762719/css3-calc-bug-inside-transition-or-transform)"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"description":"'background-size' is not supported below and including IE10"
2014-11-03 14:32:38 +01:00
}
],
"categories":[
2015-01-30 14:24:39 +01:00
"CSS3"
2014-11-03 14:32:38 +01:00
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
2015-01-30 14:24:39 +01:00
"10":"y",
"11":"y",
"TP":"y"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
2015-01-30 14:24:39 +01:00
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y"
2014-11-03 14:32:38 +01:00
},
"chrome":{
2015-01-30 14:24:39 +01:00
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
2014-11-03 14:32:38 +01:00
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
2015-01-30 14:24:39 +01:00
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
"41":"y",
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"y x",
"3.2":"y x",
"4":"y x",
"5":"y x",
"5.1":"y x",
2014-11-03 14:32:38 +01:00
"6":"y x",
2015-01-30 14:24:39 +01:00
"6.1":"y",
"7":"y",
"7.1":"y",
"8":"y"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
2015-01-30 14:24:39 +01:00
"10.5":"y x",
"10.6":"y x",
"11":"y x",
"11.1":"y x",
"11.5":"y x",
"11.6":"y x",
"12":"y x",
2014-11-03 14:32:38 +01:00
"12.1":"y",
2015-01-30 14:24:39 +01:00
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"y x",
"4.0-4.1":"y x",
"4.2-4.3":"y x",
"5.0-5.1":"y x",
"6.0-6.1":"y x",
"7.0-7.1":"y",
"8":"y",
"8.1":"y"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"y x",
"2.2":"y x",
"2.3":"y x",
"3":"y x",
"4":"y x",
"4.1":"y x",
"4.2-4.3":"y x",
"4.4":"y",
"4.4.3-4.4.4":"y",
"37":"y"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"y x",
"10":"y x"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
2015-01-30 14:24:39 +01:00
"10":"y x",
"11":"y x",
"11.1":"y x",
"11.5":"y x",
"12":"y x",
"12.1":"y",
"24":"y"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"y",
"11":"y"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"y x"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":87.4,
"usage_perc_a":0,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"css transition",
"ie_id":"",
"chrome_id":"",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],78:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS3 Box-sizing",
"description":"Method of specifying whether or not an element's borders and padding should be included in size units",
"spec":"http://www.w3.org/TR/css3-ui/#box-sizing",
2014-11-03 14:32:38 +01:00
"status":"wd",
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"https://developer.mozilla.org/En/CSS/Box-sizing",
"title":"MDN article"
},
{
"url":"http://www.456bereastreet.com/archive/201104/controlling_width_with_css3_box-sizing/",
"title":"Blog post"
},
{
"url":"https://github.com/Schepp/box-sizing-polyfill",
"title":"Polyfill for IE"
},
{
"url":"http://css-tricks.com/box-sizing/",
"title":"CSS Tricks"
},
{
"url":"http://docs.webplatform.org/wiki/css/properties/box-sizing",
"title":"WebPlatform Docs"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
2015-01-30 14:24:39 +01:00
{
"description":"Android browsers do not calculate correctly the dimensions (width and height) of the HTML select element."
},
{
"description":"Safari 6.0.x does not use box-sizing on elements with display: table;"
},
{
"description":"IE9 will subtract the width of the scrollbar to the width of the element when set to position: absolute, overflow: auto / overflow-y: scroll"
},
{
"description":"IE 8 ignores `box-sizing: border-box` if min/max-width/height is used."
}
2014-11-03 14:32:38 +01:00
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
2015-01-30 14:24:39 +01:00
"5.5":"p",
"6":"p",
"7":"p",
"8":"a",
"9":"a",
"10":"a",
"11":"a",
"TP":"a"
2014-11-03 14:32:38 +01:00
},
"firefox":{
2015-01-30 14:24:39 +01:00
"2":"y x",
"3":"y x",
"3.5":"y x",
"3.6":"y x",
2014-11-03 14:32:38 +01:00
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
2015-01-30 14:24:39 +01:00
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y"
},
"chrome":{
"4":"a x",
"5":"a x",
"6":"a x",
"7":"a x",
"8":"a x",
"9":"a x",
"10":"a",
"11":"a",
"12":"a",
"13":"a",
"14":"a",
"15":"a",
"16":"a",
"17":"a",
"18":"a",
"19":"a",
"20":"a",
"21":"a",
"22":"a",
"23":"a",
"24":"a",
"25":"a",
"26":"a",
"27":"a",
"28":"a",
"29":"a",
"30":"a",
"31":"a",
"32":"a",
"33":"a",
"34":"a",
"35":"a",
"36":"a",
"37":"a",
"38":"a",
"39":"a",
"40":"a",
"41":"a",
"42":"a",
"43":"a"
2014-11-03 14:32:38 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"a x",
"3.2":"a x",
"4":"a x",
"5":"a x",
"5.1":"a",
"6":"a",
"6.1":"a",
"7":"a",
"7.1":"a",
"8":"a"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
2015-01-30 14:24:39 +01:00
"9.5-9.6":"a",
"10.0-10.1":"a",
"10.5":"a",
"10.6":"a",
"11":"a",
"11.1":"a",
"11.5":"a",
"11.6":"a",
"12":"a",
"12.1":"a",
"15":"a",
"16":"a",
"17":"a",
"18":"a",
"19":"a",
"20":"a",
"21":"a",
"22":"a",
"23":"a",
"24":"a",
"25":"a",
"26":"a",
"27":"a",
"28":"a",
"29":"a"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"a x",
"4.0-4.1":"a x",
"4.2-4.3":"a x",
"5.0-5.1":"a",
"6.0-6.1":"a",
"7.0-7.1":"a",
"8":"a",
"8.1":"a"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
2015-01-30 14:24:39 +01:00
"5.0-8.0":"a"
2014-11-03 14:32:38 +01:00
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"a x",
"2.2":"a x",
"2.3":"a x",
"3":"a x",
"4":"a",
"4.1":"a",
"4.2-4.3":"a",
"4.4":"a",
"4.4.3-4.4.4":"a",
"37":"a"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"a x",
"10":"a"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
2015-01-30 14:24:39 +01:00
"10":"a",
"11":"a",
"11.1":"a",
"11.5":"a",
"12":"a",
"12.1":"a",
"24":"a"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"a"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"a",
"11":"a"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"a"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"Partial support refers to supporting only the `content-box` and `border-box` values, not `padding-box` (which was added to the spec later).",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":12,
"usage_perc_a":84.84,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"border-box,content-box,padding-box",
"ie_id":"",
"chrome_id":"",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],79:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS3 Cursors (new values)",
"description":"Support for `zoom-in` and `zoom-out` values for the CSS3 `cursor` property.",
"spec":"http://www.w3.org/TR/css3-ui/#cursor",
"status":"wd",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"https://developer.mozilla.org/en-US/docs/Web/CSS/cursor",
"title":"MDN Documentation"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
2015-01-30 14:24:39 +01:00
2014-11-03 14:32:38 +01:00
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n",
"TP":"n"
2014-11-03 14:32:38 +01:00
},
"firefox":{
2015-01-30 14:24:39 +01:00
"2":"y x",
"3":"y x",
"3.5":"y x",
"3.6":"y x",
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y"
2014-11-03 14:32:38 +01:00
},
"chrome":{
2015-01-30 14:24:39 +01:00
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y x",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
"41":"y",
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"y x",
"3.2":"y x",
"4":"y x",
"5":"y x",
"5.1":"y x",
"6":"y x",
"6.1":"y x",
"7":"y x",
"7.1":"y x",
"8":"y x"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
2015-01-30 14:24:39 +01:00
"11.1":"n",
"11.5":"n",
2014-11-03 14:32:38 +01:00
"11.6":"y",
"12":"y",
"12.1":"y",
2015-01-30 14:24:39 +01:00
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"n",
"7.0-7.1":"n",
"8":"n",
"8.1":"n"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
2015-01-30 14:24:39 +01:00
"5.0-8.0":"n"
2014-11-03 14:32:38 +01:00
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
"4.4":"n",
"4.4.3-4.4.4":"n",
"37":"n"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"y x",
"10":"y x"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
"11":"n",
2015-01-30 14:24:39 +01:00
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
"24":"n"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"n"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"n"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"n"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"Chrome, Safari and Firefox also support the unofficial `grab` and `grabbing` values (with prefix)",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":48.23,
"usage_perc_a":0,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"cursors, pointers",
"ie_id":"",
"chrome_id":"",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],80:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS3 tab-size",
"description":"Method of customizing the width of the tab character. Only effective using 'white-space: pre' or 'white-space: pre-wrap'.",
"spec":"http://www.w3.org/TR/css3-text/#tab-size1",
"status":"wd",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size",
"title":"MDN article"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
2015-01-30 14:24:39 +01:00
{
"description":"Firefox [does not yet](https://bugzilla.mozilla.org/show_bug.cgi?id=943918) support `<length>` values"
}
2014-11-03 14:32:38 +01:00
],
"categories":[
2015-01-30 14:24:39 +01:00
"CSS3"
2014-11-03 14:32:38 +01:00
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n",
"TP":"n"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
2015-01-30 14:24:39 +01:00
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y x",
"37":"y x",
"38":"y x"
2014-11-03 14:32:38 +01:00
},
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
2015-01-30 14:24:39 +01:00
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
"41":"y",
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
"5.1":"n",
"6":"n",
2015-01-30 14:24:39 +01:00
"6.1":"y",
"7":"y",
"7.1":"y",
"8":"y"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
2015-01-30 14:24:39 +01:00
"10.6":"y x",
"11":"y x",
"11.1":"y x",
"11.5":"y x",
"11.6":"y x",
"12":"y x",
"12.1":"y x",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"n",
"7.0-7.1":"y",
"8":"y",
"8.1":"y"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
2015-01-30 14:24:39 +01:00
"5.0-8.0":"y x"
2014-11-03 14:32:38 +01:00
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
"4.4":"y",
"4.4.3-4.4.4":"y",
"37":"y"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"y",
"10":"y"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
2015-01-30 14:24:39 +01:00
"11":"y x",
"11.1":"y x",
"11.5":"y x",
"12":"y x",
"12.1":"y x",
"24":"y"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y x"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"n"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":71.73,
"usage_perc_a":0,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"tab-size,tab-width",
"ie_id":"",
"chrome_id":"",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],81:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"Flexible Box Layout Module",
"description":"Method of positioning elements in horizontal or vertical stacks.",
"spec":"http://www.w3.org/TR/css3-flexbox/",
"status":"wd",
2014-11-03 14:32:38 +01:00
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"http://bennettfeely.com/flexplorer/",
"title":"Flexbox CSS generator"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://www.adobe.com/devnet/html5/articles/working-with-flexbox-the-new-spec.html",
"title":"Article on using the latest spec"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"https://dev.opera.com/articles/view/advanced-cross-browser-flexbox/",
"title":"Tutorial on cross-browser support"
},
{
"url":"http://philipwalton.github.io/solved-by-flexbox/",
"title":"Examples on how to solve common layout problems with flexbox"
},
{
"url":"http://css-tricks.com/snippets/css/a-guide-to-flexbox/",
"title":"A Complete Guide to Flexbox"
},
{
"url":"http://the-echoplex.net/flexyboxes/",
"title":"Flexbox playground and code generator"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
2015-01-30 14:24:39 +01:00
{
"description":"IE10 and IE11 default values for `flex` are `0 0 auto` rather than `0 1 auto`, as per the draft spec, as of September 2013."
},
{
"description":"In IE10 and IE11, containers with `display: flex` and `flex-direction: column` will not properly calculate their flexed childrens' sizes if the container has `min-height` but no explicit `height` property. [See bug](https://connect.microsoft.com/IE/feedback/details/802625/min-height-and-flexbox-flex-direction-column-dont-work-together-in-ie-10-11-preview)."
},
{
"description":"In Chrome and Safari, the height of (non flex) children are not recognized in percentages. However Firefox and IE recognize and scale the children based on percentage heights. [Chrome bug](http://crbug.com/341310)"
},
{
"description":"Firefox does not support [Flexbox in button elements](https://bugzilla.mozilla.org/show_bug.cgi?id=984869#c2)"
},
{
"description":"[Flexbugs](https://github.com/philipwalton/flexbugs): community-curated list of flexbox issues and cross-browser workarounds for them"
}
2014-11-03 14:32:38 +01:00
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
2015-01-30 14:24:39 +01:00
"10":"a x #2",
"11":"y",
"TP":"y"
2014-11-03 14:32:38 +01:00
},
"firefox":{
2015-01-30 14:24:39 +01:00
"2":"a x #1",
"3":"a x #1",
"3.5":"a x #1",
"3.6":"a x #1",
"4":"a x #1",
"5":"a x #1",
"6":"a x #1",
"7":"a x #1",
"8":"a x #1",
"9":"a x #1",
"10":"a x #1",
"11":"a x #1",
"12":"a x #1",
"13":"a x #1",
"14":"a x #1",
"15":"a x #1",
"16":"a x #1",
"17":"a x #1",
"18":"a x #1",
"19":"a x #1",
"20":"a x #1",
"21":"a x #1",
"22":"a #3",
"23":"a #3",
"24":"a #3",
"25":"a #3",
"26":"a #3",
"27":"a #3",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y"
},
"chrome":{
"4":"a x #1",
"5":"a x #1",
"6":"a x #1",
"7":"a x #1",
"8":"a x #1",
"9":"a x #1",
"10":"a x #1",
"11":"a x #1",
"12":"a x #1",
"13":"a x #1",
"14":"a x #1",
"15":"a x #1",
"16":"a x #1",
"17":"a x #1",
"18":"a x #1",
"19":"a x #1",
"20":"a x #1",
2014-11-03 14:32:38 +01:00
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
2015-01-30 14:24:39 +01:00
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
"41":"y",
"42":"y",
"43":"y"
2014-11-03 14:32:38 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"a x #1",
"3.2":"a x #1",
"4":"a x #1",
"5":"a x #1",
"5.1":"a x #1",
"6":"a x #1",
"6.1":"y x",
"7":"y x",
"7.1":"y x",
"8":"y x"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
2015-01-30 14:24:39 +01:00
"12.1":"y",
"15":"y x",
"16":"y x",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y"
},
"ios_saf":{
"3.2":"a x #1",
"4.0-4.1":"a x #1",
"4.2-4.3":"a x #1",
"5.0-5.1":"a x #1",
"6.0-6.1":"a x #1",
"7.0-7.1":"y x",
"8":"y x",
"8.1":"y x"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"a x #1",
"2.2":"a x #1",
"2.3":"a x #1",
"3":"a x #1",
"4":"a x #1",
"4.1":"a x #1",
"4.2-4.3":"a x #1",
"4.4":"y",
"4.4.3-4.4.4":"y",
"37":"y"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"a x #1",
"10":"y x"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
2015-01-30 14:24:39 +01:00
"12.1":"y",
"24":"y"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"a x #2",
"11":"y"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"a x #1"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"Most partial support refers to supporting an [older version](http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/) of the specification or an [older syntax](http://www.w3.org/TR/2012/WD-css3-flexbox-20120322/).",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
2015-01-30 14:24:39 +01:00
"1":"Only supports the [old flexbox](http://www.w3.org/TR/2009/WD-css3-flexbox-20090723) specification and does not support wrapping.",
"2":"Only supports the [2012 syntax](http://www.w3.org/TR/2012/WD-css3-flexbox-20120322/)",
"3":"Does not support flex-wrap or flex-flow properties"
2014-11-03 14:32:38 +01:00
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":76.29,
"usage_perc_a":11.17,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"flex-box,flex-direction,flex-wrap,flex-flow,flex-grow,flex-basis",
"ie_id":"flexbox",
"chrome_id":"4837301406400512",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],82:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"Font feature settings",
"description":"Method of applying advanced typographic and language-specific font features to supported OpenType fonts.",
"spec":"http://w3.org/TR/css3-fonts/#font-rend-props",
2014-11-03 14:32:38 +01:00
"status":"wd",
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"http://ie.microsoft.com/testdrive/Graphics/opentype/",
"title":"Demo pages (IE/Firefox only)"
},
2014-11-03 14:32:38 +01:00
{
2015-01-30 14:24:39 +01:00
"url":"http://hacks.mozilla.org/2010/11/firefox-4-font-feature-support/",
"title":"Mozilla hacks article"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://html5accessibility.com/",
"title":"Detailed tables on accessability support"
},
{
"url":"http://docs.webplatform.org/wiki/css/properties/font-feature-settings",
"title":"WebPlatform Docs"
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
],
"bugs":[
2014-11-03 14:32:38 +01:00
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
2015-01-30 14:24:39 +01:00
"10":"y",
"11":"y",
"TP":"y"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
2015-01-30 14:24:39 +01:00
"4":"a x",
"5":"a x",
"6":"a x",
"7":"a x",
"8":"a x",
"9":"a x",
"10":"a x",
"11":"a x",
"12":"a x",
"13":"a x",
"14":"a x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y"
2014-11-03 14:32:38 +01:00
},
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
2015-01-30 14:24:39 +01:00
"16":"a x",
"17":"a x",
"18":"a x",
"19":"a x",
"20":"a x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y x",
"37":"y x",
"38":"y x",
"39":"y x",
"40":"y x",
"41":"y x",
"42":"y x",
"43":"y x"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"n",
"3.2":"n",
2015-01-30 14:24:39 +01:00
"4":"a",
"5":"a",
"5.1":"a",
"6":"a",
2014-11-03 14:32:38 +01:00
"6.1":"n",
"7":"n",
"7.1":"n",
"8":"n"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
2015-01-30 14:24:39 +01:00
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x"
},
"ios_saf":{
"3.2":"a",
"4.0-4.1":"a",
"4.2-4.3":"a",
"5.0-5.1":"a",
"6.0-6.1":"a",
"7.0-7.1":"n",
"8":"n",
"8.1":"n"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
2015-01-30 14:24:39 +01:00
"4.4":"y x",
"4.4.3-4.4.4":"y x",
"37":"y x"
2014-11-03 14:32:38 +01:00
},
"bb":{
"7":"n",
2015-01-30 14:24:39 +01:00
"10":"y x"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
2015-01-30 14:24:39 +01:00
"24":"y x"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y x"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y x"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
"9.9":"y x"
}
},
2015-01-30 14:24:39 +01:00
"notes":"Partial support in older Firefox versions refers to using an older syntax. Partial support in older Chrome versions refers to lacking support in Mac OS X. ",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":71.96,
"usage_perc_a":1.34,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"font-feature,font-feature-settings,kern,kerning,font-variant-alternates,ligatures,font-variant-ligatures",
2014-11-03 14:32:38 +01:00
"ie_id":"",
"chrome_id":"",
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],83:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"Full Screen API",
"description":"API for allowing content (like a video or canvas element) to take up the entire screen.",
"spec":"http://www.w3.org/TR/fullscreen/",
2014-11-03 14:32:38 +01:00
"status":"wd",
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"https://developer.mozilla.org/en/DOM/Using_full-screen_mode",
2014-11-03 14:32:38 +01:00
"title":"MDN article"
},
{
2015-01-30 14:24:39 +01:00
"url":"http://jlongster.com/2011/11/21/canvas.html",
"title":"Blog post"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://hacks.mozilla.org/2012/01/using-the-fullscreen-api-in-web-browsers/",
"title":"Mozilla hacks article"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://docs.webplatform.org/wiki/dom/Element/requestFullscreen",
2014-11-03 14:32:38 +01:00
"title":"WebPlatform Docs"
}
],
"bugs":[
{
2015-01-30 14:24:39 +01:00
"description":"IE 11 doesn't allow going to fullscreen mode when the event that triggers `msRequestFullscreen()` is a `keydown` or `pointerdown` event (`keypress` and `click` do work)"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"description":"Safari blocks access to keyboard events in fullscreen mode (as a security measure)."
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"description":"IE 11 does not allow scrolling when document.documentElement is set to full screen."
},
{
"description":"IE 11 does not properly support fullscreen when opening from an iframe."
},
{
"description":"Opera 12.1 uses the older specificaton's `:fullscreen-ancestor` pseudo-class instead of the the `::backdrop` pseudo-element."
2014-11-03 14:32:38 +01:00
}
],
"categories":[
2015-01-30 14:24:39 +01:00
"JS API"
2014-11-03 14:32:38 +01:00
],
"stats":{
"ie":{
"5.5":"n",
2015-01-30 14:24:39 +01:00
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"y x",
"TP":"y x"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
2015-01-30 14:24:39 +01:00
"3.5":"n",
"3.6":"n",
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"a x",
"11":"a x",
"12":"a x",
"13":"a x",
"14":"a x",
"15":"a x",
"16":"a x",
"17":"a x",
"18":"a x",
"19":"a x",
"20":"a x",
"21":"a x",
"22":"a x",
"23":"a x",
"24":"a x",
"25":"a x",
"26":"a x",
"27":"a x",
"28":"a x",
"29":"a x",
"30":"a x",
"31":"a x",
"32":"a x",
"33":"a x",
"34":"a x",
"35":"a x",
"36":"a x",
"37":"a x",
"38":"a x"
2014-11-03 14:32:38 +01:00
},
"chrome":{
2015-01-30 14:24:39 +01:00
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"a x",
"16":"a x",
"17":"a x",
"18":"a x",
"19":"a x",
2014-11-03 14:32:38 +01:00
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
2015-01-30 14:24:39 +01:00
"36":"y x",
"37":"y x",
"38":"y x",
"39":"y x",
"40":"y x",
"41":"y x",
"42":"y x",
"43":"y x"
2014-11-03 14:32:38 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
"5.1":"a x",
2014-11-03 14:32:38 +01:00
"6":"y x",
"6.1":"y x",
"7":"y x",
"7.1":"y x",
"8":"y x"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
2015-01-30 14:24:39 +01:00
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
2014-11-03 14:32:38 +01:00
"12.1":"y",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
2015-01-30 14:24:39 +01:00
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"n",
"7.0-7.1":"n",
"8":"n",
"8.1":"n"
2014-11-03 14:32:38 +01:00
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
"4.4":"n",
"4.4.3-4.4.4":"n",
"37":"n"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"n",
"10":"a"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
2015-01-30 14:24:39 +01:00
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
"24":"y x"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y x"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"a x"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"y x"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"n"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"Partial support refers to supporting an earlier draft of the spec.",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":54.48,
"usage_perc_a":12.24,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"full-screen",
"ie_id":"fullscreenapi",
"chrome_id":"5259513871466496",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],84:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"Intrinsic & Extrinsic Sizing",
"description":"Allows for the heights and widths to be specified in intrinsic values using the fill-available, max-content, min-content, and fit-content properties.",
"spec":"http://www.w3.org/TR/css3-sizing/",
2014-11-03 14:32:38 +01:00
"status":"wd",
"links":[
{
2015-01-30 14:24:39 +01:00
"url":"http://demosthenes.info/blog/662/Design-From-the-Inside-Out-With-CSS-MinContent",
"title":"Min-Content tutorial"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
2015-01-30 14:24:39 +01:00
2014-11-03 14:32:38 +01:00
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n",
"TP":"n"
2014-11-03 14:32:38 +01:00
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
2015-01-30 14:24:39 +01:00
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
2014-11-03 14:32:38 +01:00
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
2015-01-30 14:24:39 +01:00
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y x",
"37":"y x",
"38":"y x"
2014-11-03 14:32:38 +01:00
},
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
2015-01-30 14:24:39 +01:00
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
2014-11-03 14:32:38 +01:00
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
2015-01-30 14:24:39 +01:00
"36":"y x",
"37":"y x",
"38":"y x",
"39":"y x",
"40":"y x",
"41":"y x",
"42":"y x",
"43":"y x"
2014-11-03 14:32:38 +01:00
},
"safari":{
"3.1":"n",
"3.2":"n",
2015-01-30 14:24:39 +01:00
"4":"n",
"5":"n",
"5.1":"n",
"6":"n",
2014-11-03 14:32:38 +01:00
"6.1":"y x",
"7":"y x",
"7.1":"y x",
"8":"y x"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
2015-01-30 14:24:39 +01:00
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"n",
2014-11-03 14:32:38 +01:00
"7.0-7.1":"y x",
"8":"y x",
"8.1":"y x"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
2015-01-30 14:24:39 +01:00
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
2014-11-03 14:32:38 +01:00
"4.4":"y x",
"4.4.3-4.4.4":"y x",
2015-01-30 14:24:39 +01:00
"37":"y x"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"n",
2014-11-03 14:32:38 +01:00
"10":"y x"
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
2015-01-30 14:24:39 +01:00
"24":"y x"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"y x"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"y x"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"n",
"11":"n"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"n"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"Prefixes are on the values, not the property names (e.g. -webkit-min-content) Firefox currently supports the \"-moz-available\" property rather than \"-moz-fill-available\".",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":68.21,
"usage_perc_a":0,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"fill-available,max-content,min-content,fit-content,contain-floats",
"ie_id":"cssintrinsicsizing",
"chrome_id":"5901353784180736",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],85:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
module.exports={
2015-01-30 14:24:39 +01:00
"title":"CSS3 Multiple column layout",
"description":"Method of flowing information in multiple columns",
"spec":"http://www.w3.org/TR/css3-multicol/",
"status":"cr",
"links":[
{
"url":"https://dev.opera.com/articles/view/css3-multi-column-layout/",
"title":"Dev.Opera article"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/an-introduction-to-the-css3-multiple-column-layout-module/",
"title":"Introduction page"
2014-11-03 14:32:38 +01:00
},
{
2015-01-30 14:24:39 +01:00
"url":"http://docs.webplatform.org/wiki/css/properties/column-width",
"title":"WebPlatform Docs"
},
{
"url":"https://github.com/BetleyWhitehorne/CSS3MultiColumn",
"title":"Polyfill"
2014-11-03 14:32:38 +01:00
}
],
"bugs":[
2015-01-30 14:24:39 +01:00
{
"description":"In Firefox, the property `column-span` (or `-moz-column-span`) does not yet work. See [the bug](https://bugzilla.mozilla.org/show_bug.cgi?id=616436)."
},
{
"description":"In Chrome, the `-webkit-column-count` directive does not yet work with print stylesheets. See the [following bug in Chromium](https://code.google.com/p/chromium/issues/detail?id=99358)."
},
{
"description":"Chrome is reported to incorrectly calculate the container height, and often breaks on margins, padding, and can display 1px of the next column at the bottom of the previous column."
}
2014-11-03 14:32:38 +01:00
],
"categories":[
2015-01-30 14:24:39 +01:00
"CSS3"
2014-11-03 14:32:38 +01:00
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
2015-01-30 14:24:39 +01:00
"10":"y",
"11":"y",
"TP":"y"
2014-11-03 14:32:38 +01:00
},
"firefox":{
2015-01-30 14:24:39 +01:00
"2":"a x",
"3":"a x",
"3.5":"a x",
"3.6":"a x",
"4":"a x",
"5":"a x",
"6":"a x",
"7":"a x",
"8":"a x",
"9":"a x",
"10":"a x",
"11":"a x",
"12":"a x",
"13":"a x",
"14":"a x",
"15":"a x",
"16":"a x",
"17":"a x",
"18":"a x",
"19":"a x",
"20":"a x",
"21":"a x",
"22":"a x",
"23":"a x",
"24":"a x",
"25":"a x",
"26":"a x",
"27":"a x",
"28":"a x",
"29":"a x",
"30":"a x",
"31":"a x",
"32":"a x",
"33":"a x",
"34":"a x",
"35":"a x",
"36":"a x",
"37":"a x",
"38":"a x"
2014-11-03 14:32:38 +01:00
},
"chrome":{
2015-01-30 14:24:39 +01:00
"4":"a x",
"5":"a x",
"6":"a x",
"7":"a x",
"8":"a x",
"9":"a x",
"10":"a x",
"11":"a x",
"12":"a x",
"13":"a x",
"14":"a x",
"15":"a x",
"16":"a x",
"17":"a x",
"18":"a x",
"19":"a x",
"20":"a x",
"21":"a x",
"22":"a x",
"23":"a x",
"24":"a x",
"25":"a x",
"26":"a x",
"27":"a x",
"28":"a x",
"29":"a x",
"30":"a x",
"31":"a x",
"32":"a x",
"33":"a x",
"34":"a x",
"35":"a x",
"36":"a x",
"37":"a x",
"38":"a x",
"39":"a x",
"40":"a x",
"41":"a x",
"42":"a x",
"43":"a x"
2014-11-03 14:32:38 +01:00
},
"safari":{
2015-01-30 14:24:39 +01:00
"3.1":"a x",
"3.2":"a x",
"4":"a x",
"5":"a x",
"5.1":"a x",
"6":"a x",
"6.1":"a x",
"7":"a x",
"7.1":"a x",
"8":"a x"
2014-11-03 14:32:38 +01:00
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
2015-01-30 14:24:39 +01:00
"11.1":"y",
"11.5":"y",
"11.6":"y",
"12":"y",
"12.1":"y",
"15":"a x",
"16":"a x",
"17":"a x",
"18":"a x",
"19":"a x",
"20":"a x",
"21":"a x",
"22":"a x",
"23":"a x",
"24":"a x",
"25":"a x",
"26":"a x",
"27":"a x",
"28":"a x",
"29":"a x"
2014-11-03 14:32:38 +01:00
},
"ios_saf":{
2015-01-30 14:24:39 +01:00
"3.2":"a x",
"4.0-4.1":"a x",
"4.2-4.3":"a x",
"5.0-5.1":"a x",
"6.0-6.1":"a x",
"7.0-7.1":"a x",
"8":"a x",
"8.1":"a x"
},
"op_mini":{
"5.0-8.0":"y"
},
2014-11-03 14:32:38 +01:00
"android":{
2015-01-30 14:24:39 +01:00
"2.1":"a x",
"2.2":"a x",
"2.3":"a x",
"3":"a x",
"4":"a x",
"4.1":"a x",
"4.2-4.3":"a x",
"4.4":"a x",
"4.4.3-4.4.4":"a x",
"37":"a x"
2014-11-03 14:32:38 +01:00
},
"bb":{
2015-01-30 14:24:39 +01:00
"7":"a x",
"10":"a x"
2014-11-03 14:32:38 +01:00
},
"op_mob":{
"10":"n",
"11":"n",
2015-01-30 14:24:39 +01:00
"11.1":"y",
"11.5":"y",
"12":"y",
"12.1":"y",
"24":"a x"
2014-11-03 14:32:38 +01:00
},
"and_chr":{
2015-01-30 14:24:39 +01:00
"40":"a x"
2014-11-03 14:32:38 +01:00
},
"and_ff":{
2015-01-30 14:24:39 +01:00
"33":"a x"
2014-11-03 14:32:38 +01:00
},
"ie_mob":{
2015-01-30 14:24:39 +01:00
"10":"y",
"11":"y"
2014-11-03 14:32:38 +01:00
},
"and_uc":{
2015-01-30 14:24:39 +01:00
"9.9":"a x"
2014-11-03 14:32:38 +01:00
}
},
2015-01-30 14:24:39 +01:00
"notes":"Partial support refers to not supporting the `break-before`, `break-after`, `break-inside` properties. Webkit browsers do have equivalent support for the non-standard `-webkit-column-break-*` properties while Firefox supports `page-break-*` to accomplish the same result.",
2014-11-03 14:32:38 +01:00
"notes_by_num":{
},
2015-01-30 14:24:39 +01:00
"usage_perc_y":14.04,
"usage_perc_a":76.54,
2014-11-03 14:32:38 +01:00
"ucprefix":false,
"parent":"",
2015-01-30 14:24:39 +01:00
"keywords":"column-count",
"ie_id":"multicolumnfullsupport",
"chrome_id":"6526151266664448",
2014-11-03 14:32:38 +01:00
"shown":true
}
2015-01-30 14:24:39 +01:00
},{}],86:[function(require,module,exports){
module.exports={
"title":"CSS3 object-fit/object-position",
"description":"Method of specifying how an object (image or video) should fit inside its box. object-fit options include \"contain\" (fit according to aspect ratio), \"fill\" (stretches object to fill) and \"cover\" (overflows box but maintains ratio), where object-position allows the object to be repositioned like background-image does.",
"spec":"http://www.w3.org/TR/css3-images/",
"status":"cr",
"links":[
{
"url":"https://dev.opera.com/articles/view/css3-object-fit-object-position/",
"title":"Dev.Opera article"
2014-11-20 07:04:47 +01:00
},
2015-01-30 14:24:39 +01:00
{
"url":"http://docs.webplatform.org/wiki/css/properties/object-fit",
"title":"WebPlatform Docs"
2014-11-20 07:04:47 +01:00
},
2015-01-30 14:24:39 +01:00
{
"url":"https://github.com/anselmh/object-fit",
"title":"object-fit JavaScript-Polyfill"
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
],
"bugs":[
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"TP":"n"
2014-11-20 07:04:47 +01:00
},
2015-01-30 14:24:39 +01:00
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n",
"30":"n",
"31":"n",
"32":"n",
"33":"n",
"34":"n",
"35":"n",
"36":"y",
"37":"y",
"38":"y"
2014-11-20 07:04:47 +01:00
},
2015-01-30 14:24:39 +01:00
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n",
"30":"n",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
"41":"y",
"42":"y",
"43":"y"
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
"5.1":"n",
"6":"n",
"6.1":"n",
"7":"n",
"7.1":"a #1",
"8":"a #1"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"y x",
"11":"y x",
"11.1":"y x",
"11.5":"y x",
"11.6":"y x",
"12":"y x",
"12.1":"y x",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y"
},
"ios_saf":{
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"n",
"7.0-7.1":"n",
"8":"a #1",
"8.1":"a #1"
},
"op_mini":{
"5.0-8.0":"y x"
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
"4.4":"n",
"4.4.3-4.4.4":"y",
"37":"y"
},
"bb":{
"7":"n",
"10":"n"
},
"op_mob":{
"10":"n",
"11":"y x",
"11.1":"y x",
"11.5":"y x",
"12":"y x",
"12.1":"y x",
"24":"y"
},
"and_chr":{
"40":"y"
},
"and_ff":{
"33":"n"
},
"ie_mob":{
"10":"n",
"11":"n"
},
"and_uc":{
"9.9":"n"
}
},
"notes":"",
"notes_by_num":{
"1":"Partial support in Safari refers to support for `object-fit` but not `object-position`."
},
"usage_perc_y":46.87,
"usage_perc_a":6.79,
"ucprefix":false,
"parent":"",
"keywords":"objectfit,objectposition",
"ie_id":"objectfitandobjectposition",
"chrome_id":"5302669702856704",
"shown":true
}
},{}],87:[function(require,module,exports){
module.exports={
"title":"Pointer events",
"description":"This specification integrates various inputs from mice, touchscreens, and pens, making separate implementations no longer necessary and authoring for cross-device pointers easier. Not to be mistaken with the unrelated \"pointer-events\" CSS property.",
"spec":"http://www.w3.org/TR/pointerevents/",
"status":"cr",
"links":[
{
"url":"http://blogs.msdn.com/b/ie/archive/2011/09/20/touch-input-for-ie10-and-metro-style-apps.aspx",
"title":"Implementation of Pointer Events in IE10"
},
{
"url":"http://blogs.msdn.com/b/eternalcoding/archive/2013/01/16/hand-js-a-polyfill-for-supporting-pointer-events-on-every-browser.aspx",
"title":"Hand.js, the polyfill for browsers only supporting Touch Events"
},
{
"url":"http://blogs.msdn.com/b/davrous/archive/2013/02/20/handling-touch-in-your-html5-apps-thanks-to-the-pointer-events-of-ie10-and-windows-8.aspx",
"title":"Article & tutorial"
}
],
"bugs":[
],
"categories":[
"DOM",
"JS API"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"a x",
"11":"y",
"TP":"y"
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
"4":"n",
"5":"n",
"6":"p",
"7":"p",
"8":"p",
"9":"p",
"10":"p",
"11":"p",
"12":"p",
"13":"p",
"14":"p",
"15":"p",
"16":"p",
"17":"p",
"18":"p",
"19":"p",
"20":"p",
"21":"p",
"22":"p",
"23":"p",
"24":"p",
"25":"p",
"26":"p",
"27":"p",
"28":"p",
"29":"p",
"30":"p",
"31":"p",
"32":"p",
"33":"p",
"34":"p",
"35":"p",
"36":"p",
"37":"p",
"38":"p"
},
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"p",
"23":"p",
"24":"p",
"25":"p",
"26":"p",
"27":"p",
"28":"p",
"29":"p",
"30":"p",
"31":"p",
"32":"p",
"33":"p",
"34":"p",
"35":"p",
"36":"p",
"37":"p",
"38":"p",
"39":"p",
"40":"p",
"41":"p",
"42":"p",
"43":"p"
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
"5.1":"n",
"6":"n",
"6.1":"u",
"7":"u",
"7.1":"u",
"8":"u"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
"15":"p",
"16":"p",
"17":"p",
"18":"p",
"19":"p",
"20":"p",
"21":"p",
"22":"p",
"23":"p",
"24":"p",
"25":"p",
"26":"p",
"27":"p",
"28":"p",
"29":"p"
},
"ios_saf":{
"3.2":"p",
"4.0-4.1":"p",
"4.2-4.3":"p",
"5.0-5.1":"p",
"6.0-6.1":"p",
"7.0-7.1":"p",
"8":"p",
"8.1":"p"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"p",
"2.2":"p",
"2.3":"p",
"3":"p",
"4":"p",
"4.1":"p",
"4.2-4.3":"p",
"4.4":"p",
"4.4.3-4.4.4":"p",
"37":"p"
},
"bb":{
"7":"p",
"10":"p"
},
"op_mob":{
"10":"n",
"11":"p",
"11.1":"p",
"11.5":"p",
"12":"p",
"12.1":"p",
"24":"p"
},
"and_chr":{
"40":"p"
},
"and_ff":{
"33":"p"
},
"ie_mob":{
"10":"a x",
"11":"y"
},
"and_uc":{
"9.9":"p"
}
},
"notes":"Partial support in IE10 refers the lack of pointerenter and pointerleave events. Firefox Nightly provides 'dom.w3c_pointer_events.enabled' option to support this specification starting with version 28.",
"notes_by_num":{
},
"usage_perc_y":8.74,
"usage_perc_a":1.97,
"ucprefix":false,
"parent":"",
"keywords":"pointerdown,pointermove,pointerup,pointercancel,pointerover,pointerout,pointerenter,pointerleave",
"ie_id":"pointerevents",
"chrome_id":"4504699138998272",
"shown":true
}
},{}],88:[function(require,module,exports){
module.exports={
"title":"text-decoration styling",
"description":"Method of defining the type, style and color of lines in the text-decoration property. These can be defined as shorthand (e.g. `text-decoration: line-through dashed blue`) or as single properties (e.g. `text-decoration-color: blue`)",
"spec":"http://www.w3.org/TR/css-text-decor-3/#line-decoration",
"status":"cr",
"links":[
{
"url":"https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-style",
"title":"MDN Documentation for text-decoration-style"
},
{
"url":"https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-color",
"title":"MDN Documentation for text-decoration-color"
},
{
"url":"https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-line",
"title":"MDN Documentation for text-decoration-line"
}
],
"bugs":[
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"TP":"n"
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
"4":"n",
"5":"n",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y",
"37":"y",
"38":"y"
},
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n x d #1",
"27":"n x d #1",
"28":"n x d #1",
"29":"n x d #1",
"30":"n x d #1",
"31":"n x d #1",
"32":"n x d #1",
"33":"n x d #1",
"34":"n x d #1",
"35":"n x d #1",
"36":"n x d #1",
"37":"n x d #1",
"38":"n x d #1",
"39":"n x d #1",
"40":"n x d #1",
"41":"n x d #1",
"42":"n x d #1",
"43":"n x d #1"
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
"5.1":"n",
"6":"n",
"6.1":"n",
"7":"n",
"7.1":"a x #2",
"8":"a x #2"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n"
},
"ios_saf":{
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"n",
"7.0-7.1":"n",
"8":"a x #2",
"8.1":"a x #2"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
"4.4":"n",
"4.4.3-4.4.4":"n",
"37":"n"
},
"bb":{
"7":"n",
"10":"n"
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
"24":"n"
},
"and_chr":{
"40":"n"
},
"and_ff":{
"33":"y x"
},
"ie_mob":{
"10":"n",
"11":"n"
},
"and_uc":{
"9.9":"n"
}
},
"notes":"All browsers support the CSS2 version of `text-decoration`, which matches only the `text-decoration-line` values (`underline`, etc.)",
"notes_by_num":{
"1":"Enabled in Chrome through the \"experimental Web Platform features\" flag in chrome://flags",
"2":"Partial support in Safari refers to not supporting the text-decoration-style property."
},
"usage_perc_y":11.83,
"usage_perc_a":6.79,
"ucprefix":false,
"parent":"",
"keywords":"text-decoration-line,text-decoration-style,text-decoration-color",
"ie_id":"",
"chrome_id":"",
"shown":true
}
},{}],89:[function(require,module,exports){
module.exports={
"title":"text-emphasis styling",
"description":"Method of using small symbols next to each glyph to emphasize a run of text, commonly used in East Asian languages. The `text-emphasis` shorthand, and its `text-emphasis-style` and `text-emphasis-color` longhands, can be used to apply marks to the text. The `text-emphasis-position` property, which inherits separately, allows setting the emphasis marks' position with respect to the text.",
"spec":"http://www.w3.org/TR/css-text-decor-3/#text-emphasis",
"status":"cr",
"links":[
{
"url":"https://github.com/zmmbreeze/jquery.emphasis/",
"title":"A javascript fallback for CSS3 emphasis mark."
}
],
"bugs":[
{
"description":"Chrome on Android occasionally has issues rendering emphasis glyphs correctly."
}
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"TP":"n"
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n",
"30":"n",
"31":"n",
"32":"n",
"33":"n",
"34":"n",
"35":"n",
"36":"n",
"37":"n",
"38":"n"
},
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"a x #1",
"26":"a x #1",
"27":"a x #1",
"28":"a x #1",
"29":"a x #1",
"30":"a x #1",
"31":"a x #1",
"32":"a x #1",
"33":"a x #1",
"34":"a x #1",
"35":"a x #1",
"36":"a x #1",
"37":"a x #1",
"38":"a x #1",
"39":"a x #1",
"40":"a x #1",
"41":"a x #1",
"42":"a x #1",
"43":"a x #1"
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
"5.1":"n",
"6":"n",
"6.1":"a x #1",
"7":"a x #1",
"7.1":"y",
"8":"y"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
"15":"a x #1",
"16":"a x #1",
"17":"a x #1",
"18":"a x #1",
"19":"a x #1",
"20":"a x #1",
"21":"a x #1",
"22":"a x #1",
"23":"a x #1",
"24":"a x #1",
"25":"a x #1",
"26":"a x #1",
"27":"a x #1",
"28":"a x #1",
"29":"a x #1"
},
"ios_saf":{
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"n",
"6.0-6.1":"n",
"7.0-7.1":"y",
"8":"y",
"8.1":"y"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
"4.4":"a x #1",
"4.4.3-4.4.4":"a x #1",
"37":"a x #1"
},
"bb":{
"7":"u",
"10":"u"
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
"24":"a x #1"
},
"and_chr":{
"40":"a x #1"
},
"and_ff":{
"33":"n"
},
"ie_mob":{
"10":"n",
"11":"n"
},
"and_uc":{
"9.9":"a x #1"
}
},
"notes":"Some old webkit browsers (like Chrome 24) support `-webkit-text-emphasis`, but does not support CJK languages and is therefore considered unsupported.",
"notes_by_num":{
"1":"Partial support refers to incorrect support for `-webkit-text-emphasis-position`. These browsers support `over` and `under` as values, but not the added `left` and `right` values required by the spec."
},
"usage_perc_y":9.02,
"usage_perc_a":50.97,
"ucprefix":false,
"parent":"",
"keywords":"text-emphasis,text-emphasis-position,text-emphasis-style,text-emphasis-color",
"ie_id":"",
"chrome_id":"",
"shown":true
}
},{}],90:[function(require,module,exports){
module.exports={
"title":"CSS3 Text-overflow",
"description":"Append ellipsis when text overflows its containing element",
"spec":"http://www.w3.org/TR/css3-ui/#text-overflow0",
"status":"wd",
"links":[
{
"url":"https://github.com/rmorse/AutoEllipsis",
"title":"jQuery polyfill for Firefox"
},
{
"url":"https://developer.mozilla.org/En/CSS/Text-overflow",
"title":"MDN article"
},
{
"url":"http://www.css3files.com/text/",
"title":"Information page"
},
{
"url":"https://raw.github.com/phiggins42/has.js/master/detect/css.js#css-text-overflow",
"title":"has.js test"
},
{
"url":"http://docs.webplatform.org/wiki/css/properties/text-overflow",
"title":"WebPlatform Docs"
}
],
"bugs":[
{
"description":"Does not work on `select` elements work in Chrome and IE, only Firefox."
},
{
"description":"Some Samsung-based browsers, have a bug with overflowing text when ellipsis is set and if `text-rendering` is not `auto`."
}
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"y",
"7":"y",
"8":"y",
"9":"y",
"10":"y",
"11":"y",
"TP":"y"
},
"firefox":{
"2":"p",
"3":"p",
"3.5":"p",
"3.6":"p",
"4":"p",
"5":"p",
"6":"p",
"7":"y",
"8":"y",
"9":"y",
"10":"y",
"11":"y",
"12":"y",
"13":"y",
"14":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y"
},
"chrome":{
"4":"y",
"5":"y",
"6":"y",
"7":"y",
"8":"y",
"9":"y",
"10":"y",
"11":"y",
"12":"y",
"13":"y",
"14":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
"41":"y",
"42":"y",
"43":"y"
},
"safari":{
"3.1":"y",
"3.2":"y",
"4":"y",
"5":"y",
"5.1":"y",
"6":"y",
"6.1":"y",
"7":"y",
"7.1":"y",
"8":"y"
},
"opera":{
"9":"y x",
"9.5-9.6":"y x",
"10.0-10.1":"y x",
"10.5":"y x",
"10.6":"y x",
"11":"y",
"11.1":"y",
"11.5":"y",
"11.6":"y",
"12":"y",
"12.1":"y",
"15":"y",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y"
},
"ios_saf":{
"3.2":"y",
"4.0-4.1":"y",
"4.2-4.3":"y",
"5.0-5.1":"y",
"6.0-6.1":"y",
"7.0-7.1":"y",
"8":"y",
"8.1":"y"
},
"op_mini":{
"5.0-8.0":"y"
},
"android":{
"2.1":"y",
"2.2":"y",
"2.3":"y",
"3":"y",
"4":"y",
"4.1":"y",
"4.2-4.3":"y",
"4.4":"y",
"4.4.3-4.4.4":"y",
"37":"y"
},
"bb":{
"7":"y",
"10":"y"
},
"op_mob":{
"10":"y x",
"11":"y x",
"11.1":"y x",
"11.5":"y x",
"12":"y x",
"12.1":"y",
"24":"y"
},
"and_chr":{
"40":"y"
},
"and_ff":{
"33":"y"
},
"ie_mob":{
"10":"y",
"11":"y"
},
"and_uc":{
"9.9":"y"
}
},
"notes":"",
"notes_by_num":{
},
"usage_perc_y":96.91,
"usage_perc_a":0,
"ucprefix":false,
"parent":"",
"keywords":"textoverflow,ellipsis",
"ie_id":"",
"chrome_id":"",
"shown":true
}
},{}],91:[function(require,module,exports){
module.exports={
"title":"CSS text-size-adjust",
"description":"On mobile devices, the text-size-adjust CSS property allows Web authors to control if and how the text-inflating algorithm is applied to the textual content of the element it is applied to.",
"spec":"http://dev.w3.org/csswg/css-size-adjust/",
"status":"wd",
"links":[
{
"url":"https://developer.mozilla.org/en-US/docs/Web/CSS/text-size-adjust",
"title":"MDN Docs"
}
],
"bugs":[
{
"description":"There is a bug in Webkit-based desktop browsers. If -webkit-text-size-adjust is explicitely set to none, Webkit-based desktop browsers, like Chrome or Safari, instead of ignoring the property, will prevent the user to zoom in or out the Web page."
},
{
"description":"If the viewport in IE Phone is set using <meta> element, the value of the CSS text-size-adjust property is ignored."
}
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"TP":"n"
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n",
"30":"n",
"31":"n",
"32":"n",
"33":"n",
"34":"n",
"35":"n",
"36":"n",
"37":"n",
"38":"n"
},
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"n",
"13":"n",
"14":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n",
"30":"n",
"31":"n",
"32":"n",
"33":"n",
"34":"n",
"35":"n",
"36":"n",
"37":"n",
"38":"n",
"39":"n",
"40":"n",
"41":"n",
"42":"n",
"43":"n"
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"n",
"5":"n",
"5.1":"n",
"6":"n",
"6.1":"n",
"7":"n",
"7.1":"n",
"8":"n"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
"15":"n",
"16":"n",
"17":"n",
"18":"n",
"19":"n",
"20":"n",
"21":"n",
"22":"n",
"23":"n",
"24":"n",
"25":"n",
"26":"n",
"27":"n",
"28":"n",
"29":"n"
},
"ios_saf":{
"3.2":"n",
"4.0-4.1":"n",
"4.2-4.3":"n",
"5.0-5.1":"y x",
"6.0-6.1":"y x",
"7.0-7.1":"y x",
"8":"y x",
"8.1":"y x"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"n",
"4":"n",
"4.1":"n",
"4.2-4.3":"n",
"4.4":"n",
"4.4.3-4.4.4":"n",
"37":"n"
},
"bb":{
"7":"n",
"10":"n"
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
"24":"n"
},
"and_chr":{
"40":"n"
},
"and_ff":{
"33":"y x"
},
"ie_mob":{
"10":"y x",
"11":"y x"
},
"and_uc":{
"9.9":"y x"
}
},
"notes":"",
"notes_by_num":{
},
"usage_perc_y":12.32,
"usage_perc_a":0,
"ucprefix":false,
"parent":"",
"keywords":"",
"ie_id":"",
"chrome_id":"",
"shown":true
}
},{}],92:[function(require,module,exports){
module.exports={
"title":"CSS3 Transforms",
"description":"Method of transforming an element including rotating, scaling, etc.",
"spec":"http://www.w3.org/TR/css3-2d-transforms/",
"status":"wd",
"links":[
{
"url":"http://www.westciv.com/tools/transforms/",
"title":"Live editor"
},
{
"url":"https://developer.mozilla.org/en/CSS/-moz-transform",
"title":"MDN article"
},
{
"url":"http://www.webresourcesdepot.com/cross-browser-css-transforms-csssandpaper/",
"title":"Workaround script for IE"
},
{
"url":"http://www.css3files.com/transform/",
"title":"Information page"
},
{
"url":"http://www.useragentman.com/IETransformsTranslator/",
"title":"Converter for IE"
},
{
"url":"https://raw.github.com/phiggins42/has.js/master/detect/css.js#css-transform",
"title":"has.js test"
},
{
"url":"http://docs.webplatform.org/wiki/css/transforms/transform",
"title":"WebPlatform Docs"
}
],
"bugs":[
{
"description":"Scaling transforms in Android 2.3 fails to scale element background images."
},
{
"description":"IE 10 and below does not support CSS transforms on SVG elements (though SVG transform attributes do work)."
},
{
"description":"Transforms may break position:fixed styles of contained elements"
}
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"p",
"7":"p",
"8":"p",
"9":"y x",
"10":"y",
"11":"y",
"TP":"y"
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"y x",
"3.6":"y x",
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y"
},
"chrome":{
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
"41":"y",
"42":"y",
"43":"y"
},
"safari":{
"3.1":"y x",
"3.2":"y x",
"4":"y x",
"5":"y x",
"5.1":"y x",
"6":"y x",
"6.1":"y x",
"7":"y x",
"7.1":"y x",
"8":"y x"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"y x",
"10.6":"y x",
"11":"y x",
"11.1":"y x",
"11.5":"y x",
"11.6":"y x",
"12":"y x",
"12.1":"y",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y"
},
"ios_saf":{
"3.2":"y x",
"4.0-4.1":"y x",
"4.2-4.3":"y x",
"5.0-5.1":"y x",
"6.0-6.1":"y x",
"7.0-7.1":"y x",
"8":"y x",
"8.1":"y x"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"y x",
"2.2":"y x",
"2.3":"y x",
"3":"y x",
"4":"y x",
"4.1":"y x",
"4.2-4.3":"y x",
"4.4":"y x",
"4.4.3-4.4.4":"y x",
"37":"y"
},
"bb":{
"7":"y x",
"10":"y x"
},
"op_mob":{
"10":"n",
"11":"y",
"11.1":"y",
"11.5":"y",
"12":"y",
"12.1":"y",
"24":"y"
},
"and_chr":{
"40":"y"
},
"and_ff":{
"33":"y"
},
"ie_mob":{
"10":"y",
"11":"y"
},
"and_uc":{
"9.9":"y x"
}
},
"notes":"The scale transform can be emulated in IE < 9 using Microsoft's \"zoom\" extension, others are (not easily) possible using the MS Matrix filter",
"notes_by_num":{
},
"usage_perc_y":89.64,
"usage_perc_a":0,
"ucprefix":false,
"parent":"",
"keywords":"transformation,translate,rotation,rotate,scale,css-transforms",
"ie_id":"transforms",
"chrome_id":"6437640580628480",
"shown":true
}
},{}],93:[function(require,module,exports){
module.exports={
"title":"CSS3 3D Transforms",
"description":"Method of transforming an element in the third dimension using the `transform` property. Includes support for the `perspective` property to set the perspective in z-space and the `backface-visibility` property to toggle display of the reverse side of a 3D-transformed element.",
"spec":"http://www.w3.org/TR/css3-3d-transforms/",
"status":"wd",
"links":[
{
"url":"http://css3.bradshawenterprises.com/flip/",
"title":"Multi-browser demo"
},
{
"url":"http://hacks.mozilla.org/2011/10/css-3d-transformations-in-firefox-nightly/",
"title":"Mozilla hacks article"
},
{
"url":"http://thewebrocks.com/demos/3D-css-tester/",
"title":"3D CSS Tester"
},
{
"url":"https://raw.github.com/phiggins42/has.js/master/detect/css.js#css-transform",
"title":"has.js test"
},
{
"url":"http://docs.webplatform.org/wiki/css/transforms/transform",
"title":"WebPlatform Docs"
},
{
"url":"http://desandro.github.io/3dtransforms/",
"title":"Intro to CSS 3D transforms"
}
],
"bugs":[
{
"description":"Some configurations of Linux and older Windows machines (those without WebGL support) have trouble with 3D transforms and will treat them as if `perspective` was set as `none`."
},
{
"description":"Firefox on Windows [incorrectly renders plugin content within no-op 3D transforms](https://bugzilla.mozilla.org/show_bug.cgi?id=1048279)."
}
],
"categories":[
"CSS3"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"a",
"11":"a",
"TP":"y"
},
"firefox":{
"2":"n",
"3":"n",
"3.5":"n",
"3.6":"n",
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y",
"17":"y",
"18":"y",
"19":"y",
"20":"y",
"21":"y",
"22":"y",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y",
"30":"y",
"31":"y",
"32":"y",
"33":"y",
"34":"y",
"35":"y",
"36":"y",
"37":"y",
"38":"y"
},
"chrome":{
"4":"n",
"5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"n",
"11":"n",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y",
"37":"y",
"38":"y",
"39":"y",
"40":"y",
"41":"y",
"42":"y",
"43":"y"
},
"safari":{
"3.1":"n",
"3.2":"n",
"4":"y x",
"5":"y x",
"5.1":"y x",
"6":"y x",
"6.1":"y x",
"7":"y x",
"7.1":"y x",
"8":"y x"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y",
"24":"y",
"25":"y",
"26":"y",
"27":"y",
"28":"y",
"29":"y"
},
"ios_saf":{
"3.2":"y x",
"4.0-4.1":"y x",
"4.2-4.3":"y x",
"5.0-5.1":"y x",
"6.0-6.1":"y x",
"7.0-7.1":"y x",
"8":"y x",
"8.1":"y x"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"n",
"2.2":"n",
"2.3":"n",
"3":"y x",
"4":"y x",
"4.1":"y x",
"4.2-4.3":"y x",
"4.4":"y x",
"4.4.3-4.4.4":"y x",
"37":"y"
},
"bb":{
"7":"y x",
"10":"y x"
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
"24":"y"
},
"and_chr":{
"40":"y"
},
"and_ff":{
"33":"y"
},
"ie_mob":{
"10":"a",
"11":"a"
},
"and_uc":{
"9.9":"y x"
}
},
"notes":"Partial support in IE refers to not supporting [the transform-style: preserve-3d property](http://msdn.microsoft.com/en-us/library/ie/hh673529%28v=vs.85%29.aspx#the_ms_transform_style_property). This prevents nesting 3D transformed elements.",
"notes_by_num":{
},
"usage_perc_y":75.88,
"usage_perc_a":10.71,
"ucprefix":false,
"parent":"",
"keywords":"css 3d,3dtransforms,translate3d,backface visibility,perspective",
"ie_id":"transforms,csstransformspreserve3d",
"chrome_id":"6437640580628480",
"shown":true
}
},{}],94:[function(require,module,exports){
module.exports={
"title":"CSS user-select: none",
"description":"Method of preventing text/element selection using CSS. ",
"spec":"https://developer.mozilla.org/en-US/docs/CSS/user-select",
"status":"unoff",
"links":[
{
"url":"https://developer.mozilla.org/en-US/docs/CSS/user-select",
"title":"MDN article"
},
{
"url":"http://css-tricks.com/almanac/properties/u/user-select/",
"title":"CSS Tricks article"
},
{
"url":"http://msdn.microsoft.com/en-us/library/ie/hh781492(v=vs.85).aspx",
"title":"MSDN Documentation"
}
],
"bugs":[
],
"categories":[
"CSS"
],
"stats":{
"ie":{
"5.5":"n",
"6":"n",
"7":"n",
"8":"n",
"9":"n",
"10":"y x",
"11":"y x",
"TP":"y x"
},
"firefox":{
"2":"y x",
"3":"y x",
"3.5":"y x",
"3.6":"y x",
"4":"y x",
"5":"y x",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y x",
"37":"y x",
"38":"y x"
},
"chrome":{
"4":"u",
"5":"u",
"6":"y x",
"7":"y x",
"8":"y x",
"9":"y x",
"10":"y x",
"11":"y x",
"12":"y x",
"13":"y x",
"14":"y x",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x",
"30":"y x",
"31":"y x",
"32":"y x",
"33":"y x",
"34":"y x",
"35":"y x",
"36":"y x",
"37":"y x",
"38":"y x",
"39":"y x",
"40":"y x",
"41":"y x",
"42":"y x",
"43":"y x"
},
"safari":{
"3.1":"y x",
"3.2":"y x",
"4":"y x",
"5":"y x",
"5.1":"y x",
"6":"y x",
"6.1":"y x",
"7":"y x",
"7.1":"y x",
"8":"y x"
},
"opera":{
"9":"n",
"9.5-9.6":"n",
"10.0-10.1":"n",
"10.5":"n",
"10.6":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"11.6":"n",
"12":"n",
"12.1":"n",
"15":"y x",
"16":"y x",
"17":"y x",
"18":"y x",
"19":"y x",
"20":"y x",
"21":"y x",
"22":"y x",
"23":"y x",
"24":"y x",
"25":"y x",
"26":"y x",
"27":"y x",
"28":"y x",
"29":"y x"
},
"ios_saf":{
"3.2":"y x",
"4.0-4.1":"y x",
"4.2-4.3":"y x",
"5.0-5.1":"y x",
"6.0-6.1":"y x",
"7.0-7.1":"y x",
"8":"y x",
"8.1":"y x"
},
"op_mini":{
"5.0-8.0":"n"
},
"android":{
"2.1":"y x",
"2.2":"y x",
"2.3":"y x",
"3":"y x",
"4":"y x",
"4.1":"y x",
"4.2-4.3":"y x",
"4.4":"y x",
"4.4.3-4.4.4":"y x",
"37":"y x"
},
"bb":{
"7":"y x",
"10":"y x"
},
"op_mob":{
"10":"n",
"11":"n",
"11.1":"n",
"11.5":"n",
"12":"n",
"12.1":"n",
"24":"y x"
},
"and_chr":{
"40":"y x"
},
"and_ff":{
"33":"y x"
},
"ie_mob":{
"10":"y x",
"11":"y x"
},
"and_uc":{
"9.9":"y x"
}
},
"notes":"Currently the user-select property does not appear in any W3C specification. Support information here is only for \"none\" value, not others.",
"notes_by_num":{
},
"usage_perc_y":87.2,
"usage_perc_a":0,
"ucprefix":false,
"parent":"",
"keywords":"",
"ie_id":"",
"chrome_id":"",
"shown":true
}
},{}],95:[function(require,module,exports){
//????? Greatest Common Divisor
function GCD(a, b) {
if (b === 0) return a
return GCD(b, a % b)
}
function num2fraction(num) {
if (num === 0) return 0
if (typeof num === 'string') {
num = parseFloat(num)
}
var precision = 100000000 //???
var number = num * precision
var gcd = GCD(number, precision)
//??
var numerator = number / gcd
//??
var denominator = precision / gcd
//??
return numerator + '/' + denominator
}
module.exports = num2fraction
},{}],96:[function(require,module,exports){
"use strict";
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
var Container = require("./container");
// CSS at-rule like <20>this.keyframes name { }<7D>.
//
// Can contain declarations (like this.font-face or this.page) ot another rules.
var AtRule = (function (Container) {
function AtRule(defaults) {
this.type = "atrule";
Container.call(this, defaults);
}
_inherits(AtRule, Container);
// Stringify at-rule
AtRule.prototype.stringify = function stringify(builder, semicolon) {
var name = "@" + this.name;
var params = this.params ? this.stringifyRaw("params") : "";
if (typeof this.afterName != "undefined") {
name += this.afterName;
} else if (params) {
name += " ";
}
if (this.nodes) {
this.stringifyBlock(builder, name + params);
} else {
var before = this.style("before");
if (before) builder(before);
var end = (this.between || "") + (semicolon ? ";" : "");
builder(name + params + end, this);
}
};
// Hack to mark, that at-rule contains children
AtRule.prototype.append = function append(child) {
if (!this.nodes) this.nodes = [];
return Container.prototype.append.call(this, child);
};
// Hack to mark, that at-rule contains children
AtRule.prototype.prepend = function prepend(child) {
if (!this.nodes) this.nodes = [];
return Container.prototype.prepend.call(this, child);
};
// Hack to mark, that at-rule contains children
AtRule.prototype.insertBefore = function insertBefore(exist, add) {
if (!this.nodes) this.nodes = [];
return Container.prototype.insertBefore.call(this, exist, add);
};
// Hack to mark, that at-rule contains children
AtRule.prototype.insertAfter = function insertAfter(exist, add) {
if (!this.nodes) this.nodes = [];
return Container.prototype.insertAfter.call(this, exist, add);
};
return AtRule;
})(Container);
module.exports = AtRule;
},{"./container":98}],97:[function(require,module,exports){
"use strict";
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
var Node = require("./node");
// CSS comment between declarations or rules
var Comment = (function (Node) {
function Comment(defaults) {
this.type = "comment";
Node.call(this, defaults);
}
_inherits(Comment, Node);
// Stringify declaration
Comment.prototype.stringify = function stringify(builder) {
var before = this.style("before");
if (before) builder(before);
var left = this.style("left", "commentLeft");
var right = this.style("right", "commentRight");
builder("/*" + left + this.text + right + "*/", this);
};
return Comment;
})(Node);
module.exports = Comment;
},{"./node":104}],98:[function(require,module,exports){
"use strict";
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
var Node = require("./node");
var Comment = require("./comment");
var Declaration = require("./declaration");
// CSS node, that contain another nodes (like at-rules or rules with selectors)
var Container = (function (Node) {
function Container() {
if (Node != null) {
Node.apply(this, arguments);
}
}
_inherits(Container, Node);
// Stringify container children
Container.prototype.stringifyContent = function stringifyContent(builder) {
if (!this.nodes) return;
var i,
last = this.nodes.length - 1;
while (last > 0) {
if (this.nodes[last].type != "comment") break;
last -= 1;
}
var semicolon = this.style("semicolon");
for (i = 0; i < this.nodes.length; i++) {
this.nodes[i].stringify(builder, last != i || semicolon);
}
};
// Stringify node with start (for example, selector) and brackets block
// with child inside
Container.prototype.stringifyBlock = function stringifyBlock(builder, start) {
var before = this.style("before");
if (before) builder(before);
var between = this.style("between", "beforeOpen");
builder(start + between + "{", this, "start");
var after;
if (this.nodes && this.nodes.length) {
this.stringifyContent(builder);
after = this.style("after");
} else {
after = this.style("after", "emptyBody");
}
if (after) builder(after);
builder("}", this, "end");
};
// Add child to end of list without any checks.
// Please, use `append()` method, `push()` is mostly for parser.
Container.prototype.push = function push(child) {
child.parent = this;
this.nodes.push(child);
return this;
};
// Execute `callback` on every child element. First arguments will be child
// node, second will be index.
//
// css.each( (rule, i) => {
// console.log(rule.type + ' at ' + i);
// });
//
// It is safe for add and remove elements to list while iterating:
//
// css.each( (rule) => {
// css.insertBefore( rule, addPrefix(rule) );
// # On next iteration will be next rule, regardless of that
// # list size was increased
// });
Container.prototype.each = function each(callback) {
if (!this.lastEach) this.lastEach = 0;
if (!this.indexes) this.indexes = {};
this.lastEach += 1;
var id = this.lastEach;
this.indexes[id] = 0;
if (!this.nodes) return;
2014-11-03 14:32:38 +01:00
var index, result;
2015-01-30 14:24:39 +01:00
while (this.indexes[id] < this.nodes.length) {
index = this.indexes[id];
result = callback(this.nodes[index], index);
if (result === false) break;
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
this.indexes[id] += 1;
2014-11-03 14:32:38 +01:00
}
delete this.indexes[id];
2014-11-20 07:04:47 +01:00
if (result === false) return false;
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Execute callback on every child in all rules inside.
//
// First argument will be child node, second will be index inside parent.
//
// css.eachInside( (node, i) => {
// console.log(node.type + ' at ' + i);
// });
//
// Also as `each` it is safe of insert/remove nodes inside iterating.
Container.prototype.eachInside = function eachInside(callback) {
2014-11-20 07:04:47 +01:00
return this.each(function (child, i) {
2015-01-30 14:24:39 +01:00
var result = callback(child, i);
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (result !== false && child.eachInside) {
result = child.eachInside(callback);
}
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
if (result === false) return result;
2014-11-03 14:32:38 +01:00
});
2015-01-30 14:24:39 +01:00
};
// Execute callback on every declaration in all rules inside.
// It will goes inside at-rules recursivelly.
//
// First argument will be declaration node, second will be index inside
// parent rule.
//
// css.eachDecl( (decl, i) => {
// console.log(decl.prop + ' in ' + decl.parent.selector + ':' + i);
// });
//
// Also as `each` it is safe of insert/remove nodes inside iterating.
//
// You can filter declrataion by property name:
//
// css.eachDecl('background', (decl) => { });
Container.prototype.eachDecl = function eachDecl(prop, callback) {
if (!callback) {
callback = prop;
return this.eachInside(function (child, i) {
if (child.type == "decl") {
var result = callback(child, i);
if (result === false) return result;
}
});
} else if (prop instanceof RegExp) {
return this.eachInside(function (child, i) {
if (child.type == "decl" && prop.test(child.prop)) {
var result = callback(child, i);
if (result === false) return result;
}
});
} else {
return this.eachInside(function (child, i) {
if (child.type == "decl" && child.prop == prop) {
var result = callback(child, i);
if (result === false) return result;
}
});
}
};
// Execute `callback` on every rule in conatiner and inside child at-rules.
//
// First argument will be rule node, second will be index inside parent.
//
// css.eachRule( (rule, i) => {
// if ( parent.type == 'atrule' ) {
// console.log(rule.selector + ' in ' + rule.parent.name);
// } else {
// console.log(rule.selector + ' at ' + i);
// }
// });
Container.prototype.eachRule = function eachRule(callback) {
2014-11-20 07:04:47 +01:00
return this.eachInside(function (child, i) {
2015-01-30 14:24:39 +01:00
if (child.type == "rule") {
var result = callback(child, i);
if (result === false) return result;
}
2014-11-20 07:04:47 +01:00
});
2015-01-30 14:24:39 +01:00
};
// Execute `callback` on every at-rule in conatiner and inside at-rules.
//
// First argument will be at-rule node, second will be index inside parent.
//
// css.eachAtRule( (atrule, parent, i) => {
// if ( parent.type == 'atrule' ) {
// console.log(atrule.name + ' in ' + atrule.parent.name);
// } else {
// console.log(atrule.name + ' at ' + i);
// }
// });
//
// You can filter at-rules by name:
//
// css.eachAtRule('keyframes', (atrule) => { });
Container.prototype.eachAtRule = function eachAtRule(name, callback) {
if (!callback) {
callback = name;
return this.eachInside(function (child, i) {
if (child.type == "atrule") {
var result = callback(child, i);
if (result === false) return result;
}
});
} else if (name instanceof RegExp) {
return this.eachInside(function (child, i) {
if (child.type == "atrule" && name.test(child.name)) {
var result = callback(child, i);
if (result === false) return result;
}
});
} else {
return this.eachInside(function (child, i) {
if (child.type == "atrule" && child.name == name) {
var result = callback(child, i);
if (result === false) return result;
}
});
}
};
// Execute callback on every block comment (only between rules
// and declarations, not inside selectors and values) in all rules inside.
//
// First argument will be comment node, second will be index inside
// parent rule.
//
// css.eachComment( (comment, i) => {
// console.log(comment.content + ' at ' + i);
// });
//
// Also as `each` it is safe of insert/remove nodes inside iterating.
Container.prototype.eachComment = function eachComment(callback) {
2014-11-20 07:04:47 +01:00
return this.eachInside(function (child, i) {
2015-01-30 14:24:39 +01:00
if (child.type == "comment") {
var result = callback(child, i);
if (result === false) return result;
}
2014-11-20 07:04:47 +01:00
});
2015-01-30 14:24:39 +01:00
};
// Add child to container.
//
// css.append(rule);
//
// You can add declaration by hash:
//
// rule.append({ prop: 'color', value: 'black' });
Container.prototype.append = function append(child) {
var nodes = this.normalize(child, this.last);
for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var node;
if (_isArray) {
if (_i >= _iterator.length) break;
node = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
node = _i.value;
}
this.nodes.push(node);
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
2014-11-03 14:32:38 +01:00
return this;
2015-01-30 14:24:39 +01:00
};
// Add child to beginning of container
//
// css.prepend(rule);
//
// You can add declaration by hash:
//
// rule.prepend({ prop: 'color', value: 'black' });
Container.prototype.prepend = function prepend(child) {
var nodes = this.normalize(child, this.first, "prepend").reverse();
for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var node;
if (_isArray) {
if (_i >= _iterator.length) break;
node = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
node = _i.value;
}
this.nodes.unshift(node);
2014-11-20 07:04:47 +01:00
}
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
for (var id in this.indexes) {
2015-01-30 14:24:39 +01:00
this.indexes[id] = this.indexes[id] + nodes.length;
2014-11-03 14:32:38 +01:00
}
return this;
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Insert new `added` child before `exist`.
// You can set node object or node index (it will be faster) in `exist`.
//
// css.insertAfter(1, rule);
//
// You can add declaration by hash:
//
// rule.insertBefore(1, { prop: 'color', value: 'black' });
Container.prototype.insertBefore = function insertBefore(exist, add) {
2014-11-03 14:32:38 +01:00
exist = this.index(exist);
2014-11-20 07:04:47 +01:00
var type = exist === 0 ? "prepend" : false;
2015-01-30 14:24:39 +01:00
var nodes = this.normalize(add, this.nodes[exist], type).reverse();
for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var node;
if (_isArray) {
if (_i >= _iterator.length) break;
node = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
node = _i.value;
}
this.nodes.splice(exist, 0, node);
2014-11-20 07:04:47 +01:00
}
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var index;
for (var id in this.indexes) {
2015-01-30 14:24:39 +01:00
index = this.indexes[id];
if (exist <= index) {
this.indexes[id] = index + nodes.length;
}
2014-11-03 14:32:38 +01:00
}
return this;
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Insert new `added` child after `exist`.
// You can set node object or node index (it will be faster) in `exist`.
//
// css.insertAfter(1, rule);
//
// You can add declaration by hash:
//
// rule.insertAfter(1, { prop: 'color', value: 'black' });
Container.prototype.insertAfter = function insertAfter(exist, add) {
2014-11-03 14:32:38 +01:00
exist = this.index(exist);
2015-01-30 14:24:39 +01:00
var nodes = this.normalize(add, this.nodes[exist]).reverse();
for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var node;
if (_isArray) {
if (_i >= _iterator.length) break;
node = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
node = _i.value;
}
this.nodes.splice(exist + 1, 0, node);
2014-11-20 07:04:47 +01:00
}
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var index;
for (var id in this.indexes) {
2015-01-30 14:24:39 +01:00
index = this.indexes[id];
if (exist < index) {
this.indexes[id] = index + nodes.length;
}
2014-11-03 14:32:38 +01:00
}
return this;
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Remove `child` by index or node.
//
// css.remove(2);
Container.prototype.remove = function remove(child) {
2014-11-03 14:32:38 +01:00
child = this.index(child);
2015-01-30 14:24:39 +01:00
this.nodes[child].parent = undefined;
this.nodes.splice(child, 1);
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var index;
for (var id in this.indexes) {
2015-01-30 14:24:39 +01:00
index = this.indexes[id];
if (index >= child) {
this.indexes[id] = index - 1;
}
2014-11-03 14:32:38 +01:00
}
return this;
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Remove all children in node.
//
// css.removeAll();
Container.prototype.removeAll = function removeAll() {
for (var _iterator = this.nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var node;
if (_isArray) {
if (_i >= _iterator.length) break;
node = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
node = _i.value;
}
node.parent = undefined;
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
this.nodes = [];
return this;
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Recursivelly check all declarations inside node and replace
// `regexp` by `callback`.
//
// css.replaceValues('black', '#000');
//
// Argumets `regexp` and `callback` is same as in `String#replace()`.
//
// You can speed up checks by `props` and `fast` options:
//
// css.replaceValues(/\d+rem/, { fast: 'rem', props: ['width'] },
// function (str) {
// return (14 * parseInt(str)) + 'px';
// })
Container.prototype.replaceValues = function replaceValues(regexp, opts, callback) {
if (!callback) {
callback = opts;
opts = {};
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
this.eachDecl(function (decl) {
if (opts.props && opts.props.indexOf(decl.prop) == -1) return;
if (opts.fast && decl.value.indexOf(opts.fast) == -1) return;
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
decl.value = decl.value.replace(regexp, callback);
});
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
return this;
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Return true if all nodes return true in `condition`.
// Just shorcut for `nodes.every`.
Container.prototype.every = function every(condition) {
return this.nodes.every(condition);
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Return true if one or more nodes return true in `condition`.
// Just shorcut for `nodes.some`.
Container.prototype.some = function some(condition) {
return this.nodes.some(condition);
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Return index of child
Container.prototype.index = function index(child) {
if (typeof child == "number") {
return child;
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
return this.nodes.indexOf(child);
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Normalize child before insert. Copy before from `sample`.
Container.prototype.normalize = function normalize(nodes, sample) {
var _this = this;
if (!Array.isArray(nodes)) {
if (nodes.type == "root") {
nodes = nodes.nodes;
} else if (nodes.type) {
nodes = [nodes];
} else if (nodes.prop) {
nodes = [new Declaration(nodes)];
} else if (nodes.selector) {
var Rule = require("./rule");
nodes = [new Rule(nodes)];
} else if (nodes.name) {
var AtRule = require("./at-rule");
nodes = [new AtRule(nodes)];
} else if (nodes.text) {
nodes = [new Comment(nodes)];
}
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
var processed = nodes.map(function (child) {
if (child.parent) child = child.clone();
if (typeof child.before == "undefined") {
if (sample && typeof sample.before != "undefined") {
child.before = sample.before.replace(/[^\s]/g, "");
}
}
child.parent = _this;
return child;
});
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
return processed;
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
_prototypeProperties(Container, null, {
first: {
// Shortcut to get first child
get: function () {
if (!this.nodes) return undefined;
return this.nodes[0];
},
enumerable: true,
configurable: true
},
last: {
// Shortcut to get first child
get: function () {
if (!this.nodes) return undefined;
return this.nodes[this.nodes.length - 1];
},
enumerable: true,
configurable: true
}
});
return Container;
})(Node);
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
module.exports = Container;
2015-01-30 14:24:39 +01:00
},{"./at-rule":96,"./comment":97,"./declaration":100,"./node":104,"./rule":111}],99:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
(function (process){
"use strict";
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var PreviousMap = require("./previous-map");
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var path = require("path");
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Error while CSS parsing
var CssSyntaxError = (function (SyntaxError) {
function CssSyntaxError(message, line, column, source, file) {
this.reason = message;
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
this.message = file ? file : "<css input>";
if (typeof line != "undefined" && typeof column != "undefined") {
this.line = line;
this.column = column;
this.message += ":" + line + ":" + column + ": " + message;
} else {
this.message += ": " + message;
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (file) this.file = file;
if (source) this.source = source;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (Error.captureStackTrace) {
Error.captureStackTrace(this, CssSyntaxError);
}
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
_inherits(CssSyntaxError, SyntaxError);
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Return source of broken lines
CssSyntaxError.prototype.highlight = function highlight(color) {
2014-11-20 07:04:47 +01:00
var num = this.line - 1;
var lines = this.source.split("\n");
var prev = num > 0 ? lines[num - 1] + "\n" : "";
2014-11-03 14:32:38 +01:00
var broken = lines[num];
2014-11-20 07:04:47 +01:00
var next = num < lines.length - 1 ? "\n" + lines[num + 1] : "";
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var mark = "\n";
for (var i = 0; i < this.column - 1; i++) {
2015-01-30 14:24:39 +01:00
mark += " ";
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
if (typeof color == "undefined" && typeof process != "undefined") {
if (process.stdout && process.env) {
color = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS;
}
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
if (color) {
2015-01-30 14:24:39 +01:00
mark += "\u001b[1;31m^\u001b[0m";
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
mark += "^";
2014-11-03 14:32:38 +01:00
}
return prev + broken + mark + next;
2015-01-30 14:24:39 +01:00
};
CssSyntaxError.prototype.setMozillaProps = function setMozillaProps() {
var sample = Error.call(this, message);
if (sample.columnNumber) this.columnNumber = this.column;
if (sample.description) this.description = this.message;
if (sample.lineNumber) this.lineNumber = this.line;
if (sample.fileName) this.fileName = this.file;
};
CssSyntaxError.prototype.toString = function toString() {
2014-11-20 07:04:47 +01:00
var text = this.message;
if (this.source) text += "\n" + this.highlight();
2015-01-30 14:24:39 +01:00
return this.name + ": " + text;
};
return CssSyntaxError;
})(SyntaxError);
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
CssSyntaxError.prototype.name = "CssSyntaxError";
2014-11-03 14:32:38 +01:00
module.exports = CssSyntaxError;
}).call(this,require('_process'))
2015-01-30 14:24:39 +01:00
},{"./previous-map":108,"_process":54,"path":53}],100:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var Node = require("./node");
var vendor = require("./vendor");
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// CSS declaration like <20>color: black<63> in rules
2014-11-20 07:04:47 +01:00
var Declaration = (function (Node) {
2015-01-30 14:24:39 +01:00
function Declaration(defaults) {
this.type = "decl";
Node.call(this, defaults);
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
_inherits(Declaration, Node);
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Stringify declaration
Declaration.prototype.stringify = function stringify(builder, semicolon) {
var before = this.style("before");
2014-11-20 07:04:47 +01:00
if (before) builder(before);
2015-01-30 14:24:39 +01:00
var between = this.style("between", "colon");
2014-11-20 07:04:47 +01:00
var string = this.prop + between + this.stringifyRaw("value");
if (this.important) {
2015-01-30 14:24:39 +01:00
string += this._important || " !important";
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
if (semicolon) string += ";";
2014-11-03 14:32:38 +01:00
builder(string, this);
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
return Declaration;
2014-11-20 07:04:47 +01:00
})(Node);
2014-11-03 14:32:38 +01:00
module.exports = Declaration;
2015-01-30 14:24:39 +01:00
},{"./node":104,"./vendor":113}],101:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var CssSyntaxError = require("./css-syntax-error");
var PreviousMap = require("./previous-map");
var Parser = require("./parser");
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var path = require("path");
var sequence = 0;
var Input = (function () {
2015-01-30 14:24:39 +01:00
function Input(css) {
var opts = arguments[1] === undefined ? {} : arguments[1];
this.css = css.toString();
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (this.css[0] == "?" || this.css[0] == "?") {
this.css = this.css.slice(1);
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
this.safe = !!opts.safe;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (opts.from) this.file = path.resolve(opts.from);
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
var map = new PreviousMap(this.css, opts, this.id);
if (map.text) {
this.map = map;
var file = map.consumer().file;
if (!this.file && file) this.file = this.mapResolve(file);
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
if (this.file) {
this.from = this.file;
} else {
sequence += 1;
this.id = "<input css " + sequence + ">";
this.from = this.id;
}
if (this.map) this.map.file = this.from;
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
// Throw syntax error from this input
Input.prototype.error = function error(message, line, column) {
var error = new CssSyntaxError(message);
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
var origin = this.origin(line, column);
if (origin) {
error = new CssSyntaxError(message, origin.line, origin.column, origin.source, origin.file);
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
error.generated = {
line: line,
column: column,
source: this.css
};
if (this.file) error.generated.file = this.file;
} else {
error = new CssSyntaxError(message, line, column, this.css, this.file);
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
return error;
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Get origin position of code if source map was given
Input.prototype.origin = function origin(line, column) {
2014-11-20 07:04:47 +01:00
if (!this.map) return false;
var consumer = this.map.consumer();
var from = consumer.originalPositionFor({ line: line, column: column });
if (!from.source) return false;
var result = {
2015-01-30 14:24:39 +01:00
file: this.mapResolve(from.source),
line: from.line,
column: from.column
2014-11-20 07:04:47 +01:00
};
var source = consumer.sourceContentFor(result.file);
if (source) result.source = source;
return result;
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Return path relative from source map root
Input.prototype.mapResolve = function mapResolve(file) {
2014-11-20 07:04:47 +01:00
return path.resolve(this.map.consumer().sourceRoot || ".", file);
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
return Input;
2014-11-20 07:04:47 +01:00
})();
module.exports = Input;
2015-01-30 14:24:39 +01:00
},{"./css-syntax-error":99,"./parser":106,"./previous-map":108,"path":53}],102:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
// Methods to parse list and split it to array
var list = {
2015-01-30 14:24:39 +01:00
// Split string to array by separator symbols with function and inside strings
// cheching
split: function (string, separators, last) {
var array = [];
var current = "";
var split = false;
var func = 0;
var quote = false;
var escape = false;
for (var i = 0; i < string.length; i++) {
var letter = string[i];
if (quote) {
if (escape) {
escape = false;
} else if (letter == "\\") {
escape = true;
} else if (letter == quote) {
quote = false;
}
} else if (letter == "\"" || letter == "'") {
quote = letter;
} else if (letter == "(") {
func += 1;
} else if (letter == ")") {
if (func > 0) func -= 1;
} else if (func === 0) {
for (var j = 0; j < separators.length; j++) {
if (letter == separators[j]) split = true;
}
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (split) {
if (current !== "") array.push(current.trim());
current = "";
split = false;
} else {
current += letter;
}
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (last || current !== "") array.push(current.trim());
return array;
},
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Split list devided by space:
//
// list.space('a b') #=> ['a', 'b']
//
// It check for fuction and strings:
//
// list.space('calc(1px + 1em) "b c"') #=> ['calc(1px + 1em)', '"b c"']
space: function (string) {
return this.split(string, [" ", "\n", "\t"]);
},
// Split list devided by comma
//
// list.comma('a, b') #=> ['a', 'b']
//
// It check for fuction and strings:
//
// list.comma('rgba(0, 0, 0, 0) white') #=> ['rgba(0, 0, 0, 0)', '"white"']
comma: function (string) {
return this.split(string, [","], true);
}
2014-11-03 14:32:38 +01:00
};
module.exports = list;
2015-01-30 14:24:39 +01:00
},{}],103:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
var Result = require("./result");
var mozilla = require("source-map");
var Base64 = require("js-base64").Base64;
var path = require("path");
2015-01-30 14:24:39 +01:00
// All tools to generate source maps
2014-11-20 07:04:47 +01:00
var MapGenerator = (function () {
2015-01-30 14:24:39 +01:00
function MapGenerator(root, opts) {
this.root = root;
this.opts = opts;
this.mapOpts = opts.map || {};
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Should map be generated
MapGenerator.prototype.isMap = function isMap() {
if (typeof this.opts.map != "undefined") {
return !!this.opts.map;
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
return this.previous().length > 0;
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Return source map arrays from previous compilation step (like Sass)
MapGenerator.prototype.previous = function previous() {
2014-11-20 07:04:47 +01:00
var _this = this;
if (!this.previousMaps) {
2015-01-30 14:24:39 +01:00
this.previousMaps = [];
this.root.eachInside(function (node) {
if (node.source && node.source.input.map) {
var map = node.source.input.map;
if (_this.previousMaps.indexOf(map) == -1) {
_this.previousMaps.push(map);
}
}
});
2014-11-03 14:32:38 +01:00
}
return this.previousMaps;
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Should we inline source map to annotation comment
MapGenerator.prototype.isInline = function isInline() {
if (typeof this.mapOpts.inline != "undefined") {
return this.mapOpts.inline;
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
var annotation = this.mapOpts.annotation;
2015-01-30 14:24:39 +01:00
if (typeof annotation != "undefined" && annotation !== true) {
return false;
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
if (this.previous().length) {
2015-01-30 14:24:39 +01:00
return this.previous().some(function (i) {
return i.inline;
});
2014-11-20 07:04:47 +01:00
} else {
2015-01-30 14:24:39 +01:00
return true;
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Should we set sourcesContent
MapGenerator.prototype.isSourcesContent = function isSourcesContent() {
if (typeof this.mapOpts.sourcesContent != "undefined") {
return this.mapOpts.sourcesContent;
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
if (this.previous().length) {
2015-01-30 14:24:39 +01:00
return this.previous().some(function (i) {
return i.withContent();
});
2014-11-20 07:04:47 +01:00
} else {
2015-01-30 14:24:39 +01:00
return true;
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Clear source map annotation comment
MapGenerator.prototype.clearAnnotation = function clearAnnotation() {
2014-11-20 07:04:47 +01:00
if (this.mapOpts.annotation === false) return;
var node;
2015-01-30 14:24:39 +01:00
for (var i = this.root.nodes.length - 1; i >= 0; i--) {
node = this.root.nodes[i];
if (node.type != "comment") continue;
if (node.text.match(/^# sourceMappingURL=/)) {
this.root.remove(i);
return;
}
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Set origin CSS content
MapGenerator.prototype.setSourcesContent = function setSourcesContent() {
var _this = this;
2014-11-20 07:04:47 +01:00
var already = {};
this.root.eachInside(function (node) {
2015-01-30 14:24:39 +01:00
if (node.source) {
var from = node.source.input.from;
if (from && !already[from]) {
already[from] = true;
var relative = _this.relative(from);
_this.map.setSourceContent(relative, node.source.input.css);
}
2014-11-03 14:32:38 +01:00
}
});
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Apply source map from previous compilation step (like Sass)
MapGenerator.prototype.applyPrevMaps = function applyPrevMaps() {
for (var _iterator = this.previous(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var prev;
if (_isArray) {
if (_i >= _iterator.length) break;
prev = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
prev = _i.value;
}
var from = this.relative(prev.file);
var root = prev.root || path.dirname(prev.file);
var map;
if (this.mapOpts.sourcesContent === false) {
map = new mozilla.SourceMapConsumer(prev.text);
map.sourcesContent = map.sourcesContent.map(function (i) {
return null;
});
} else {
map = prev.consumer();
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
this.map.applySourceMap(map, from, this.relative(root));
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Should we add annotation comment
MapGenerator.prototype.isAnnotation = function isAnnotation() {
2014-11-20 07:04:47 +01:00
if (this.isInline()) {
2015-01-30 14:24:39 +01:00
return true;
} else if (typeof this.mapOpts.annotation != "undefined") {
return this.mapOpts.annotation;
2014-11-20 07:04:47 +01:00
} else if (this.previous().length) {
2015-01-30 14:24:39 +01:00
return this.previous().some(function (i) {
return i.annotation;
});
2014-11-20 07:04:47 +01:00
} else {
2015-01-30 14:24:39 +01:00
return true;
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Add source map annotation comment if it is needed
MapGenerator.prototype.addAnnotation = function addAnnotation() {
2014-11-20 07:04:47 +01:00
var content;
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
if (this.isInline()) {
2015-01-30 14:24:39 +01:00
content = "data:application/json;base64," + Base64.encode(this.map.toString());
} else if (typeof this.mapOpts.annotation == "string") {
content = this.mapOpts.annotation;
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
content = this.outputFile() + ".map";
2014-11-03 14:32:38 +01:00
}
this.css += "\n/*# sourceMappingURL=" + content + " */";
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Return output CSS file path
MapGenerator.prototype.outputFile = function outputFile() {
2014-11-20 07:04:47 +01:00
if (this.opts.to) {
2015-01-30 14:24:39 +01:00
return this.relative(this.opts.to);
2014-11-20 07:04:47 +01:00
} else if (this.opts.from) {
2015-01-30 14:24:39 +01:00
return this.relative(this.opts.from);
2014-11-20 07:04:47 +01:00
} else {
2015-01-30 14:24:39 +01:00
return "to.css";
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Return Result object with map
MapGenerator.prototype.generateMap = function generateMap() {
2014-11-03 14:32:38 +01:00
this.stringify();
2014-11-20 07:04:47 +01:00
if (this.isSourcesContent()) this.setSourcesContent();
if (this.previous().length > 0) this.applyPrevMaps();
if (this.isAnnotation()) this.addAnnotation();
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
if (this.isInline()) {
2015-01-30 14:24:39 +01:00
return [this.css];
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
return [this.css, this.map];
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Return path relative from output CSS file
MapGenerator.prototype.relative = function relative(file) {
2014-11-20 07:04:47 +01:00
var from = this.opts.to ? path.dirname(this.opts.to) : ".";
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
if (typeof this.mapOpts.annotation == "string") {
from = path.dirname(path.resolve(from, this.mapOpts.annotation));
2014-11-03 14:32:38 +01:00
}
file = path.relative(from, file);
2014-11-20 07:04:47 +01:00
if (path.sep == "\\") {
2015-01-30 14:24:39 +01:00
return file.replace(/\\/g, "/");
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
return file;
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Return path of node source for map
MapGenerator.prototype.sourcePath = function sourcePath(node) {
return this.relative(node.source.input.from);
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Return CSS string and source map
MapGenerator.prototype.stringify = function stringify() {
var _this = this;
2014-11-20 07:04:47 +01:00
this.css = "";
2014-11-03 14:32:38 +01:00
this.map = new mozilla.SourceMapGenerator({ file: this.outputFile() });
2014-11-20 07:04:47 +01:00
var line = 1;
2014-11-03 14:32:38 +01:00
var column = 1;
var lines, last;
2014-11-20 07:04:47 +01:00
var builder = function (str, node, type) {
2015-01-30 14:24:39 +01:00
_this.css += str;
if (node && node.source && node.source.start && type != "end") {
_this.map.addMapping({
source: _this.sourcePath(node),
original: {
line: node.source.start.line,
column: node.source.start.column - 1
},
generated: {
line: line,
column: column - 1
}
});
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
lines = str.match(/\n/g);
if (lines) {
line += lines.length;
last = str.lastIndexOf("\n");
column = str.length - last;
} else {
column = column + str.length;
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (node && node.source && node.source.end && type != "start") {
_this.map.addMapping({
source: _this.sourcePath(node),
original: {
line: node.source.end.line,
column: node.source.end.column
},
generated: {
line: line,
column: column
}
});
}
2014-11-03 14:32:38 +01:00
};
this.root.stringify(builder);
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Return Result object with or without map
MapGenerator.prototype.generate = function generate() {
2014-11-03 14:32:38 +01:00
this.clearAnnotation();
2014-11-20 07:04:47 +01:00
if (this.isMap()) {
2015-01-30 14:24:39 +01:00
return this.generateMap();
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
return [this.root.toString()];
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
return MapGenerator;
2014-11-20 07:04:47 +01:00
})();
2014-11-03 14:32:38 +01:00
module.exports = MapGenerator;
2015-01-30 14:24:39 +01:00
},{"./result":109,"js-base64":114,"path":53,"source-map":115}],104:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
2015-01-30 14:24:39 +01:00
var CssSyntaxError = require("./css-syntax-error");
2014-11-03 14:32:38 +01:00
// Recursivly clone objects
var clone = function (obj, parent) {
2015-01-30 14:24:39 +01:00
if (typeof obj != "object") return obj;
var cloned = new obj.constructor();
for (var i in obj) {
if (!obj.hasOwnProperty(i)) continue;
var value = obj[i];
if (i == "parent" && typeof value == "object") {
if (parent) cloned[i] = parent;
} else if (i == "source") {
cloned[i] = value;
} else if (value instanceof Array) {
cloned[i] = value.map(function (i) {
return clone(i, cloned);
});
} else if (i != "before" && i != "after" && i != "between" && i != "semicolon") {
cloned[i] = clone(value, cloned);
}
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
return cloned;
2014-11-03 14:32:38 +01:00
};
2015-01-30 14:24:39 +01:00
// Some common methods for all CSS nodes
2014-11-20 07:04:47 +01:00
var Node = (function () {
2015-01-30 14:24:39 +01:00
function Node() {
var defaults = arguments[0] === undefined ? {} : arguments[0];
for (var name in defaults) {
this[name] = defaults[name];
}
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Return error to mark error in your plugin syntax:
//
// if ( wrongVariable ) {
// throw decl.error('Wrong variable');
// }
//
// You can also get origin line and column from previous source map:
//
// if ( deprectedSyntax ) {
// var error = decl.error('Deprected syntax');
// console.warn(error.toString());
// }
Node.prototype.error = function error(message) {
if (this.source) {
var pos = this.source.start;
return this.source.input.error(message, pos.line, pos.column);
} else {
return new CssSyntaxError(message);
}
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Remove this node from parent
//
// decl.removeSelf();
//
// Note, that removing by index is faster:
//
// rule.each( (decl, i) => rule.remove(i) );
Node.prototype.removeSelf = function removeSelf() {
2014-11-20 07:04:47 +01:00
if (this.parent) {
2015-01-30 14:24:39 +01:00
this.parent.remove(this);
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
this.parent = undefined;
2014-11-03 14:32:38 +01:00
return this;
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Shortcut to insert nodes before and remove self.
//
// importNode.replace( loadedRoot );
Node.prototype.replace = function replace(nodes) {
2014-11-03 14:32:38 +01:00
this.parent.insertBefore(this, nodes);
this.parent.remove(this);
return this;
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Return CSS string of current node
//
// decl.toString(); //=> " color: black"
Node.prototype.toString = function toString() {
2014-11-20 07:04:47 +01:00
var result = "";
var builder = function (str) {
2015-01-30 14:24:39 +01:00
return result += str;
2014-11-20 07:04:47 +01:00
};
2014-11-03 14:32:38 +01:00
this.stringify(builder);
return result;
2015-01-30 14:24:39 +01:00
};
// Clone current node
//
// rule.append( decl.clone() );
//
// You can override properties while cloning:
//
// rule.append( decl.clone({ value: '0' }) );
Node.prototype.clone = (function (_clone) {
var _cloneWrapper = function clone() {
return _clone.apply(this, arguments);
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
_cloneWrapper.toString = function () {
return _clone.toString();
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
return _cloneWrapper;
})(function () {
var overrides = arguments[0] === undefined ? {} : arguments[0];
2014-11-03 14:32:38 +01:00
var cloned = clone(this);
2014-11-20 07:04:47 +01:00
for (var name in overrides) {
2015-01-30 14:24:39 +01:00
cloned[name] = overrides[name];
2014-11-03 14:32:38 +01:00
}
return cloned;
2015-01-30 14:24:39 +01:00
});
// Clone node and insert clone before current one.
// It accept properties to change in clone and return new node.
//
// decl.cloneBefore({ prop: '-webkit-' + del.prop });
Node.prototype.cloneBefore = function cloneBefore() {
var overrides = arguments[0] === undefined ? {} : arguments[0];
var cloned = this.clone(overrides);
this.parent.insertBefore(this, cloned);
return cloned;
};
// Clone node and insert clone after current one.
// It accept properties to change in clone and return new node.
//
// decl.cloneAfter({ value: convertToRem(decl.value) });
Node.prototype.cloneAfter = function cloneAfter() {
var overrides = arguments[0] === undefined ? {} : arguments[0];
var cloned = this.clone(overrides);
this.parent.insertAfter(this, cloned);
return cloned;
};
// Replace with node by another one.
//
// decl.replaceWith(fixedDecl);
Node.prototype.replaceWith = function replaceWith(node) {
this.parent.insertBefore(this, node);
this.removeSelf();
return this;
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Remove node from current place and put to end of new one.
// It will also clean node code styles, but will keep `between` if old
// parent and new parent has same root.
//
// rule.moveTo(atRule);
Node.prototype.moveTo = function moveTo(container) {
this.cleanStyles(this.root() == container.root());
this.removeSelf();
container.append(this);
return this;
};
// Remove node from current place and put to before other node.
// It will also clean node code styles, but will keep `between` if old
// parent and new parent has same root.
//
// rule.moveBefore(rule.parent);
Node.prototype.moveBefore = function moveBefore(node) {
this.cleanStyles(this.root() == node.root());
this.removeSelf();
node.parent.insertBefore(node, this);
return this;
};
// Remove node from current place and put to after other node.
// It will also clean node code styles, but will keep `between` if old
// parent and new parent has same root.
//
// rule.moveAfter(rule.parent);
Node.prototype.moveAfter = function moveAfter(node) {
this.cleanStyles(this.root() == node.root());
this.removeSelf();
node.parent.insertAfter(node, this);
return this;
};
// Return next node in parent. If current node is last one,
// method will return `undefined`.
//
// var next = decl.next();
// if ( next && next.prop == removePrefix(decl.prop) ) {
// decl.removeSelf();
// }
Node.prototype.next = function next() {
var index = this.parent.index(this);
return this.parent.nodes[index + 1];
};
// Return previous node in parent. If current node is first one,
// method will return `undefined`.
//
// var prev = decl.prev();
// if ( prev && removePrefix(prev.prop) == decl.prop) ) {
// prev.removeSelf();
// }
Node.prototype.prev = function prev() {
var index = this.parent.index(this);
return this.parent.nodes[index - 1];
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Remove `parent` node on cloning to fix circular structures
Node.prototype.toJSON = function toJSON() {
2014-11-20 07:04:47 +01:00
var fixed = {};
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
for (var name in this) {
2015-01-30 14:24:39 +01:00
if (!this.hasOwnProperty(name)) continue;
if (name == "parent") continue;
var value = this[name];
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (value instanceof Array) {
fixed[name] = value.map(function (i) {
return typeof i == "object" && i.toJSON ? i.toJSON() : i;
});
} else if (typeof value == "object" && value.toJSON) {
fixed[name] = value.toJSON();
} else {
fixed[name] = value;
}
2014-11-03 14:32:38 +01:00
}
return fixed;
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Copy code style from first node with same type
Node.prototype.style = function style(own, detect) {
var value;
if (!detect) detect = own;
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
// Already had
2015-01-30 14:24:39 +01:00
if (own) {
value = this[own];
if (typeof value != "undefined") return value;
}
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var parent = this.parent;
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
// Hack for first rule in CSS
2015-01-30 14:24:39 +01:00
if (detect == "before") {
if (!parent || parent.type == "root" && parent.first == this) {
return "";
}
2014-11-20 07:04:47 +01:00
}
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
// Floating child without parent
2015-01-30 14:24:39 +01:00
if (!parent) return this.defaultStyle[detect];
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
// Detect style by other nodes
2015-01-30 14:24:39 +01:00
var root = this.root();
2014-11-20 07:04:47 +01:00
if (!root.styleCache) root.styleCache = {};
2015-01-30 14:24:39 +01:00
if (typeof root.styleCache[detect] != "undefined") {
return root.styleCache[detect];
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
if (detect == "semicolon") {
root.eachInside(function (i) {
if (i.nodes && i.nodes.length && i.last.type == "decl") {
value = i.semicolon;
if (typeof value != "undefined") return false;
}
});
} else if (detect == "emptyBody") {
root.eachInside(function (i) {
if (i.nodes && i.nodes.length === 0) {
value = i.after;
if (typeof value != "undefined") return false;
}
});
} else if (detect == "indent") {
root.eachInside(function (i) {
var p = i.parent;
if (p != root && p.parent && p.parent == root) {
if (typeof i.before != "undefined") {
var parts = i.before.split("\n");
value = parts[parts.length - 1];
value = value.replace(/[^\s]/g, "");
return false;
}
}
});
} else if (detect == "beforeComment") {
root.eachComment(function (i) {
if (typeof i.before != "undefined") {
value = i.before;
if (value.indexOf("\n") != -1) {
value = value.replace(/[^\n]+$/, "");
}
return false;
}
});
if (typeof value == "undefined") {
value = this.style(null, "beforeDecl");
}
} else if (detect == "beforeDecl") {
root.eachDecl(function (i) {
if (typeof i.before != "undefined") {
value = i.before;
if (value.indexOf("\n") != -1) {
value = value.replace(/[^\n]+$/, "");
}
return false;
}
});
if (typeof value == "undefined") {
value = this.style(null, "beforeRule");
}
} else if (detect == "beforeRule") {
root.eachInside(function (i) {
if (i.nodes && (i.parent != root || root.first != i)) {
if (typeof i.before != "undefined") {
value = i.before;
if (value.indexOf("\n") != -1) {
value = value.replace(/[^\n]+$/, "");
}
return false;
}
}
});
} else if (detect == "beforeClose") {
root.eachInside(function (i) {
if (i.nodes && i.nodes.length > 0) {
if (typeof i.after != "undefined") {
value = i.after;
if (value.indexOf("\n") != -1) {
value = value.replace(/[^\n]+$/, "");
}
return false;
}
}
});
} else if (detect == "before" || detect == "after") {
if (this.type == "decl") {
value = this.style(null, "beforeDecl");
} else if (this.type == "comment") {
value = this.style(null, "beforeComment");
} else if (detect == "before") {
value = this.style(null, "beforeRule");
} else {
value = this.style(null, "beforeClose");
}
var node = this.parent;
var depth = 0;
while (node && node.type != "root") {
depth += 1;
node = node.parent;
}
if (value.indexOf("\n") != -1) {
var indent = this.style(null, "indent");
if (indent.length) {
for (var step = 0; step < depth; step++) value += indent;
}
}
return value;
} else if (detect == "colon") {
root.eachDecl(function (i) {
if (typeof i.between != "undefined") {
value = i.between.replace(/[^\s:]/g, "");
return false;
}
});
} else if (detect == "beforeOpen") {
root.eachInside(function (i) {
if (i.type != "decl") {
value = i.between;
if (typeof value != "undefined") return false;
}
});
} else {
root.eachInside(function (i) {
value = i[own];
if (typeof value != "undefined") return false;
});
}
if (typeof value == "undefined") value = this.defaultStyle[detect];
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
root.styleCache[detect] = value;
2014-11-20 07:04:47 +01:00
return value;
2015-01-30 14:24:39 +01:00
};
// Return top parent , parent of parents.
Node.prototype.root = function root() {
var result = this;
while (result.parent) result = result.parent;
return result;
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Recursivelly remove all code style properties (`before` and `between`).
Node.prototype.cleanStyles = function cleanStyles(keepBetween) {
delete this.before;
delete this.after;
if (!keepBetween) delete this.between;
if (this.nodes) {
for (var _iterator = this.nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var node;
if (_isArray) {
if (_i >= _iterator.length) break;
node = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
node = _i.value;
}
node.cleanStyles(keepBetween);
}
}
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Use raw value if origin was not changed
Node.prototype.stringifyRaw = function stringifyRaw(prop) {
2014-11-03 14:32:38 +01:00
var value = this[prop];
2014-11-20 07:04:47 +01:00
var raw = this["_" + prop];
if (raw && raw.value === value) {
2015-01-30 14:24:39 +01:00
return raw.raw;
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
return value;
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
return Node;
2014-11-20 07:04:47 +01:00
})();
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
// Default code style
Node.prototype.defaultStyle = {
2015-01-30 14:24:39 +01:00
colon: ": ",
indent: " ",
beforeDecl: "\n",
beforeRule: "\n",
beforeOpen: " ",
beforeClose: "\n",
beforeComment: "\n",
after: "\n",
emptyBody: "",
commentLeft: " ",
commentRight: " "
2014-11-20 07:04:47 +01:00
};
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
module.exports = Node;
2015-01-30 14:24:39 +01:00
},{"./css-syntax-error":99}],105:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var Parser = require("./parser");
var Input = require("./input");
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
module.exports = function (css, opts) {
2015-01-30 14:24:39 +01:00
var input = new Input(css, opts);
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
var parser = new Parser(input);
parser.tokenize();
parser.loop();
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
return parser.root;
2014-11-20 07:04:47 +01:00
};
2015-01-30 14:24:39 +01:00
},{"./input":101,"./parser":106}],106:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var Declaration = require("./declaration");
var tokenize = require("./tokenize");
var Comment = require("./comment");
var AtRule = require("./at-rule");
var Root = require("./root");
var Rule = require("./rule");
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// CSS parser
2014-11-20 07:04:47 +01:00
var Parser = (function () {
2015-01-30 14:24:39 +01:00
function Parser(input) {
this.input = input;
this.pos = 0;
this.root = new Root();
this.current = this.root;
this.spaces = "";
this.semicolon = false;
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
this.root.source = { input: input };
if (input.map) this.root.prevMap = input.map;
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
Parser.prototype.tokenize = (function (_tokenize) {
var _tokenizeWrapper = function tokenize() {
return _tokenize.apply(this, arguments);
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
_tokenizeWrapper.toString = function () {
return _tokenize.toString();
};
return _tokenizeWrapper;
})(function () {
2014-11-20 07:04:47 +01:00
this.tokens = tokenize(this.input);
2015-01-30 14:24:39 +01:00
});
Parser.prototype.loop = function loop() {
2014-11-20 07:04:47 +01:00
var token;
2015-01-30 14:24:39 +01:00
while (this.pos < this.tokens.length) {
token = this.tokens[this.pos];
switch (token[0]) {
case "word":
case ":":
this.word(token);
break;
case "}":
this.end(token);
break;
case "comment":
this.comment(token);
break;
case "at-word":
this.atrule(token);
break;
case "{":
this.emptyRule(token);
break;
default:
this.spaces += token[1];
break;
}
this.pos += 1;
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
this.endFile();
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
Parser.prototype.comment = function comment(token) {
2014-11-20 07:04:47 +01:00
var node = new Comment();
this.init(node, token[2], token[3]);
node.source.end = { line: token[4], column: token[5] };
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var text = token[1].slice(2, -2);
if (text.match(/^\s*$/)) {
2015-01-30 14:24:39 +01:00
node.left = text;
node.text = "";
node.right = "";
2014-11-20 07:04:47 +01:00
} else {
2015-01-30 14:24:39 +01:00
var match = text.match(/^(\s*)([^]*[^\s])(\s*)$/);
node.left = match[1];
node.text = match[2];
node.right = match[3];
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
Parser.prototype.emptyRule = function emptyRule(token) {
2014-11-20 07:04:47 +01:00
var node = new Rule();
this.init(node, token[2], token[3]);
node.between = "";
node.selector = "";
this.current = node;
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
Parser.prototype.word = function word() {
2014-11-20 07:04:47 +01:00
var token;
var end = false;
2015-01-30 14:24:39 +01:00
var type = null;
var colon = false;
var bracket = null;
var brackets = 0;
var start = this.pos;
this.pos += 1;
2014-11-20 07:04:47 +01:00
while (true) {
2015-01-30 14:24:39 +01:00
token = this.tokens[this.pos];
if (!token) {
this.pos -= 1;
end = true;
break;
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
type = token[0];
if (type == "(") {
if (!bracket) bracket = token;
brackets += 1;
} else if (type == ")") {
brackets -= 1;
if (brackets === 0) bracket = null;
} else if (brackets === 0) {
if (type == ";") {
if (colon) {
this.decl(this.tokens.slice(start, this.pos + 1));
return;
} else {
break;
}
} else if (type == "{") {
this.rule(this.tokens.slice(start, this.pos + 1));
return;
} else if (type == "}") {
this.pos -= 1;
end = true;
break;
} else if (type == "at-word") {
this.pos -= 1;
break;
} else {
if (type == ":") colon = true;
}
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
this.pos += 1;
}
if (brackets > 0 && !this.input.safe) {
throw this.input.error("Unclosed bracket", bracket[2], bracket[3]);
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
if (end && colon) {
2015-01-30 14:24:39 +01:00
while (this.pos > start) {
token = this.tokens[this.pos][0];
if (token != "space" && token != "comment") break;
this.pos -= 1;
}
this.decl(this.tokens.slice(start, this.pos + 1));
return;
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
if (this.input.safe) {
2015-01-30 14:24:39 +01:00
var buffer = this.tokens.slice(start, this.pos + 1);
this.spaces += buffer.map(function (i) {
return i[1];
}).join("");
2014-11-20 07:04:47 +01:00
} else {
2015-01-30 14:24:39 +01:00
token = this.tokens[start];
throw this.input.error("Unknown word", token[2], token[3]);
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
Parser.prototype.rule = function rule(tokens) {
tokens.pop();
2014-11-20 07:04:47 +01:00
var node = new Rule();
this.init(node, tokens[0][2], tokens[0][3]);
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
node.between = this.spacesFromEnd(tokens);
this.raw(node, "selector", tokens);
this.current = node;
2015-01-30 14:24:39 +01:00
};
Parser.prototype.decl = function decl(tokens) {
2014-11-20 07:04:47 +01:00
var node = new Declaration();
this.init(node);
var last = tokens[tokens.length - 1];
if (last[0] == ";") {
2015-01-30 14:24:39 +01:00
this.semicolon = true;
tokens.pop();
}
if (last[4]) {
node.source.end = { line: last[4], column: last[5] };
2014-11-20 07:04:47 +01:00
} else {
2015-01-30 14:24:39 +01:00
node.source.end = { line: last[2], column: last[3] };
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
while (tokens[0][0] != "word") {
2015-01-30 14:24:39 +01:00
node.before += tokens.shift()[1];
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
node.source.start = { line: tokens[0][2], column: tokens[0][3] };
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
node.prop = tokens.shift()[1];
node.between = "";
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var token;
while (tokens.length) {
2015-01-30 14:24:39 +01:00
token = tokens.shift();
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
if (token[0] == ":") {
node.between += token[1];
break;
} else if (token[0] != "space" && token[0] != "comment") {
this.unknownWord(node, token, tokens);
} else {
node.between += token[1];
}
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
if (node.prop[0] == "_" || node.prop[0] == "*") {
2015-01-30 14:24:39 +01:00
node.before += node.prop[0];
node.prop = node.prop.slice(1);
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
node.between += this.spacesFromStart(tokens);
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
if (this.input.safe) this.checkMissedSemicolon(tokens);
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
for (var i = tokens.length - 1; i > 0; i--) {
token = tokens[i];
if (token[1] == "!important") {
node.important = true;
var string = this.stringFrom(tokens, i);
string = this.spacesFromEnd(tokens) + string;
if (string != " !important") node._important = string;
break;
} else if (token[0] != "space" && token[0] != "comment") {
break;
}
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
this.raw(node, "value", tokens);
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
if (node.value.indexOf(":") != -1 && !this.input.safe) {
this.checkMissedSemicolon(tokens);
}
};
Parser.prototype.atrule = function atrule(token) {
2014-11-20 07:04:47 +01:00
var node = new AtRule();
node.name = token[1].slice(1);
if (node.name === "") {
2015-01-30 14:24:39 +01:00
if (this.input.safe) {
node.name = "";
} else {
throw this.input.error("At-rule without name", token[2], token[3]);
}
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
this.init(node, token[2], token[3]);
var next;
var last = false;
var open = false;
var params = [];
while (true) {
2015-01-30 14:24:39 +01:00
this.pos += 1;
token = this.tokens[this.pos];
if (!token) {
last = true;
break;
} else if (token[0] == ";") {
node.source.end = { line: token[2], column: token[3] };
this.semicolon = true;
break;
} else if (token[0] == "{") {
open = true;
break;
} else {
params.push(token);
}
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
node.between = this.spacesFromEnd(params);
if (params.length) {
2015-01-30 14:24:39 +01:00
node.afterName = this.spacesFromStart(params);
this.raw(node, "params", params);
if (last) {
token = params[params.length - 1];
node.source.end = { line: token[4], column: token[5] };
this.spaces = node.between;
node.between = "";
}
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
node.afterName = "";
node.params = "";
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
if (open) {
2015-01-30 14:24:39 +01:00
node.nodes = [];
this.current = node;
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
Parser.prototype.end = function end(token) {
if (this.current.nodes && this.current.nodes.length) {
this.current.semicolon = this.semicolon;
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
this.semicolon = false;
2014-11-20 07:04:47 +01:00
this.current.after = (this.current.after || "") + this.spaces;
this.spaces = "";
if (this.current.parent) {
2015-01-30 14:24:39 +01:00
this.current.source.end = { line: token[2], column: token[3] };
this.current = this.current.parent;
2014-11-20 07:04:47 +01:00
} else if (!this.input.safe) {
2015-01-30 14:24:39 +01:00
throw this.input.error("Unexpected }", token[2], token[3]);
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
this.current.after += "}";
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
Parser.prototype.endFile = function endFile() {
2014-11-20 07:04:47 +01:00
if (this.current.parent && !this.input.safe) {
2015-01-30 14:24:39 +01:00
var pos = this.current.source.start;
throw this.input.error("Unclosed block", pos.line, pos.column);
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
if (this.current.nodes && this.current.nodes.length) {
this.current.semicolon = this.semicolon;
}
2014-11-20 07:04:47 +01:00
this.current.after = (this.current.after || "") + this.spaces;
while (this.current.parent) {
2015-01-30 14:24:39 +01:00
this.current = this.current.parent;
this.current.after = "";
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
};
Parser.prototype.unknownWord = function unknownWord(node, token) {
2014-11-20 07:04:47 +01:00
if (this.input.safe) {
2015-01-30 14:24:39 +01:00
node.source.start = { line: token[2], column: token[3] };
node.before += node.prop + node.between;
node.prop = token[1];
node.between = "";
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
throw this.input.error("Unknown word", token[2], token[3]);
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
Parser.prototype.checkMissedSemicolon = function checkMissedSemicolon(tokens) {
var prev = null;
var colon = false;
var brackets = 0;
var type, token;
for (var i = 0; i < tokens.length; i++) {
token = tokens[i];
type = token[0];
if (type == "(") {
brackets += 1;
} else if (type == ")") {
brackets -= 0;
} else if (brackets === 0 && type == ":") {
if (prev[0] == "word" && prev[1] == "progid") {
continue;
} else {
colon = i;
break;
}
}
prev = token;
}
if (colon === false) return;
2014-11-20 07:04:47 +01:00
if (this.input.safe) {
2015-01-30 14:24:39 +01:00
var split;
for (split = colon - 1; split >= 0; split--) {
if (tokens[split][0] == "word") break;
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
for (split -= 1; split >= 0; split--) {
if (tokens[split][0] != "space") {
split += 1;
break;
}
}
var other = tokens.splice(split, tokens.length - split);
this.decl(other);
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
var founded = 0;
for (var j = colon - 1; j >= 0; j--) {
token = tokens[j];
if (token[0] != "space") {
founded += 1;
if (founded == 2) break;
}
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
throw this.input.error("Missed semicolon", token[4], token[5]);
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Helpers
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
Parser.prototype.init = function init(node, line, column) {
2014-11-20 07:04:47 +01:00
this.current.push(node);
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
node.source = { start: { line: line, column: column }, input: this.input };
2014-11-20 07:04:47 +01:00
node.before = this.spaces;
this.spaces = "";
2015-01-30 14:24:39 +01:00
if (node.type != "comment") this.semicolon = false;
};
Parser.prototype.raw = function raw(node, prop, tokens) {
var token;
var value = "";
2014-11-20 07:04:47 +01:00
var clean = true;
2015-01-30 14:24:39 +01:00
for (var _iterator = tokens, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
if (_isArray) {
if (_i >= _iterator.length) break;
token = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
token = _i.value;
}
if (token[0] == "comment") {
clean = false;
} else {
value += token[1];
}
}
2014-11-20 07:04:47 +01:00
if (!clean) {
2015-01-30 14:24:39 +01:00
var origin = "";
for (var _iterator2 = tokens, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
token = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
token = _i2.value;
}
origin += token[1];
}
node["_" + prop] = { value: value, raw: origin };
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
node[prop] = value;
2015-01-30 14:24:39 +01:00
};
Parser.prototype.spacesFromEnd = function spacesFromEnd(tokens) {
2014-11-20 07:04:47 +01:00
var next;
var spaces = "";
while (tokens.length) {
2015-01-30 14:24:39 +01:00
next = tokens[tokens.length - 1][0];
if (next != "space" && next != "comment") break;
spaces += tokens.pop()[1];
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
return spaces;
2015-01-30 14:24:39 +01:00
};
Parser.prototype.spacesFromStart = function spacesFromStart(tokens) {
2014-11-20 07:04:47 +01:00
var next;
var spaces = "";
while (tokens.length) {
2015-01-30 14:24:39 +01:00
next = tokens[0][0];
if (next != "space" && next != "comment") break;
spaces += tokens.shift()[1];
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
return spaces;
2015-01-30 14:24:39 +01:00
};
Parser.prototype.stringFrom = function stringFrom(tokens, from) {
var result = "";
for (var i = from; i < tokens.length; i++) {
result += tokens[i][1];
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
tokens.splice(from, tokens.length - from);
return result;
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
return Parser;
2014-11-20 07:04:47 +01:00
})();
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
module.exports = Parser;
2015-01-30 14:24:39 +01:00
},{"./at-rule":96,"./comment":97,"./declaration":100,"./root":110,"./rule":111,"./tokenize":112}],107:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var Declaration = require("./declaration");
var Comment = require("./comment");
var AtRule = require("./at-rule");
var Result = require("./result");
var Rule = require("./rule");
var Root = require("./root");
2015-01-30 14:24:39 +01:00
// List of functions to process CSS
2014-11-20 07:04:47 +01:00
var PostCSS = (function () {
2015-01-30 14:24:39 +01:00
function PostCSS() {
var _this = this;
var plugins = arguments[0] === undefined ? [] : arguments[0];
this.plugins = plugins.map(function (i) {
return _this.normalize(i);
});
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Add function as PostCSS plugins
PostCSS.prototype.use = function use(plugin) {
plugin = this.normalize(plugin);
if (typeof plugin == "object" && Array.isArray(plugin.plugins)) {
this.plugins = this.plugins.concat(plugin.plugins);
2014-11-20 07:04:47 +01:00
} else {
2015-01-30 14:24:39 +01:00
this.plugins.push(plugin);
2014-11-20 07:04:47 +01:00
}
2014-11-03 14:32:38 +01:00
return this;
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Process CSS throw installed plugins
PostCSS.prototype.process = function process(css) {
var opts = arguments[1] === undefined ? {} : arguments[1];
2014-11-03 14:32:38 +01:00
var parsed;
2014-11-20 07:04:47 +01:00
if (css instanceof Root) {
2015-01-30 14:24:39 +01:00
parsed = css;
2014-11-20 07:04:47 +01:00
} else if (css instanceof Result) {
2015-01-30 14:24:39 +01:00
parsed = css.root;
if (css.map && typeof opts.map == "undefined") {
opts.map = { prev: css.map };
}
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
parsed = postcss.parse(css, opts);
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
for (var _iterator = this.plugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var plugin;
if (_isArray) {
if (_i >= _iterator.length) break;
plugin = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
plugin = _i.value;
}
var returned = plugin(parsed, opts);
if (returned instanceof Root) parsed = returned;
2014-11-20 07:04:47 +01:00
}
2014-11-03 14:32:38 +01:00
return parsed.toResult(opts);
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Return plugin function
PostCSS.prototype.normalize = function normalize(plugin) {
var type = typeof plugin;
if ((type == "object" || type == "function") && plugin.postcss) {
return plugin.postcss;
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
return plugin;
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
return PostCSS;
2014-11-20 07:04:47 +01:00
})();
2014-11-03 14:32:38 +01:00
// Framework for CSS postprocessors
//
// var processor = postcss(function (css) {
// // Change nodes in css
// });
// processor.process(css)
2014-11-20 07:04:47 +01:00
var postcss = function () {
2015-01-30 14:24:39 +01:00
for (var _len = arguments.length, plugins = Array(_len), _key = 0; _key < _len; _key++) {
plugins[_key] = arguments[_key];
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (plugins.length == 1 && Array.isArray(plugins[0])) {
plugins = plugins[0];
}
return new PostCSS(plugins);
2014-11-03 14:32:38 +01:00
};
// Compile CSS to nodes
2014-11-20 07:04:47 +01:00
postcss.parse = require("./parse");
2014-11-03 14:32:38 +01:00
// Nodes shortcuts
postcss.comment = function (defaults) {
2015-01-30 14:24:39 +01:00
return new Comment(defaults);
2014-11-03 14:32:38 +01:00
};
postcss.atRule = function (defaults) {
2015-01-30 14:24:39 +01:00
return new AtRule(defaults);
2014-11-03 14:32:38 +01:00
};
postcss.decl = function (defaults) {
2015-01-30 14:24:39 +01:00
return new Declaration(defaults);
2014-11-03 14:32:38 +01:00
};
postcss.rule = function (defaults) {
2015-01-30 14:24:39 +01:00
return new Rule(defaults);
2014-11-03 14:32:38 +01:00
};
postcss.root = function (defaults) {
2015-01-30 14:24:39 +01:00
return new Root(defaults);
2014-11-03 14:32:38 +01:00
};
module.exports = postcss;
2015-01-30 14:24:39 +01:00
},{"./at-rule":96,"./comment":97,"./declaration":100,"./parse":105,"./result":109,"./root":110,"./rule":111}],108:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
var mozilla = require("source-map");
var Base64 = require("js-base64").Base64;
var path = require("path");
var fs = require("fs");
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Detect previous map
2014-11-20 07:04:47 +01:00
var PreviousMap = (function () {
2015-01-30 14:24:39 +01:00
function PreviousMap(css, opts) {
this.loadAnnotation(css);
this.inline = this.startWith(this.annotation, "data:");
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
var text = this.loadMap(opts.from, opts.map ? opts.map.prev : undefined);
if (text) this.text = text;
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Return SourceMapConsumer object to read map
PreviousMap.prototype.consumer = function consumer() {
2014-11-20 07:04:47 +01:00
if (!this.consumerCache) {
2015-01-30 14:24:39 +01:00
this.consumerCache = new mozilla.SourceMapConsumer(this.text);
2014-11-03 14:32:38 +01:00
}
return this.consumerCache;
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Is map has sources content
PreviousMap.prototype.withContent = function withContent() {
2014-11-20 07:04:47 +01:00
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Is `string` is starting with `start`
PreviousMap.prototype.startWith = function startWith(string, start) {
2014-11-20 07:04:47 +01:00
if (!string) return false;
return string.substr(0, start.length) == start;
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Load for annotation comment from previous compilation step
PreviousMap.prototype.loadAnnotation = function loadAnnotation(css) {
2014-11-20 07:04:47 +01:00
var match = css.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//);
if (match) this.annotation = match[1].trim();
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Encode different type of inline
PreviousMap.prototype.decodeInline = function decodeInline(text) {
2014-11-20 07:04:47 +01:00
var uri = "data:application/json,";
var base64 = "data:application/json;base64,";
if (this.startWith(text, uri)) {
2015-01-30 14:24:39 +01:00
return decodeURIComponent(text.substr(uri.length));
2014-11-20 07:04:47 +01:00
} else if (this.startWith(text, base64)) {
2015-01-30 14:24:39 +01:00
return Base64.decode(text.substr(base64.length));
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
var encoding = text.match(/data:application\/json;([^,]+),/)[1];
throw new Error("Unsupported source map encoding " + encoding);
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Load previous map
PreviousMap.prototype.loadMap = function loadMap(file, prev) {
2014-11-20 07:04:47 +01:00
if (prev === false) return;
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
if (prev) {
2015-01-30 14:24:39 +01:00
if (typeof prev == "string") {
return prev;
} else if (prev instanceof mozilla.SourceMapConsumer) {
return mozilla.SourceMapGenerator.fromSourceMap(prev).toString();
} else if (prev instanceof mozilla.SourceMapGenerator) {
return prev.toString();
} else if (typeof prev == "object" && prev.mappings) {
return JSON.stringify(prev);
} else {
throw new Error("Unsupported previous source map format: " + prev.toString());
}
2014-11-20 07:04:47 +01:00
} else if (this.inline) {
2015-01-30 14:24:39 +01:00
return this.decodeInline(this.annotation);
2014-11-20 07:04:47 +01:00
} else if (this.annotation) {
2015-01-30 14:24:39 +01:00
var map = this.annotation;
if (file) map = path.join(path.dirname(file), map);
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
this.root = path.dirname(map);
if (fs.existsSync && fs.existsSync(map)) {
return fs.readFileSync(map, "utf-8").toString().trim();
}
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
return PreviousMap;
2014-11-20 07:04:47 +01:00
})();
2014-11-03 14:32:38 +01:00
module.exports = PreviousMap;
2015-01-30 14:24:39 +01:00
},{"fs":48,"js-base64":114,"path":53,"source-map":115}],109:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var MapGenerator = require("./map-generator");
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Object with processed CSS
2014-11-20 07:04:47 +01:00
var Result = (function () {
2015-01-30 14:24:39 +01:00
function Result(root) {
var opts = arguments[1] === undefined ? {} : arguments[1];
this.root = root;
this.opts = opts;
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Return CSS string on any try to print
Result.prototype.toString = function toString() {
2014-11-03 14:32:38 +01:00
return this.css;
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Generate CSS and map
Result.prototype.stringify = function stringify() {
2014-11-03 14:32:38 +01:00
var map = new MapGenerator(this.root, this.opts);
2014-11-20 07:04:47 +01:00
var generated = map.generate();
2014-11-03 14:32:38 +01:00
this.cssCached = generated[0];
this.mapCached = generated[1];
2015-01-30 14:24:39 +01:00
};
_prototypeProperties(Result, null, {
map: {
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Lazy method to return source map
get: function () {
if (!this.cssCached) this.stringify();
return this.mapCached;
},
enumerable: true,
configurable: true
},
css: {
// Lazy method to return CSS string
get: function () {
if (!this.cssCached) this.stringify();
return this.cssCached;
},
enumerable: true,
configurable: true
}
});
return Result;
2014-11-20 07:04:47 +01:00
})();
2014-11-03 14:32:38 +01:00
module.exports = Result;
2015-01-30 14:24:39 +01:00
},{"./map-generator":103}],110:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
2014-11-20 07:04:47 +01:00
var Declaration = require("./declaration");
var Container = require("./container");
var Comment = require("./comment");
var AtRule = require("./at-rule");
var Result = require("./result");
var Rule = require("./rule");
2015-01-30 14:24:39 +01:00
// Root of CSS
2014-11-20 07:04:47 +01:00
var Root = (function (Container) {
2015-01-30 14:24:39 +01:00
function Root(defaults) {
this.type = "root";
this.nodes = [];
Container.call(this, defaults);
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
_inherits(Root, Container);
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Fix space when we remove first child
Root.prototype.remove = function remove(child) {
2014-11-20 07:04:47 +01:00
child = this.index(child);
2015-01-30 14:24:39 +01:00
if (child === 0 && this.nodes.length > 1) {
this.nodes[1].before = this.nodes[child].before;
2014-11-20 07:04:47 +01:00
}
return Container.prototype.remove.call(this, child);
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Fix spaces on insert before first rule
Root.prototype.normalize = function normalize(child, sample, type) {
var nodes = Container.prototype.normalize.call(this, child);
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (sample) {
if (type == "prepend") {
if (this.nodes.length > 1) {
sample.before = this.nodes[1].before;
} else {
delete sample.before;
}
2014-11-03 14:32:38 +01:00
} else {
2015-01-30 14:24:39 +01:00
for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var node;
if (_isArray) {
if (_i >= _iterator.length) break;
node = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
node = _i.value;
}
if (this.first != sample) node.before = sample.before;
}
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
return nodes;
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Stringify styles
Root.prototype.stringify = function stringify(builder) {
2014-11-03 14:32:38 +01:00
this.stringifyContent(builder);
2014-11-20 07:04:47 +01:00
if (this.after) builder(this.after);
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
// Generate processing result with optional source map
Root.prototype.toResult = function toResult() {
var opts = arguments[0] === undefined ? {} : arguments[0];
2014-11-03 14:32:38 +01:00
return new Result(this, opts);
2015-01-30 14:24:39 +01:00
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
return Root;
2014-11-20 07:04:47 +01:00
})(Container);
2014-11-03 14:32:38 +01:00
module.exports = Root;
2015-01-30 14:24:39 +01:00
},{"./at-rule":96,"./comment":97,"./container":98,"./declaration":100,"./result":109,"./rule":111}],111:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
var Container = require("./container");
var Declaration = require("./declaration");
var list = require("./list");
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// CSS rule like <20>a { }<7D>
2014-11-20 07:04:47 +01:00
var Rule = (function (Container) {
2015-01-30 14:24:39 +01:00
function Rule(defaults) {
this.type = "rule";
this.nodes = [];
Container.call(this, defaults);
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
_inherits(Rule, Container);
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Stringify rule
Rule.prototype.stringify = function stringify(builder) {
this.stringifyBlock(builder, this.stringifyRaw("selector"));
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
_prototypeProperties(Rule, null, {
selectors: {
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Shortcut to get selectors as array
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
get: function () {
return list.comma(this.selector);
},
set: function (values) {
this.selector = values.join(", ");
},
enumerable: true,
configurable: true
}
});
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
return Rule;
2014-11-20 07:04:47 +01:00
})(Container);
2014-11-03 14:32:38 +01:00
module.exports = Rule;
2015-01-30 14:24:39 +01:00
},{"./container":98,"./declaration":100,"./list":102}],112:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
var singleQuote = "'".charCodeAt(0),
doubleQuote = "\"".charCodeAt(0),
backslash = "\\".charCodeAt(0),
slash = "/".charCodeAt(0),
newline = "\n".charCodeAt(0),
space = " ".charCodeAt(0),
feed = "\f".charCodeAt(0),
tab = "\t".charCodeAt(0),
cr = "\r".charCodeAt(0),
openBracket = "(".charCodeAt(0),
closeBracket = ")".charCodeAt(0),
openCurly = "{".charCodeAt(0),
closeCurly = "}".charCodeAt(0),
semicolon = ";".charCodeAt(0),
asterisk = "*".charCodeAt(0),
colon = ":".charCodeAt(0),
at = "@".charCodeAt(0),
atEnd = /[ \n\t\r\{\(\)'"\\/]/g,
wordEnd = /[ \n\t\r\(\)\{\}:;@!'"\\]|\/(?=\*)/g,
badBracket = /.[\\\/\("'\n]/;
2014-11-03 14:32:38 +01:00
2014-11-20 07:04:47 +01:00
module.exports = function (input) {
2015-01-30 14:24:39 +01:00
var tokens = [];
var css = input.css.valueOf();
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
var code, next, quote, lines, last, content, escape, nextLine, nextOffset, escaped, escapePos, bad;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
var length = css.length;
var offset = -1;
var line = 1;
var pos = 0;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
var unclosed = function (what, end) {
if (input.safe) {
css += end;
next = css.length - 1;
} else {
throw input.error("Unclosed " + what, line, pos - offset);
}
};
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
while (pos < length) {
code = css.charCodeAt(pos);
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (code == newline) {
offset = pos;
line += 1;
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
switch (code) {
case newline:
case space:
case tab:
case cr:
case feed:
next = pos;
do {
next += 1;
code = css.charCodeAt(next);
if (code == newline) {
offset = next;
line += 1;
}
} while (code == space || code == newline || code == tab || code == cr || code == feed);
tokens.push(["space", css.slice(pos, next)]);
pos = next - 1;
break;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
case openCurly:
tokens.push(["{", "{", line, pos - offset]);
break;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
case closeCurly:
tokens.push(["}", "}", line, pos - offset]);
break;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
case colon:
tokens.push([":", ":", line, pos - offset]);
break;
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
case semicolon:
tokens.push([";", ";", line, pos - offset]);
break;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
case openBracket:
next = css.indexOf(")", pos + 1);
content = css.slice(pos, next + 1);
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (next == -1 || badBracket.test(content)) {
tokens.push(["(", "(", line, pos - offset]);
} else {
tokens.push(["brackets", content, line, pos - offset, line, next - offset]);
pos = next;
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
break;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
case closeBracket:
tokens.push([")", ")", line, pos - offset]);
break;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
case singleQuote:
case doubleQuote:
quote = code == singleQuote ? "'" : "\"";
next = pos;
do {
escaped = false;
next = css.indexOf(quote, next + 1);
if (next == -1) unclosed("quote", quote);
escapePos = next;
while (css.charCodeAt(escapePos - 1) == backslash) {
escapePos -= 1;
escaped = !escaped;
}
} while (escaped);
tokens.push(["string", css.slice(pos, next + 1), line, pos - offset, line, next - offset]);
pos = next;
break;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
case at:
atEnd.lastIndex = pos + 1;
atEnd.test(css);
if (atEnd.lastIndex === 0) {
next = css.length - 1;
} else {
next = atEnd.lastIndex - 2;
}
tokens.push(["at-word", css.slice(pos, next + 1), line, pos - offset, line, next - offset]);
pos = next;
break;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
case backslash:
next = pos;
escape = true;
while (css.charCodeAt(next + 1) == backslash) {
next += 1;
escape = !escape;
}
code = css.charCodeAt(next + 1);
if (escape && (code != slash && code != space && code != newline && code != tab && code != cr && code != feed)) {
next += 1;
}
tokens.push(["word", css.slice(pos, next + 1), line, pos - offset, line, next - offset]);
pos = next;
break;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
default:
if (code == slash && css.charCodeAt(pos + 1) == asterisk) {
next = css.indexOf("*/", pos + 2) + 1;
if (next === 0) unclosed("comment", "*/");
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
content = css.slice(pos, next + 1);
lines = content.split("\n");
last = lines.length - 1;
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
if (last > 0) {
nextLine = line + last;
nextOffset = next - lines[last].length;
} else {
nextLine = line;
nextOffset = offset;
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
tokens.push(["comment", content, line, pos - offset, nextLine, next - nextOffset]);
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
offset = nextOffset;
line = nextLine;
pos = next;
} else {
wordEnd.lastIndex = pos + 1;
wordEnd.test(css);
if (wordEnd.lastIndex === 0) {
next = css.length - 1;
} else {
next = wordEnd.lastIndex - 2;
}
tokens.push(["word", css.slice(pos, next + 1), line, pos - offset, line, next - offset]);
pos = next;
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
break;
2014-11-03 14:32:38 +01:00
}
2014-11-20 07:04:47 +01:00
2015-01-30 14:24:39 +01:00
pos++;
2014-11-20 07:04:47 +01:00
}
2015-01-30 14:24:39 +01:00
return tokens;
2014-11-20 07:04:47 +01:00
};
2015-01-30 14:24:39 +01:00
},{}],113:[function(require,module,exports){
2014-11-20 07:04:47 +01:00
"use strict";
2015-01-30 14:24:39 +01:00
// Methods to work with vendor prefixes
var vendor = {
// Return vendor prefix from property name, if it exists
//
// vendor.prefix('-moz-box-sizing') #=> '-moz-'
// vendor.prefix('box-sizing') #=> ''
prefix: function (prop) {
if (prop[0] == "-") {
var sep = prop.indexOf("-", 1);
return prop.substr(0, sep + 1);
} else {
return "";
}
},
// Remove prefix from property name
//
// vendor.prefix('-moz-box-sizing') #=> 'box-sizing'
// vendor.prefix('box-sizing') #=> 'box-sizing'
unprefixed: function (prop) {
if (prop[0] == "-") {
var sep = prop.indexOf("-", 1);
return prop.substr(sep + 1);
} else {
return prop;
}
2014-11-20 07:04:47 +01:00
}
2014-11-03 14:32:38 +01:00
};
module.exports = vendor;
2015-01-30 14:24:39 +01:00
},{}],114:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function (global){
/*
* $Id: base64.js,v 2.15 2014/04/05 12:58:57 dankogai Exp dankogai $
*
* Licensed under the MIT license.
* http://opensource.org/licenses/mit-license
*
* References:
* http://en.wikipedia.org/wiki/Base64
*/
(function(global) {
'use strict';
// existing version for noConflict()
var _Base64 = global.Base64;
2015-01-30 14:24:39 +01:00
var version = "2.1.7";
2014-11-03 14:32:38 +01:00
// if node.js, we use Buffer
var buffer;
if (typeof module !== 'undefined' && module.exports) {
buffer = require('buffer').Buffer;
}
// constants
var b64chars
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var b64tab = function(bin) {
var t = {};
for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
return t;
}(b64chars);
var fromCharCode = String.fromCharCode;
// encoder stuff
var cb_utob = function(c) {
if (c.length < 2) {
var cc = c.charCodeAt(0);
return cc < 0x80 ? c
: cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
+ fromCharCode(0x80 | (cc & 0x3f)))
: (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
+ fromCharCode(0x80 | ( cc & 0x3f)));
} else {
var cc = 0x10000
+ (c.charCodeAt(0) - 0xD800) * 0x400
+ (c.charCodeAt(1) - 0xDC00);
return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
+ fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
+ fromCharCode(0x80 | ( cc & 0x3f)));
}
};
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
var utob = function(u) {
return u.replace(re_utob, cb_utob);
};
var cb_encode = function(ccc) {
var padlen = [0, 2, 1][ccc.length % 3],
ord = ccc.charCodeAt(0) << 16
| ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
| ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
chars = [
b64chars.charAt( ord >>> 18),
b64chars.charAt((ord >>> 12) & 63),
padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
];
return chars.join('');
};
var btoa = global.btoa ? function(b) {
return global.btoa(b);
} : function(b) {
return b.replace(/[\s\S]{1,3}/g, cb_encode);
};
2015-01-30 14:24:39 +01:00
var _encode = buffer ? function (u) {
return (u.constructor === buffer.constructor ? u : new buffer(u))
.toString('base64')
}
2014-11-03 14:32:38 +01:00
: function (u) { return btoa(utob(u)) }
;
var encode = function(u, urisafe) {
return !urisafe
2015-01-30 14:24:39 +01:00
? _encode(String(u))
: _encode(String(u)).replace(/[+\/]/g, function(m0) {
2014-11-03 14:32:38 +01:00
return m0 == '+' ? '-' : '_';
}).replace(/=/g, '');
};
var encodeURI = function(u) { return encode(u, true) };
// decoder stuff
var re_btou = new RegExp([
'[\xC0-\xDF][\x80-\xBF]',
'[\xE0-\xEF][\x80-\xBF]{2}',
'[\xF0-\xF7][\x80-\xBF]{3}'
].join('|'), 'g');
var cb_btou = function(cccc) {
switch(cccc.length) {
case 4:
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
| ((0x3f & cccc.charCodeAt(1)) << 12)
| ((0x3f & cccc.charCodeAt(2)) << 6)
| (0x3f & cccc.charCodeAt(3)),
offset = cp - 0x10000;
return (fromCharCode((offset >>> 10) + 0xD800)
+ fromCharCode((offset & 0x3FF) + 0xDC00));
case 3:
return fromCharCode(
((0x0f & cccc.charCodeAt(0)) << 12)
| ((0x3f & cccc.charCodeAt(1)) << 6)
| (0x3f & cccc.charCodeAt(2))
);
default:
return fromCharCode(
((0x1f & cccc.charCodeAt(0)) << 6)
| (0x3f & cccc.charCodeAt(1))
);
}
};
var btou = function(b) {
return b.replace(re_btou, cb_btou);
};
var cb_decode = function(cccc) {
var len = cccc.length,
padlen = len % 4,
n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
| (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
| (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
| (len > 3 ? b64tab[cccc.charAt(3)] : 0),
chars = [
fromCharCode( n >>> 16),
fromCharCode((n >>> 8) & 0xff),
fromCharCode( n & 0xff)
];
chars.length -= [0, 0, 2, 1][padlen];
return chars.join('');
};
var atob = global.atob ? function(a) {
return global.atob(a);
} : function(a){
return a.replace(/[\s\S]{1,4}/g, cb_decode);
};
2015-01-30 14:24:39 +01:00
var _decode = buffer ? function(a) {
return (a.constructor === buffer.constructor
? a : new buffer(a, 'base64')).toString();
}
2014-11-03 14:32:38 +01:00
: function(a) { return btou(atob(a)) };
var decode = function(a){
return _decode(
2015-01-30 14:24:39 +01:00
String(a).replace(/[-_]/g, function(m0) { return m0 == '-' ? '+' : '/' })
2014-11-03 14:32:38 +01:00
.replace(/[^A-Za-z0-9\+\/]/g, '')
);
};
var noConflict = function() {
var Base64 = global.Base64;
global.Base64 = _Base64;
return Base64;
};
// export Base64
global.Base64 = {
VERSION: version,
atob: atob,
btoa: btoa,
fromBase64: decode,
toBase64: encode,
utob: utob,
encode: encode,
encodeURI: encodeURI,
btou: btou,
decode: decode,
noConflict: noConflict
};
// if ES5 is available, make Base64.extendString() available
if (typeof Object.defineProperty === 'function') {
var noEnum = function(v){
return {value:v,enumerable:false,writable:true,configurable:true};
};
global.Base64.extendString = function () {
Object.defineProperty(
String.prototype, 'fromBase64', noEnum(function () {
return decode(this)
}));
Object.defineProperty(
String.prototype, 'toBase64', noEnum(function (urisafe) {
return encode(this, urisafe)
}));
Object.defineProperty(
String.prototype, 'toBase64URI', noEnum(function () {
return encode(this, true)
}));
};
}
// that's it!
})(this);
2015-01-30 14:24:39 +01:00
if (this['Meteor']) {
Base64 = global.Base64; // for normal export in Meteor.js
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"buffer":49}],115:[function(require,module,exports){
/*
* Copyright 2009-2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE.txt or:
* http://opensource.org/licenses/BSD-3-Clause
*/
exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator;
exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer;
exports.SourceNode = require('./source-map/source-node').SourceNode;
},{"./source-map/source-map-consumer":123,"./source-map/source-map-generator":124,"./source-map/source-node":125}],116:[function(require,module,exports){
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (require, exports, module) {
var util = require('./util');
/**
* A data structure which is a combination of an array and a set. Adding a new
* member is O(1), testing for membership is O(1), and finding the index of an
* element is O(1). Removing elements from the set is not supported. Only
* strings are supported for membership.
*/
function ArraySet() {
this._array = [];
this._set = {};
}
/**
* Static method for creating ArraySet instances from an existing array.
*/
ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
var set = new ArraySet();
for (var i = 0, len = aArray.length; i < len; i++) {
set.add(aArray[i], aAllowDuplicates);
}
return set;
};
/**
* Add the given string to this set.
*
* @param String aStr
*/
ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
var isDuplicate = this.has(aStr);
var idx = this._array.length;
if (!isDuplicate || aAllowDuplicates) {
this._array.push(aStr);
}
if (!isDuplicate) {
this._set[util.toSetString(aStr)] = idx;
}
};
/**
* Is the given string a member of this set?
*
* @param String aStr
*/
ArraySet.prototype.has = function ArraySet_has(aStr) {
return Object.prototype.hasOwnProperty.call(this._set,
util.toSetString(aStr));
};
/**
* What is the index of the given string in the array?
*
* @param String aStr
*/
ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
if (this.has(aStr)) {
return this._set[util.toSetString(aStr)];
}
throw new Error('"' + aStr + '" is not in the set.');
};
/**
* What is the element at the given index?
*
* @param Number aIdx
*/
ArraySet.prototype.at = function ArraySet_at(aIdx) {
if (aIdx >= 0 && aIdx < this._array.length) {
return this._array[aIdx];
}
throw new Error('No element indexed by ' + aIdx);
};
/**
* Returns the array representation of this set (which has the proper indices
* indicated by indexOf). Note that this is a copy of the internal array used
* for storing the members so that no one can mess with internal state.
*/
ArraySet.prototype.toArray = function ArraySet_toArray() {
return this._array.slice();
};
exports.ArraySet = ArraySet;
});
},{"./util":126,"amdefine":127}],117:[function(require,module,exports){
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*
* Based on the Base 64 VLQ implementation in Closure Compiler:
* https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
*
* Copyright 2011 The Closure Compiler Authors. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (require, exports, module) {
var base64 = require('./base64');
// A single base 64 digit can contain 6 bits of data. For the base 64 variable
// length quantities we use in the source map spec, the first bit is the sign,
// the next four bits are the actual value, and the 6th bit is the
// continuation bit. The continuation bit tells us whether there are more
// digits in this value following this digit.
//
// Continuation
// | Sign
// | |
// V V
// 101011
var VLQ_BASE_SHIFT = 5;
// binary: 100000
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
// binary: 011111
var VLQ_BASE_MASK = VLQ_BASE - 1;
// binary: 100000
var VLQ_CONTINUATION_BIT = VLQ_BASE;
/**
* Converts from a two-complement value to a value where the sign bit is
* placed in the least significant bit. For example, as decimals:
* 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
* 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
*/
function toVLQSigned(aValue) {
return aValue < 0
? ((-aValue) << 1) + 1
: (aValue << 1) + 0;
}
/**
* Converts to a two-complement value from a value where the sign bit is
* placed in the least significant bit. For example, as decimals:
* 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
* 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
*/
function fromVLQSigned(aValue) {
var isNegative = (aValue & 1) === 1;
var shifted = aValue >> 1;
return isNegative
? -shifted
: shifted;
}
/**
* Returns the base 64 VLQ encoded value.
*/
exports.encode = function base64VLQ_encode(aValue) {
var encoded = "";
var digit;
var vlq = toVLQSigned(aValue);
do {
digit = vlq & VLQ_BASE_MASK;
vlq >>>= VLQ_BASE_SHIFT;
if (vlq > 0) {
// There are still more digits in this value, so we must make sure the
// continuation bit is marked.
digit |= VLQ_CONTINUATION_BIT;
}
encoded += base64.encode(digit);
} while (vlq > 0);
return encoded;
};
/**
* Decodes the next base 64 VLQ value from the given string and returns the
* value and the rest of the string via the out parameter.
*/
exports.decode = function base64VLQ_decode(aStr, aOutParam) {
var i = 0;
var strLen = aStr.length;
var result = 0;
var shift = 0;
var continuation, digit;
do {
if (i >= strLen) {
throw new Error("Expected more digits in base 64 VLQ value.");
}
digit = base64.decode(aStr.charAt(i++));
continuation = !!(digit & VLQ_CONTINUATION_BIT);
digit &= VLQ_BASE_MASK;
result = result + (digit << shift);
shift += VLQ_BASE_SHIFT;
} while (continuation);
aOutParam.value = fromVLQSigned(result);
aOutParam.rest = aStr.slice(i);
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
});
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
},{"./base64":118,"amdefine":127}],118:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (require, exports, module) {
2015-01-30 14:24:39 +01:00
var charToIntMap = {};
var intToCharMap = {};
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
.split('')
.forEach(function (ch, index) {
charToIntMap[ch] = index;
intToCharMap[index] = ch;
});
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* Encode an integer in the range of 0 to 63 to a single base 64 digit.
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
exports.encode = function base64_encode(aNumber) {
if (aNumber in intToCharMap) {
return intToCharMap[aNumber];
}
throw new TypeError("Must be between 0 and 63: " + aNumber);
};
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* Decode a single base 64 digit to an integer.
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
exports.decode = function base64_decode(aChar) {
if (aChar in charToIntMap) {
return charToIntMap[aChar];
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
throw new TypeError("Not a valid base 64 digit: " + aChar);
2014-11-03 14:32:38 +01:00
};
2015-01-30 14:24:39 +01:00
});
},{"amdefine":127}],119:[function(require,module,exports){
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (require, exports, module) {
var util = require('./util');
var binarySearch = require('./binary-search');
var ArraySet = require('./array-set').ArraySet;
var base64VLQ = require('./base64-vlq');
var SourceMapConsumer = require('./source-map-consumer').SourceMapConsumer;
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* A BasicSourceMapConsumer instance represents a parsed source map which we can
* query for information about the original file positions by giving it a file
* position in the generated source.
2014-11-03 14:32:38 +01:00
*
2015-01-30 14:24:39 +01:00
* The only parameter is the raw source map (either as a JSON string, or
* already parsed to an object). According to the spec, source maps have the
* following attributes:
*
* - version: Which version of the source map spec this map is following.
* - sources: An array of URLs to the original source files.
* - names: An array of identifiers which can be referrenced by individual mappings.
* - sourceRoot: Optional. The URL root from which all sources are relative.
* - sourcesContent: Optional. An array of contents of the original source files.
* - mappings: A string of base64 VLQs which contain the actual mappings.
* - file: Optional. The generated file this source map is associated with.
*
* Here is an example source map, taken from the source map spec[0]:
*
* {
* version : 3,
* file: "out.js",
* sourceRoot : "",
* sources: ["foo.js", "bar.js"],
* names: ["src", "maps", "are", "fun"],
* mappings: "AA,AB;;ABCDE;"
* }
*
* [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
function BasicSourceMapConsumer(aSourceMap) {
var sourceMap = aSourceMap;
if (typeof aSourceMap === 'string') {
sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
var version = util.getArg(sourceMap, 'version');
var sources = util.getArg(sourceMap, 'sources');
// Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
// requires the array) to play nice here.
var names = util.getArg(sourceMap, 'names', []);
var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
var mappings = util.getArg(sourceMap, 'mappings');
var file = util.getArg(sourceMap, 'file', null);
// Once again, Sass deviates from the spec and supplies the version as a
// string rather than a number, so we use loose equality checking here.
if (version != this._version) {
throw new Error('Unsupported version: ' + version);
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
// Some source maps produce relative source paths like "./foo.js" instead of
// "foo.js". Normalize these first so that future comparisons will succeed.
// See bugzil.la/1090768.
sources = sources.map(util.normalize);
// Pass `true` below to allow duplicate names and sources. While source maps
// are intended to be compressed and deduplicated, the TypeScript compiler
// sometimes generates source maps with duplicates in them. See Github issue
// #72 and bugzil.la/889492.
this._names = ArraySet.fromArray(names, true);
this._sources = ArraySet.fromArray(sources, true);
this.sourceRoot = sourceRoot;
this.sourcesContent = sourcesContent;
this._mappings = mappings;
this.file = file;
}
BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* Create a BasicSourceMapConsumer from a SourceMapGenerator.
2014-11-03 14:32:38 +01:00
*
2015-01-30 14:24:39 +01:00
* @param SourceMapGenerator aSourceMap
* The source map that will be consumed.
* @returns BasicSourceMapConsumer
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
BasicSourceMapConsumer.fromSourceMap =
function SourceMapConsumer_fromSourceMap(aSourceMap) {
var smc = Object.create(BasicSourceMapConsumer.prototype);
smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
smc.sourceRoot = aSourceMap._sourceRoot;
smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
smc.sourceRoot);
smc.file = aSourceMap._file;
smc.__generatedMappings = aSourceMap._mappings.toArray().slice();
smc.__originalMappings = aSourceMap._mappings.toArray().slice()
.sort(util.compareByOriginalPositions);
return smc;
};
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* The version of the source mapping spec that we are consuming.
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
BasicSourceMapConsumer.prototype._version = 3;
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* The list of original sources.
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
get: function () {
return this._sources.toArray().map(function (s) {
return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
}, this);
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
});
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* Parse the mappings in a string in to a data structure which we can easily
* query (the ordered arrays in the `this.__generatedMappings` and
* `this.__originalMappings` properties).
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
BasicSourceMapConsumer.prototype._parseMappings =
function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
var generatedLine = 1;
var previousGeneratedColumn = 0;
var previousOriginalLine = 0;
var previousOriginalColumn = 0;
var previousSource = 0;
var previousName = 0;
var str = aStr;
var temp = {};
var mapping;
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
while (str.length > 0) {
if (str.charAt(0) === ';') {
generatedLine++;
str = str.slice(1);
previousGeneratedColumn = 0;
}
else if (str.charAt(0) === ',') {
str = str.slice(1);
}
else {
mapping = {};
mapping.generatedLine = generatedLine;
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Generated column.
base64VLQ.decode(str, temp);
mapping.generatedColumn = previousGeneratedColumn + temp.value;
previousGeneratedColumn = mapping.generatedColumn;
str = temp.rest;
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
if (str.length > 0 && !this._nextCharIsMappingSeparator(str)) {
// Original source.
base64VLQ.decode(str, temp);
mapping.source = this._sources.at(previousSource + temp.value);
previousSource += temp.value;
str = temp.rest;
if (str.length === 0 || this._nextCharIsMappingSeparator(str)) {
throw new Error('Found a source, but no line and column');
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Original line.
base64VLQ.decode(str, temp);
mapping.originalLine = previousOriginalLine + temp.value;
previousOriginalLine = mapping.originalLine;
// Lines are stored 0-based
mapping.originalLine += 1;
str = temp.rest;
if (str.length === 0 || this._nextCharIsMappingSeparator(str)) {
throw new Error('Found a source and line, but no column');
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Original column.
base64VLQ.decode(str, temp);
mapping.originalColumn = previousOriginalColumn + temp.value;
previousOriginalColumn = mapping.originalColumn;
str = temp.rest;
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
if (str.length > 0 && !this._nextCharIsMappingSeparator(str)) {
// Original name.
base64VLQ.decode(str, temp);
mapping.name = this._names.at(previousName + temp.value);
previousName += temp.value;
str = temp.rest;
}
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
this.__generatedMappings.push(mapping);
if (typeof mapping.originalLine === 'number') {
this.__originalMappings.push(mapping);
}
}
}
this.__generatedMappings.sort(util.compareByGeneratedPositions);
this.__originalMappings.sort(util.compareByOriginalPositions);
};
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* Find the mapping that best matches the hypothetical "needle" mapping that
* we are searching for in the given "haystack" of mappings.
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
BasicSourceMapConsumer.prototype._findMapping =
function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
aColumnName, aComparator) {
// To return the position we are searching for, we must first find the
// mapping for the given position and then return the opposite position it
// points to. Because the mappings are sorted, we can use binary search to
// find the best mapping.
if (aNeedle[aLineName] <= 0) {
throw new TypeError('Line must be greater than or equal to 1, got '
+ aNeedle[aLineName]);
}
if (aNeedle[aColumnName] < 0) {
throw new TypeError('Column must be greater than or equal to 0, got '
+ aNeedle[aColumnName]);
}
return binarySearch.search(aNeedle, aMappings, aComparator);
};
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* Compute the last column for each generated mapping. The last column is
* inclusive.
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
BasicSourceMapConsumer.prototype.computeColumnSpans =
function SourceMapConsumer_computeColumnSpans() {
for (var index = 0; index < this._generatedMappings.length; ++index) {
var mapping = this._generatedMappings[index];
// Mappings do not contain a field for the last generated columnt. We
// can come up with an optimistic estimate, however, by assuming that
// mappings are contiguous (i.e. given two consecutive mappings, the
// first mapping ends where the second one starts).
if (index + 1 < this._generatedMappings.length) {
var nextMapping = this._generatedMappings[index + 1];
if (mapping.generatedLine === nextMapping.generatedLine) {
mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
continue;
}
}
// The last mapping for each line spans the entire line.
mapping.lastGeneratedColumn = Infinity;
}
};
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* Returns the original source, line, and column information for the generated
* source's line and column positions provided. The only argument is an object
* with the following properties:
*
* - line: The line number in the generated source.
* - column: The column number in the generated source.
*
* and an object is returned with the following properties:
*
* - source: The original source file, or null.
* - line: The line number in the original source, or null.
* - column: The column number in the original source, or null.
* - name: The original identifier, or null.
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
BasicSourceMapConsumer.prototype.originalPositionFor =
function SourceMapConsumer_originalPositionFor(aArgs) {
var needle = {
generatedLine: util.getArg(aArgs, 'line'),
generatedColumn: util.getArg(aArgs, 'column')
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
var index = this._findMapping(needle,
this._generatedMappings,
"generatedLine",
"generatedColumn",
util.compareByGeneratedPositions);
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
if (index >= 0) {
var mapping = this._generatedMappings[index];
if (mapping.generatedLine === needle.generatedLine) {
var source = util.getArg(mapping, 'source', null);
if (source != null && this.sourceRoot != null) {
source = util.join(this.sourceRoot, source);
}
return {
source: source,
line: util.getArg(mapping, 'originalLine', null),
column: util.getArg(mapping, 'originalColumn', null),
name: util.getArg(mapping, 'name', null)
};
}
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
return {
source: null,
line: null,
column: null,
name: null
};
};
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* Returns the original source content. The only argument is the url of the
* original source file. Returns null if no original source content is
* availible.
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
BasicSourceMapConsumer.prototype.sourceContentFor =
function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
if (!this.sourcesContent) {
return null;
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
if (this.sourceRoot != null) {
aSource = util.relative(this.sourceRoot, aSource);
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
if (this._sources.has(aSource)) {
return this.sourcesContent[this._sources.indexOf(aSource)];
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
var url;
if (this.sourceRoot != null
&& (url = util.urlParse(this.sourceRoot))) {
// XXX: file:// URIs and absolute paths lead to unexpected behavior for
// many users. We can help them out when they expect file:// URIs to
// behave like it would if they were running a local HTTP server. See
// https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
if (url.scheme == "file"
&& this._sources.has(fileUriAbsPath)) {
return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
if ((!url.path || url.path == "/")
&& this._sources.has("/" + aSource)) {
return this.sourcesContent[this._sources.indexOf("/" + aSource)];
}
}
// This function is used recursively from
// IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
// don't want to throw if we can't find the source - we just want to
// return null, so we provide a flag to exit gracefully.
if (nullOnMissing) {
return null;
}
else {
throw new Error('"' + aSource + '" is not in the SourceMap.');
}
};
/**
* Returns the generated line and column information for the original source,
* line, and column positions provided. The only argument is an object with
* the following properties:
*
* - source: The filename of the original source.
* - line: The line number in the original source.
* - column: The column number in the original source.
*
* and an object is returned with the following properties:
*
* - line: The line number in the generated source, or null.
* - column: The column number in the generated source, or null.
*/
BasicSourceMapConsumer.prototype.generatedPositionFor =
function SourceMapConsumer_generatedPositionFor(aArgs) {
var needle = {
source: util.getArg(aArgs, 'source'),
originalLine: util.getArg(aArgs, 'line'),
originalColumn: util.getArg(aArgs, 'column')
};
if (this.sourceRoot != null) {
needle.source = util.relative(this.sourceRoot, needle.source);
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
var index = this._findMapping(needle,
this._originalMappings,
"originalLine",
"originalColumn",
util.compareByOriginalPositions);
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
if (index >= 0) {
var mapping = this._originalMappings[index];
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
return {
line: util.getArg(mapping, 'generatedLine', null),
column: util.getArg(mapping, 'generatedColumn', null),
lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
};
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
return {
line: null,
column: null,
lastColumn: null
};
};
exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
2014-11-03 14:32:38 +01:00
});
2015-01-30 14:24:39 +01:00
},{"./array-set":116,"./base64-vlq":117,"./binary-search":120,"./source-map-consumer":123,"./util":126,"amdefine":127}],120:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (require, exports, module) {
/**
* Recursive implementation of binary search.
*
* @param aLow Indices here and lower do not contain the needle.
* @param aHigh Indices here and higher do not contain the needle.
* @param aNeedle The element being searched for.
* @param aHaystack The non-empty array being searched.
* @param aCompare Function which takes two elements and returns -1, 0, or 1.
*/
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) {
// This function terminates when one of the following is true:
//
// 1. We find the exact element we are looking for.
//
2015-01-30 14:24:39 +01:00
// 2. We did not find the exact element, but we can return the index of
// the next closest element that is less than that element.
2014-11-03 14:32:38 +01:00
//
// 3. We did not find the exact element, and there is no next-closest
// element which is less than the one we are searching for, so we
2015-01-30 14:24:39 +01:00
// return -1.
2014-11-03 14:32:38 +01:00
var mid = Math.floor((aHigh - aLow) / 2) + aLow;
var cmp = aCompare(aNeedle, aHaystack[mid], true);
if (cmp === 0) {
// Found the element we are looking for.
2015-01-30 14:24:39 +01:00
return mid;
2014-11-03 14:32:38 +01:00
}
else if (cmp > 0) {
// aHaystack[mid] is greater than our needle.
if (aHigh - mid > 1) {
// The element is in the upper half.
return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare);
}
// We did not find an exact match, return the next closest one
// (termination case 2).
2015-01-30 14:24:39 +01:00
return mid;
2014-11-03 14:32:38 +01:00
}
else {
// aHaystack[mid] is less than our needle.
if (mid - aLow > 1) {
// The element is in the lower half.
return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare);
}
// The exact needle element was not found in this haystack. Determine if
// we are in termination case (2) or (3) and return the appropriate thing.
2015-01-30 14:24:39 +01:00
return aLow < 0 ? -1 : aLow;
2014-11-03 14:32:38 +01:00
}
}
/**
* This is an implementation of binary search which will always try and return
2015-01-30 14:24:39 +01:00
* the index of next lowest value checked if there is no exact hit. This is
* because mappings between original and generated line/col pairs are single
* points, and there is an implicit region between each of them, so a miss
* just means that you aren't on the very start of a region.
2014-11-03 14:32:38 +01:00
*
* @param aNeedle The element you are looking for.
* @param aHaystack The array that is being searched.
* @param aCompare A function which takes the needle and an element in the
* array and returns -1, 0, or 1 depending on whether the needle is less
* than, equal to, or greater than the element, respectively.
*/
exports.search = function search(aNeedle, aHaystack, aCompare) {
2015-01-30 14:24:39 +01:00
if (aHaystack.length === 0) {
return -1;
}
return recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare)
2014-11-03 14:32:38 +01:00
};
});
2015-01-30 14:24:39 +01:00
},{"amdefine":127}],121:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (require, exports, module) {
var util = require('./util');
var binarySearch = require('./binary-search');
2015-01-30 14:24:39 +01:00
var SourceMapConsumer = require('./source-map-consumer').SourceMapConsumer;
var BasicSourceMapConsumer = require('./basic-source-map-consumer').BasicSourceMapConsumer;
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* An IndexedSourceMapConsumer instance represents a parsed source map which
* we can query for information. It differs from BasicSourceMapConsumer in
* that it takes "indexed" source maps (i.e. ones with a "sections" field) as
* input.
2014-11-03 14:32:38 +01:00
*
2015-01-30 14:24:39 +01:00
* The only parameter is a raw source map (either as a JSON string, or already
* parsed to an object). According to the spec for indexed source maps, they
* have the following attributes:
2014-11-03 14:32:38 +01:00
*
* - version: Which version of the source map spec this map is following.
* - file: Optional. The generated file this source map is associated with.
2015-01-30 14:24:39 +01:00
* - sections: A list of section definitions.
2014-11-03 14:32:38 +01:00
*
2015-01-30 14:24:39 +01:00
* Each value under the "sections" field has two fields:
* - offset: The offset into the original specified at which this section
* begins to apply, defined as an object with a "line" and "column"
* field.
* - map: A source map definition. This source map could also be indexed,
* but doesn't have to be.
2014-11-03 14:32:38 +01:00
*
2015-01-30 14:24:39 +01:00
* Instead of the "map" field, it's also possible to have a "url" field
* specifying a URL to retrieve a source map from, but that's currently
* unsupported.
2014-11-03 14:32:38 +01:00
*
2015-01-30 14:24:39 +01:00
* Here's an example source map, taken from the source map spec[0], but
* modified to omit a section which uses the "url" field.
*
* {
* version : 3,
* file: "app.js",
* sections: [{
* offset: {line:100, column:10},
* map: {
* version : 3,
* file: "section.js",
* sources: ["foo.js", "bar.js"],
* names: ["src", "maps", "are", "fun"],
* mappings: "AAAA,E;;ABCDE;"
* }
* }],
* }
*
* [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
function IndexedSourceMapConsumer(aSourceMap) {
2014-11-03 14:32:38 +01:00
var sourceMap = aSourceMap;
if (typeof aSourceMap === 'string') {
sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
}
var version = util.getArg(sourceMap, 'version');
2015-01-30 14:24:39 +01:00
var sections = util.getArg(sourceMap, 'sections');
2014-11-03 14:32:38 +01:00
if (version != this._version) {
throw new Error('Unsupported version: ' + version);
}
2015-01-30 14:24:39 +01:00
var lastOffset = {
line: -1,
column: 0
};
this._sections = sections.map(function (s) {
if (s.url) {
// The url field will require support for asynchronicity.
// See https://github.com/mozilla/source-map/issues/16
throw new Error('Support for url field in sections not implemented.');
}
var offset = util.getArg(s, 'offset');
var offsetLine = util.getArg(offset, 'line');
var offsetColumn = util.getArg(offset, 'column');
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
if (offsetLine < lastOffset.line ||
(offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
throw new Error('Section offsets must be ordered and non-overlapping.');
}
lastOffset = offset;
return {
generatedOffset: {
// The offset fields are 0-based, but we use 1-based indices when
// encoding/decoding from VLQ.
generatedLine: offsetLine + 1,
generatedColumn: offsetColumn + 1
},
consumer: new SourceMapConsumer(util.getArg(s, 'map'))
}
});
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
/**
* The version of the source mapping spec that we are consuming.
*/
IndexedSourceMapConsumer.prototype._version = 3;
2014-11-03 14:32:38 +01:00
/**
2015-01-30 14:24:39 +01:00
* The list of original sources.
*/
Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
get: function () {
var sources = [];
for (var i = 0; i < this._sections.length; i++) {
for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
sources.push(this._sections[i].consumer.sources[j]);
}
};
return sources;
}
});
/**
* Returns the original source, line, and column information for the generated
* source's line and column positions provided. The only argument is an object
* with the following properties:
2014-11-03 14:32:38 +01:00
*
2015-01-30 14:24:39 +01:00
* - line: The line number in the generated source.
* - column: The column number in the generated source.
*
* and an object is returned with the following properties:
*
* - source: The original source file, or null.
* - line: The line number in the original source, or null.
* - column: The column number in the original source, or null.
* - name: The original identifier, or null.
2014-11-03 14:32:38 +01:00
*/
2015-01-30 14:24:39 +01:00
IndexedSourceMapConsumer.prototype.originalPositionFor =
function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
var needle = {
generatedLine: util.getArg(aArgs, 'line'),
generatedColumn: util.getArg(aArgs, 'column')
};
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// Find the section containing the generated position we're trying to map
// to an original position.
var sectionIndex = binarySearch.search(needle, this._sections,
function(needle, section) {
var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
if (cmp) {
return cmp;
}
return (needle.generatedColumn -
section.generatedOffset.generatedColumn);
});
var section = this._sections[sectionIndex];
if (!section) {
return {
source: null,
line: null,
column: null,
name: null
};
}
return section.consumer.originalPositionFor({
line: needle.generatedLine -
(section.generatedOffset.generatedLine - 1),
column: needle.generatedColumn -
(section.generatedOffset.generatedLine === needle.generatedLine
? section.generatedOffset.generatedColumn - 1
: 0)
});
};
/**
* Returns the original source content. The only argument is the url of the
* original source file. Returns null if no original source content is
* available.
*/
IndexedSourceMapConsumer.prototype.sourceContentFor =
function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
for (var i = 0; i < this._sections.length; i++) {
var section = this._sections[i];
var content = section.consumer.sourceContentFor(aSource, true);
if (content) {
return content;
}
}
if (nullOnMissing) {
return null;
}
else {
throw new Error('"' + aSource + '" is not in the SourceMap.');
}
};
/**
* Returns the generated line and column information for the original source,
* line, and column positions provided. The only argument is an object with
* the following properties:
*
* - source: The filename of the original source.
* - line: The line number in the original source.
* - column: The column number in the original source.
*
* and an object is returned with the following properties:
*
* - line: The line number in the generated source, or null.
* - column: The column number in the generated source, or null.
*/
IndexedSourceMapConsumer.prototype.generatedPositionFor =
function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
for (var i = 0; i < this._sections.length; i++) {
var section = this._sections[i];
// Only consider this section if the requested source is in the list of
// sources of the consumer.
if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
continue;
}
var generatedPosition = section.consumer.generatedPositionFor(aArgs);
if (generatedPosition) {
var ret = {
line: generatedPosition.line +
(section.generatedOffset.generatedLine - 1),
column: generatedPosition.column +
(section.generatedOffset.generatedLine === generatedPosition.line
? section.generatedOffset.generatedColumn - 1
: 0)
};
return ret;
}
}
return {
line: null,
column: null
};
};
/**
* Parse the mappings in a string in to a data structure which we can easily
* query (the ordered arrays in the `this.__generatedMappings` and
* `this.__originalMappings` properties).
*/
IndexedSourceMapConsumer.prototype._parseMappings =
function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
this.__generatedMappings = [];
this.__originalMappings = [];
for (var i = 0; i < this._sections.length; i++) {
var section = this._sections[i];
var sectionMappings = section.consumer._generatedMappings;
for (var j = 0; j < sectionMappings.length; j++) {
var mapping = sectionMappings[i];
var source = mapping.source;
var sourceRoot = section.consumer.sourceRoot;
if (source != null && sourceRoot != null) {
source = util.join(sourceRoot, source);
}
// The mappings coming from the consumer for the section have
// generated positions relative to the start of the section, so we
// need to offset them to be relative to the start of the concatenated
// generated file.
var adjustedMapping = {
source: source,
generatedLine: mapping.generatedLine +
(section.generatedOffset.generatedLine - 1),
generatedColumn: mapping.column +
(section.generatedOffset.generatedLine === mapping.generatedLine)
? section.generatedOffset.generatedColumn - 1
: 0,
originalLine: mapping.originalLine,
originalColumn: mapping.originalColumn,
name: mapping.name
};
this.__generatedMappings.push(adjustedMapping);
if (typeof adjustedMapping.originalLine === 'number') {
this.__originalMappings.push(adjustedMapping);
}
};
};
this.__generatedMappings.sort(util.compareByGeneratedPositions);
this.__originalMappings.sort(util.compareByOriginalPositions);
};
exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
});
},{"./basic-source-map-consumer":119,"./binary-search":120,"./source-map-consumer":123,"./util":126,"amdefine":127}],122:[function(require,module,exports){
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2014 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (require, exports, module) {
var util = require('./util');
/**
* Determine whether mappingB is after mappingA with respect to generated
* position.
*/
function generatedPositionAfter(mappingA, mappingB) {
// Optimized for most common case
var lineA = mappingA.generatedLine;
var lineB = mappingB.generatedLine;
var columnA = mappingA.generatedColumn;
var columnB = mappingB.generatedColumn;
return lineB > lineA || lineB == lineA && columnB >= columnA ||
util.compareByGeneratedPositions(mappingA, mappingB) <= 0;
}
/**
* A data structure to provide a sorted view of accumulated mappings in a
* performance conscious manner. It trades a neglibable overhead in general
* case for a large speedup in case of mappings being added in order.
*/
function MappingList() {
this._array = [];
this._sorted = true;
// Serves as infimum
this._last = {generatedLine: -1, generatedColumn: 0};
}
/**
* Iterate through internal items. This method takes the same arguments that
* `Array.prototype.forEach` takes.
*
* NOTE: The order of the mappings is NOT guaranteed.
*/
MappingList.prototype.unsortedForEach =
function MappingList_forEach(aCallback, aThisArg) {
this._array.forEach(aCallback, aThisArg);
};
/**
* Add the given source mapping.
*
* @param Object aMapping
*/
MappingList.prototype.add = function MappingList_add(aMapping) {
var mapping;
if (generatedPositionAfter(this._last, aMapping)) {
this._last = aMapping;
this._array.push(aMapping);
} else {
this._sorted = false;
this._array.push(aMapping);
}
};
/**
* Returns the flat, sorted array of mappings. The mappings are sorted by
* generated position.
*
* WARNING: This method returns internal data without copying, for
* performance. The return value must NOT be mutated, and should be treated as
* an immutable borrow. If you want to take ownership, you must make your own
* copy.
*/
MappingList.prototype.toArray = function MappingList_toArray() {
if (!this._sorted) {
this._array.sort(util.compareByGeneratedPositions);
this._sorted = true;
}
return this._array;
};
exports.MappingList = MappingList;
});
},{"./util":126,"amdefine":127}],123:[function(require,module,exports){
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (require, exports, module) {
var util = require('./util');
function SourceMapConsumer(aSourceMap) {
var sourceMap = aSourceMap;
if (typeof aSourceMap === 'string') {
sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
// We do late requires because the subclasses require() this file.
if (sourceMap.sections != null) {
var indexedSourceMapConsumer = require('./indexed-source-map-consumer');
return new indexedSourceMapConsumer.IndexedSourceMapConsumer(sourceMap);
} else {
var basicSourceMapConsumer = require('./basic-source-map-consumer');
return new basicSourceMapConsumer.BasicSourceMapConsumer(sourceMap);
}
}
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
SourceMapConsumer.fromSourceMap = function(aSourceMap) {
var basicSourceMapConsumer = require('./basic-source-map-consumer');
return basicSourceMapConsumer.BasicSourceMapConsumer
.fromSourceMap(aSourceMap);
}
2014-11-03 14:32:38 +01:00
/**
* The version of the source mapping spec that we are consuming.
*/
SourceMapConsumer.prototype._version = 3;
// `__generatedMappings` and `__originalMappings` are arrays that hold the
// parsed mapping coordinates from the source map's "mappings" attribute. They
// are lazily instantiated, accessed via the `_generatedMappings` and
// `_originalMappings` getters respectively, and we only parse the mappings
// and create these arrays once queried for a source location. We jump through
// these hoops because there can be many thousands of mappings, and parsing
// them is expensive, so we only want to do it if we must.
//
// Each object in the arrays is of the form:
//
// {
// generatedLine: The line number in the generated code,
// generatedColumn: The column number in the generated code,
// source: The path to the original source file that generated this
// chunk of code,
// originalLine: The line number in the original source that
// corresponds to this chunk of generated code,
// originalColumn: The column number in the original source that
// corresponds to this chunk of generated code,
// name: The name of the original symbol which generated this chunk of
// code.
// }
//
// All properties except for `generatedLine` and `generatedColumn` can be
// `null`.
//
// `_generatedMappings` is ordered by the generated positions.
//
// `_originalMappings` is ordered by the original positions.
SourceMapConsumer.prototype.__generatedMappings = null;
Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
get: function () {
if (!this.__generatedMappings) {
this.__generatedMappings = [];
this.__originalMappings = [];
this._parseMappings(this._mappings, this.sourceRoot);
}
return this.__generatedMappings;
}
});
SourceMapConsumer.prototype.__originalMappings = null;
Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
get: function () {
if (!this.__originalMappings) {
this.__generatedMappings = [];
this.__originalMappings = [];
this._parseMappings(this._mappings, this.sourceRoot);
}
return this.__originalMappings;
}
});
SourceMapConsumer.prototype._nextCharIsMappingSeparator =
function SourceMapConsumer_nextCharIsMappingSeparator(aStr) {
var c = aStr.charAt(0);
return c === ";" || c === ",";
};
/**
* Parse the mappings in a string in to a data structure which we can easily
* query (the ordered arrays in the `this.__generatedMappings` and
* `this.__originalMappings` properties).
*/
SourceMapConsumer.prototype._parseMappings =
function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
2015-01-30 14:24:39 +01:00
throw new Error("Subclasses must implement _parseMappings");
2014-11-03 14:32:38 +01:00
};
SourceMapConsumer.GENERATED_ORDER = 1;
SourceMapConsumer.ORIGINAL_ORDER = 2;
/**
* Iterate over each mapping between an original source/line/column and a
* generated line/column in this source map.
*
* @param Function aCallback
* The function that is called with each mapping.
* @param Object aContext
* Optional. If specified, this object will be the value of `this` every
* time that `aCallback` is called.
* @param aOrder
* Either `SourceMapConsumer.GENERATED_ORDER` or
* `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
* iterate over the mappings sorted by the generated file's line/column
* order or the original's source/line/column order, respectively. Defaults to
* `SourceMapConsumer.GENERATED_ORDER`.
*/
SourceMapConsumer.prototype.eachMapping =
function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
var context = aContext || null;
var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
var mappings;
switch (order) {
case SourceMapConsumer.GENERATED_ORDER:
mappings = this._generatedMappings;
break;
case SourceMapConsumer.ORIGINAL_ORDER:
mappings = this._originalMappings;
break;
default:
throw new Error("Unknown order of iteration.");
}
var sourceRoot = this.sourceRoot;
mappings.map(function (mapping) {
var source = mapping.source;
if (source != null && sourceRoot != null) {
source = util.join(sourceRoot, source);
}
return {
source: source,
generatedLine: mapping.generatedLine,
generatedColumn: mapping.generatedColumn,
originalLine: mapping.originalLine,
originalColumn: mapping.originalColumn,
name: mapping.name
};
}).forEach(aCallback, context);
};
2015-01-30 14:24:39 +01:00
/**
* Returns all generated line and column information for the original source
* and line provided. The only argument is an object with the following
* properties:
*
* - source: The filename of the original source.
* - line: The line number in the original source.
*
* and an array of objects is returned, each with the following properties:
*
* - line: The line number in the generated source, or null.
* - column: The column number in the generated source, or null.
*/
SourceMapConsumer.prototype.allGeneratedPositionsFor =
function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
// When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
// returns the index of the closest mapping less than the needle. By
// setting needle.originalColumn to Infinity, we thus find the last
// mapping for the given line, provided such a mapping exists.
var needle = {
source: util.getArg(aArgs, 'source'),
originalLine: util.getArg(aArgs, 'line'),
originalColumn: Infinity
};
if (this.sourceRoot != null) {
needle.source = util.relative(this.sourceRoot, needle.source);
}
var mappings = [];
var index = this._findMapping(needle,
this._originalMappings,
"originalLine",
"originalColumn",
util.compareByOriginalPositions);
if (index >= 0) {
var mapping = this._originalMappings[index];
while (mapping && mapping.originalLine === needle.originalLine) {
mappings.push({
line: util.getArg(mapping, 'generatedLine', null),
column: util.getArg(mapping, 'generatedColumn', null),
lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
});
mapping = this._originalMappings[--index];
}
}
return mappings.reverse();
};
2014-11-03 14:32:38 +01:00
exports.SourceMapConsumer = SourceMapConsumer;
});
2015-01-30 14:24:39 +01:00
},{"./basic-source-map-consumer":119,"./indexed-source-map-consumer":121,"./util":126,"amdefine":127}],124:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (require, exports, module) {
var base64VLQ = require('./base64-vlq');
var util = require('./util');
var ArraySet = require('./array-set').ArraySet;
2015-01-30 14:24:39 +01:00
var MappingList = require('./mapping-list').MappingList;
2014-11-03 14:32:38 +01:00
/**
* An instance of the SourceMapGenerator represents a source map which is
* being built incrementally. You may pass an object with the following
* properties:
*
* - file: The filename of the generated source.
* - sourceRoot: A root for all relative URLs in this source map.
*/
function SourceMapGenerator(aArgs) {
if (!aArgs) {
aArgs = {};
}
this._file = util.getArg(aArgs, 'file', null);
this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
2015-01-30 14:24:39 +01:00
this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
2014-11-03 14:32:38 +01:00
this._sources = new ArraySet();
this._names = new ArraySet();
2015-01-30 14:24:39 +01:00
this._mappings = new MappingList();
2014-11-03 14:32:38 +01:00
this._sourcesContents = null;
}
SourceMapGenerator.prototype._version = 3;
/**
* Creates a new SourceMapGenerator based on a SourceMapConsumer
*
* @param aSourceMapConsumer The SourceMap.
*/
SourceMapGenerator.fromSourceMap =
function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
var sourceRoot = aSourceMapConsumer.sourceRoot;
var generator = new SourceMapGenerator({
file: aSourceMapConsumer.file,
sourceRoot: sourceRoot
});
aSourceMapConsumer.eachMapping(function (mapping) {
var newMapping = {
generated: {
line: mapping.generatedLine,
column: mapping.generatedColumn
}
};
if (mapping.source != null) {
newMapping.source = mapping.source;
if (sourceRoot != null) {
newMapping.source = util.relative(sourceRoot, newMapping.source);
}
newMapping.original = {
line: mapping.originalLine,
column: mapping.originalColumn
};
if (mapping.name != null) {
newMapping.name = mapping.name;
}
}
generator.addMapping(newMapping);
});
aSourceMapConsumer.sources.forEach(function (sourceFile) {
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
if (content != null) {
generator.setSourceContent(sourceFile, content);
}
});
return generator;
};
/**
* Add a single mapping from original source line and column to the generated
* source's line and column for this source map being created. The mapping
* object should have the following properties:
*
* - generated: An object with the generated line and column positions.
* - original: An object with the original line and column positions.
* - source: The original source file (relative to the sourceRoot).
* - name: An optional original token name for this mapping.
*/
SourceMapGenerator.prototype.addMapping =
function SourceMapGenerator_addMapping(aArgs) {
var generated = util.getArg(aArgs, 'generated');
var original = util.getArg(aArgs, 'original', null);
var source = util.getArg(aArgs, 'source', null);
var name = util.getArg(aArgs, 'name', null);
2015-01-30 14:24:39 +01:00
if (!this._skipValidation) {
this._validateMapping(generated, original, source, name);
}
2014-11-03 14:32:38 +01:00
if (source != null && !this._sources.has(source)) {
this._sources.add(source);
}
if (name != null && !this._names.has(name)) {
this._names.add(name);
}
2015-01-30 14:24:39 +01:00
this._mappings.add({
2014-11-03 14:32:38 +01:00
generatedLine: generated.line,
generatedColumn: generated.column,
originalLine: original != null && original.line,
originalColumn: original != null && original.column,
source: source,
name: name
});
};
/**
* Set the source content for a source file.
*/
SourceMapGenerator.prototype.setSourceContent =
function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
var source = aSourceFile;
if (this._sourceRoot != null) {
source = util.relative(this._sourceRoot, source);
}
if (aSourceContent != null) {
// Add the source content to the _sourcesContents map.
// Create a new _sourcesContents map if the property is null.
if (!this._sourcesContents) {
this._sourcesContents = {};
}
this._sourcesContents[util.toSetString(source)] = aSourceContent;
} else if (this._sourcesContents) {
// Remove the source file from the _sourcesContents map.
// If the _sourcesContents map is empty, set the property to null.
delete this._sourcesContents[util.toSetString(source)];
if (Object.keys(this._sourcesContents).length === 0) {
this._sourcesContents = null;
}
}
};
/**
* Applies the mappings of a sub-source-map for a specific source file to the
* source map being generated. Each mapping to the supplied source file is
* rewritten using the supplied source map. Note: The resolution for the
* resulting mappings is the minimium of this map and the supplied map.
*
* @param aSourceMapConsumer The source map to be applied.
* @param aSourceFile Optional. The filename of the source file.
* If omitted, SourceMapConsumer's file property will be used.
* @param aSourceMapPath Optional. The dirname of the path to the source map
* to be applied. If relative, it is relative to the SourceMapConsumer.
* This parameter is needed when the two source maps aren't in the same
* directory, and the source map to be applied contains relative source
* paths. If so, those relative source paths need to be rewritten
* relative to the SourceMapGenerator.
*/
SourceMapGenerator.prototype.applySourceMap =
function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
var sourceFile = aSourceFile;
// If aSourceFile is omitted, we will use the file property of the SourceMap
if (aSourceFile == null) {
if (aSourceMapConsumer.file == null) {
throw new Error(
'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
'or the source map\'s "file" property. Both were omitted.'
);
}
sourceFile = aSourceMapConsumer.file;
}
var sourceRoot = this._sourceRoot;
// Make "sourceFile" relative if an absolute Url is passed.
if (sourceRoot != null) {
sourceFile = util.relative(sourceRoot, sourceFile);
}
// Applying the SourceMap can add and remove items from the sources and
// the names array.
var newSources = new ArraySet();
var newNames = new ArraySet();
// Find mappings for the "sourceFile"
2015-01-30 14:24:39 +01:00
this._mappings.unsortedForEach(function (mapping) {
2014-11-03 14:32:38 +01:00
if (mapping.source === sourceFile && mapping.originalLine != null) {
// Check if it can be mapped by the source map, then update the mapping.
var original = aSourceMapConsumer.originalPositionFor({
line: mapping.originalLine,
column: mapping.originalColumn
});
if (original.source != null) {
// Copy mapping
mapping.source = original.source;
if (aSourceMapPath != null) {
mapping.source = util.join(aSourceMapPath, mapping.source)
}
if (sourceRoot != null) {
mapping.source = util.relative(sourceRoot, mapping.source);
}
mapping.originalLine = original.line;
mapping.originalColumn = original.column;
if (original.name != null) {
mapping.name = original.name;
}
}
}
var source = mapping.source;
if (source != null && !newSources.has(source)) {
newSources.add(source);
}
var name = mapping.name;
if (name != null && !newNames.has(name)) {
newNames.add(name);
}
}, this);
this._sources = newSources;
this._names = newNames;
// Copy sourcesContents of applied map.
aSourceMapConsumer.sources.forEach(function (sourceFile) {
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
if (content != null) {
if (aSourceMapPath != null) {
sourceFile = util.join(aSourceMapPath, sourceFile);
}
if (sourceRoot != null) {
sourceFile = util.relative(sourceRoot, sourceFile);
}
this.setSourceContent(sourceFile, content);
}
}, this);
};
/**
* A mapping can have one of the three levels of data:
*
* 1. Just the generated position.
* 2. The Generated position, original position, and original source.
* 3. Generated and original position, original source, as well as a name
* token.
*
* To maintain consistency, we validate that any new mapping being added falls
* in to one of these categories.
*/
SourceMapGenerator.prototype._validateMapping =
function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
aName) {
if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
&& aGenerated.line > 0 && aGenerated.column >= 0
&& !aOriginal && !aSource && !aName) {
// Case 1.
return;
}
else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
&& aOriginal && 'line' in aOriginal && 'column' in aOriginal
&& aGenerated.line > 0 && aGenerated.column >= 0
&& aOriginal.line > 0 && aOriginal.column >= 0
&& aSource) {
// Cases 2 and 3.
return;
}
else {
throw new Error('Invalid mapping: ' + JSON.stringify({
generated: aGenerated,
source: aSource,
original: aOriginal,
name: aName
}));
}
};
/**
* Serialize the accumulated mappings in to the stream of base 64 VLQs
* specified by the source map format.
*/
SourceMapGenerator.prototype._serializeMappings =
function SourceMapGenerator_serializeMappings() {
var previousGeneratedColumn = 0;
var previousGeneratedLine = 1;
var previousOriginalColumn = 0;
var previousOriginalLine = 0;
var previousName = 0;
var previousSource = 0;
var result = '';
var mapping;
2015-01-30 14:24:39 +01:00
var mappings = this._mappings.toArray();
2014-11-03 14:32:38 +01:00
2015-01-30 14:24:39 +01:00
for (var i = 0, len = mappings.length; i < len; i++) {
mapping = mappings[i];
2014-11-03 14:32:38 +01:00
if (mapping.generatedLine !== previousGeneratedLine) {
previousGeneratedColumn = 0;
while (mapping.generatedLine !== previousGeneratedLine) {
result += ';';
previousGeneratedLine++;
}
}
else {
if (i > 0) {
2015-01-30 14:24:39 +01:00
if (!util.compareByGeneratedPositions(mapping, mappings[i - 1])) {
2014-11-03 14:32:38 +01:00
continue;
}
result += ',';
}
}
result += base64VLQ.encode(mapping.generatedColumn
- previousGeneratedColumn);
previousGeneratedColumn = mapping.generatedColumn;
if (mapping.source != null) {
result += base64VLQ.encode(this._sources.indexOf(mapping.source)
- previousSource);
previousSource = this._sources.indexOf(mapping.source);
// lines are stored 0-based in SourceMap spec version 3
result += base64VLQ.encode(mapping.originalLine - 1
- previousOriginalLine);
previousOriginalLine = mapping.originalLine - 1;
result += base64VLQ.encode(mapping.originalColumn
- previousOriginalColumn);
previousOriginalColumn = mapping.originalColumn;
if (mapping.name != null) {
result += base64VLQ.encode(this._names.indexOf(mapping.name)
- previousName);
previousName = this._names.indexOf(mapping.name);
}
}
}
return result;
};
SourceMapGenerator.prototype._generateSourcesContent =
function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
return aSources.map(function (source) {
if (!this._sourcesContents) {
return null;
}
if (aSourceRoot != null) {
source = util.relative(aSourceRoot, source);
}
var key = util.toSetString(source);
return Object.prototype.hasOwnProperty.call(this._sourcesContents,
key)
? this._sourcesContents[key]
: null;
}, this);
};
/**
* Externalize the source map.
*/
SourceMapGenerator.prototype.toJSON =
function SourceMapGenerator_toJSON() {
var map = {
version: this._version,
sources: this._sources.toArray(),
names: this._names.toArray(),
mappings: this._serializeMappings()
};
if (this._file != null) {
map.file = this._file;
}
if (this._sourceRoot != null) {
map.sourceRoot = this._sourceRoot;
}
if (this._sourcesContents) {
map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
}
return map;
};
/**
* Render the source map being generated to a string.
*/
SourceMapGenerator.prototype.toString =
function SourceMapGenerator_toString() {
return JSON.stringify(this);
};
exports.SourceMapGenerator = SourceMapGenerator;
});
2015-01-30 14:24:39 +01:00
},{"./array-set":116,"./base64-vlq":117,"./mapping-list":122,"./util":126,"amdefine":127}],125:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (require, exports, module) {
var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;
var util = require('./util');
// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
// operating systems these days (capturing the result).
var REGEX_NEWLINE = /(\r?\n)/;
2015-01-30 14:24:39 +01:00
// Newline character code for charCodeAt() comparisons
var NEWLINE_CODE = 10;
// Private symbol for identifying `SourceNode`s when multiple versions of
// the source-map library are loaded. This MUST NOT CHANGE across
// versions!
var isSourceNode = "$$$isSourceNode$$$";
2014-11-03 14:32:38 +01:00
/**
* SourceNodes provide a way to abstract over interpolating/concatenating
* snippets of generated JavaScript source code while maintaining the line and
* column information associated with the original source code.
*
* @param aLine The original line number.
* @param aColumn The original column number.
* @param aSource The original source's filename.
* @param aChunks Optional. An array of strings which are snippets of
* generated JS, or other SourceNodes.
* @param aName The original identifier.
*/
function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
this.children = [];
this.sourceContents = {};
this.line = aLine == null ? null : aLine;
this.column = aColumn == null ? null : aColumn;
this.source = aSource == null ? null : aSource;
this.name = aName == null ? null : aName;
2015-01-30 14:24:39 +01:00
this[isSourceNode] = true;
2014-11-03 14:32:38 +01:00
if (aChunks != null) this.add(aChunks);
}
/**
* Creates a SourceNode from generated code and a SourceMapConsumer.
*
* @param aGeneratedCode The generated code
* @param aSourceMapConsumer The SourceMap for the generated code
* @param aRelativePath Optional. The path that relative sources in the
* SourceMapConsumer should be relative to.
*/
SourceNode.fromStringWithSourceMap =
function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
// The SourceNode we want to fill with the generated code
// and the SourceMap
var node = new SourceNode();
// All even indices of this array are one line of the generated code,
// while all odd indices are the newlines between two adjacent lines
// (since `REGEX_NEWLINE` captures its match).
// Processed fragments are removed from this array, by calling `shiftNextLine`.
var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
var shiftNextLine = function() {
var lineContents = remainingLines.shift();
// The last line of a file might not have a newline.
var newLine = remainingLines.shift() || "";
return lineContents + newLine;
};
// We need to remember the position of "remainingLines"
var lastGeneratedLine = 1, lastGeneratedColumn = 0;
// The generate SourceNodes we need a code range.
// To extract it current and last mapping is used.
// Here we store the last mapping.
var lastMapping = null;
aSourceMapConsumer.eachMapping(function (mapping) {
if (lastMapping !== null) {
// We add the code from "lastMapping" to "mapping":
// First check if there is a new line in between.
if (lastGeneratedLine < mapping.generatedLine) {
var code = "";
// Associate first line with "lastMapping"
addMappingWithCode(lastMapping, shiftNextLine());
lastGeneratedLine++;
lastGeneratedColumn = 0;
// The remaining code is added without mapping
} else {
// There is no new line in between.
// Associate the code between "lastGeneratedColumn" and
// "mapping.generatedColumn" with "lastMapping"
var nextLine = remainingLines[0];
var code = nextLine.substr(0, mapping.generatedColumn -
lastGeneratedColumn);
remainingLines[0] = nextLine.substr(mapping.generatedColumn -
lastGeneratedColumn);
lastGeneratedColumn = mapping.generatedColumn;
addMappingWithCode(lastMapping, code);
// No more remaining code, continue
lastMapping = mapping;
return;
}
}
// We add the generated code until the first mapping
// to the SourceNode without any mapping.
// Each line is added as separate string.
while (lastGeneratedLine < mapping.generatedLine) {
node.add(shiftNextLine());
lastGeneratedLine++;
}
if (lastGeneratedColumn < mapping.generatedColumn) {
var nextLine = remainingLines[0];
node.add(nextLine.substr(0, mapping.generatedColumn));
remainingLines[0] = nextLine.substr(mapping.generatedColumn);
lastGeneratedColumn = mapping.generatedColumn;
}
lastMapping = mapping;
}, this);
// We have processed all mappings.
if (remainingLines.length > 0) {
if (lastMapping) {
// Associate the remaining code in the current line with "lastMapping"
addMappingWithCode(lastMapping, shiftNextLine());
}
// and add the remaining lines without any mapping
node.add(remainingLines.join(""));
}
// Copy sourcesContent into SourceNode
aSourceMapConsumer.sources.forEach(function (sourceFile) {
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
if (content != null) {
if (aRelativePath != null) {
sourceFile = util.join(aRelativePath, sourceFile);
}
node.setSourceContent(sourceFile, content);
}
});
return node;
function addMappingWithCode(mapping, code) {
if (mapping === null || mapping.source === undefined) {
node.add(code);
} else {
var source = aRelativePath
? util.join(aRelativePath, mapping.source)
: mapping.source;
node.add(new SourceNode(mapping.originalLine,
mapping.originalColumn,
source,
code,
mapping.name));
}
}
};
/**
* Add a chunk of generated JS to this source node.
*
* @param aChunk A string snippet of generated JS code, another instance of
* SourceNode, or an array where each member is one of those things.
*/
SourceNode.prototype.add = function SourceNode_add(aChunk) {
if (Array.isArray(aChunk)) {
aChunk.forEach(function (chunk) {
this.add(chunk);
}, this);
}
2015-01-30 14:24:39 +01:00
else if (aChunk[isSourceNode] || typeof aChunk === "string") {
2014-11-03 14:32:38 +01:00
if (aChunk) {
this.children.push(aChunk);
}
}
else {
throw new TypeError(
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
);
}
return this;
};
/**
* Add a chunk of generated JS to the beginning of this source node.
*
* @param aChunk A string snippet of generated JS code, another instance of
* SourceNode, or an array where each member is one of those things.
*/
SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
if (Array.isArray(aChunk)) {
for (var i = aChunk.length-1; i >= 0; i--) {
this.prepend(aChunk[i]);
}
}
2015-01-30 14:24:39 +01:00
else if (aChunk[isSourceNode] || typeof aChunk === "string") {
2014-11-03 14:32:38 +01:00
this.children.unshift(aChunk);
}
else {
throw new TypeError(
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
);
}
return this;
};
/**
* Walk over the tree of JS snippets in this node and its children. The
* walking function is called once for each snippet of JS and is passed that
* snippet and the its original associated source's line/column location.
*
* @param aFn The traversal function.
*/
SourceNode.prototype.walk = function SourceNode_walk(aFn) {
var chunk;
for (var i = 0, len = this.children.length; i < len; i++) {
chunk = this.children[i];
2015-01-30 14:24:39 +01:00
if (chunk[isSourceNode]) {
2014-11-03 14:32:38 +01:00
chunk.walk(aFn);
}
else {
if (chunk !== '') {
aFn(chunk, { source: this.source,
line: this.line,
column: this.column,
name: this.name });
}
}
}
};
/**
* Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
* each of `this.children`.
*
* @param aSep The separator.
*/
SourceNode.prototype.join = function SourceNode_join(aSep) {
var newChildren;
var i;
var len = this.children.length;
if (len > 0) {
newChildren = [];
for (i = 0; i < len-1; i++) {
newChildren.push(this.children[i]);
newChildren.push(aSep);
}
newChildren.push(this.children[i]);
this.children = newChildren;
}
return this;
};
/**
* Call String.prototype.replace on the very right-most source snippet. Useful
* for trimming whitespace from the end of a source node, etc.
*
* @param aPattern The pattern to replace.
* @param aReplacement The thing to replace the pattern with.
*/
SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
var lastChild = this.children[this.children.length - 1];
2015-01-30 14:24:39 +01:00
if (lastChild[isSourceNode]) {
2014-11-03 14:32:38 +01:00
lastChild.replaceRight(aPattern, aReplacement);
}
else if (typeof lastChild === 'string') {
this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
}
else {
this.children.push(''.replace(aPattern, aReplacement));
}
return this;
};
/**
* Set the source content for a source file. This will be added to the SourceMapGenerator
* in the sourcesContent field.
*
* @param aSourceFile The filename of the source file
* @param aSourceContent The content of the source file
*/
SourceNode.prototype.setSourceContent =
function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
};
/**
* Walk over the tree of SourceNodes. The walking function is called for each
* source file content and is passed the filename and source content.
*
* @param aFn The traversal function.
*/
SourceNode.prototype.walkSourceContents =
function SourceNode_walkSourceContents(aFn) {
for (var i = 0, len = this.children.length; i < len; i++) {
2015-01-30 14:24:39 +01:00
if (this.children[i][isSourceNode]) {
2014-11-03 14:32:38 +01:00
this.children[i].walkSourceContents(aFn);
}
}
var sources = Object.keys(this.sourceContents);
for (var i = 0, len = sources.length; i < len; i++) {
aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
}
};
/**
* Return the string representation of this source node. Walks over the tree
* and concatenates all the various snippets together to one string.
*/
SourceNode.prototype.toString = function SourceNode_toString() {
var str = "";
this.walk(function (chunk) {
str += chunk;
});
return str;
};
/**
* Returns the string representation of this source node along with a source
* map.
*/
SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
var generated = {
code: "",
line: 1,
column: 0
};
var map = new SourceMapGenerator(aArgs);
var sourceMappingActive = false;
var lastOriginalSource = null;
var lastOriginalLine = null;
var lastOriginalColumn = null;
var lastOriginalName = null;
this.walk(function (chunk, original) {
generated.code += chunk;
if (original.source !== null
&& original.line !== null
&& original.column !== null) {
if(lastOriginalSource !== original.source
|| lastOriginalLine !== original.line
|| lastOriginalColumn !== original.column
|| lastOriginalName !== original.name) {
map.addMapping({
source: original.source,
original: {
line: original.line,
column: original.column
},
generated: {
line: generated.line,
column: generated.column
},
name: original.name
});
}
lastOriginalSource = original.source;
lastOriginalLine = original.line;
lastOriginalColumn = original.column;
lastOriginalName = original.name;
sourceMappingActive = true;
} else if (sourceMappingActive) {
map.addMapping({
generated: {
line: generated.line,
column: generated.column
}
});
lastOriginalSource = null;
sourceMappingActive = false;
}
2015-01-30 14:24:39 +01:00
for (var idx = 0, length = chunk.length; idx < length; idx++) {
if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
2014-11-03 14:32:38 +01:00
generated.line++;
generated.column = 0;
// Mappings end at eol
2015-01-30 14:24:39 +01:00
if (idx + 1 === length) {
2014-11-03 14:32:38 +01:00
lastOriginalSource = null;
sourceMappingActive = false;
} else if (sourceMappingActive) {
map.addMapping({
source: original.source,
original: {
line: original.line,
column: original.column
},
generated: {
line: generated.line,
column: generated.column
},
name: original.name
});
}
} else {
2015-01-30 14:24:39 +01:00
generated.column++;
2014-11-03 14:32:38 +01:00
}
2015-01-30 14:24:39 +01:00
}
2014-11-03 14:32:38 +01:00
});
this.walkSourceContents(function (sourceFile, sourceContent) {
map.setSourceContent(sourceFile, sourceContent);
});
return { code: generated.code, map: map };
};
exports.SourceNode = SourceNode;
});
2015-01-30 14:24:39 +01:00
},{"./source-map-generator":124,"./util":126,"amdefine":127}],126:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (require, exports, module) {
/**
* This is a helper function for getting values from parameter/options
* objects.
*
* @param args The object we are extracting values from
* @param name The name of the property we are getting.
* @param defaultValue An optional value to return if the property is missing
* from the object. If this is not specified and the property is missing, an
* error will be thrown.
*/
function getArg(aArgs, aName, aDefaultValue) {
if (aName in aArgs) {
return aArgs[aName];
} else if (arguments.length === 3) {
return aDefaultValue;
} else {
throw new Error('"' + aName + '" is a required argument.');
}
}
exports.getArg = getArg;
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
var dataUrlRegexp = /^data:.+\,.+$/;
function urlParse(aUrl) {
var match = aUrl.match(urlRegexp);
if (!match) {
return null;
}
return {
scheme: match[1],
auth: match[2],
host: match[3],
port: match[4],
path: match[5]
};
}
exports.urlParse = urlParse;
function urlGenerate(aParsedUrl) {
var url = '';
if (aParsedUrl.scheme) {
url += aParsedUrl.scheme + ':';
}
url += '//';
if (aParsedUrl.auth) {
url += aParsedUrl.auth + '@';
}
if (aParsedUrl.host) {
url += aParsedUrl.host;
}
if (aParsedUrl.port) {
url += ":" + aParsedUrl.port
}
if (aParsedUrl.path) {
url += aParsedUrl.path;
}
return url;
}
exports.urlGenerate = urlGenerate;
/**
* Normalizes a path, or the path portion of a URL:
*
* - Replaces consequtive slashes with one slash.
* - Removes unnecessary '.' parts.
* - Removes unnecessary '<dir>/..' parts.
*
* Based on code in the Node.js 'path' core module.
*
* @param aPath The path or url to normalize.
*/
function normalize(aPath) {
var path = aPath;
var url = urlParse(aPath);
if (url) {
if (!url.path) {
return aPath;
}
path = url.path;
}
var isAbsolute = (path.charAt(0) === '/');
var parts = path.split(/\/+/);
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
part = parts[i];
if (part === '.') {
parts.splice(i, 1);
} else if (part === '..') {
up++;
} else if (up > 0) {
if (part === '') {
// The first part is blank if the path is absolute. Trying to go
// above the root is a no-op. Therefore we can remove all '..' parts
// directly after the root.
parts.splice(i + 1, up);
up = 0;
} else {
parts.splice(i, 2);
up--;
}
}
}
path = parts.join('/');
if (path === '') {
path = isAbsolute ? '/' : '.';
}
if (url) {
url.path = path;
return urlGenerate(url);
}
return path;
}
exports.normalize = normalize;
/**
* Joins two paths/URLs.
*
* @param aRoot The root path or URL.
* @param aPath The path or URL to be joined with the root.
*
* - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
* scheme-relative URL: Then the scheme of aRoot, if any, is prepended
* first.
* - Otherwise aPath is a path. If aRoot is a URL, then its path portion
* is updated with the result and aRoot is returned. Otherwise the result
* is returned.
* - If aPath is absolute, the result is aPath.
* - Otherwise the two paths are joined with a slash.
* - Joining for example 'http://' and 'www.example.com' is also supported.
*/
function join(aRoot, aPath) {
if (aRoot === "") {
aRoot = ".";
}
if (aPath === "") {
aPath = ".";
}
var aPathUrl = urlParse(aPath);
var aRootUrl = urlParse(aRoot);
if (aRootUrl) {
aRoot = aRootUrl.path || '/';
}
// `join(foo, '//www.example.org')`
if (aPathUrl && !aPathUrl.scheme) {
if (aRootUrl) {
aPathUrl.scheme = aRootUrl.scheme;
}
return urlGenerate(aPathUrl);
}
if (aPathUrl || aPath.match(dataUrlRegexp)) {
return aPath;
}
// `join('http://', 'www.example.com')`
if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
aRootUrl.host = aPath;
return urlGenerate(aRootUrl);
}
var joined = aPath.charAt(0) === '/'
? aPath
: normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
if (aRootUrl) {
aRootUrl.path = joined;
return urlGenerate(aRootUrl);
}
return joined;
}
exports.join = join;
/**
* Make a path relative to a URL or another path.
*
* @param aRoot The root path or URL.
* @param aPath The path or URL to be made relative to aRoot.
*/
function relative(aRoot, aPath) {
if (aRoot === "") {
aRoot = ".";
}
aRoot = aRoot.replace(/\/$/, '');
// XXX: It is possible to remove this block, and the tests still pass!
var url = urlParse(aRoot);
if (aPath.charAt(0) == "/" && url && url.path == "/") {
return aPath.slice(1);
}
return aPath.indexOf(aRoot + '/') === 0
? aPath.substr(aRoot.length + 1)
: aPath;
}
exports.relative = relative;
/**
* Because behavior goes wacky when you set `__proto__` on objects, we
* have to prefix all the strings in our set with an arbitrary character.
*
* See https://github.com/mozilla/source-map/pull/31 and
* https://github.com/mozilla/source-map/issues/30
*
* @param String aStr
*/
function toSetString(aStr) {
return '$' + aStr;
}
exports.toSetString = toSetString;
function fromSetString(aStr) {
return aStr.substr(1);
}
exports.fromSetString = fromSetString;
function strcmp(aStr1, aStr2) {
var s1 = aStr1 || "";
var s2 = aStr2 || "";
return (s1 > s2) - (s1 < s2);
}
/**
* Comparator between two mappings where the original positions are compared.
*
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
* mappings with the same original source/line/column, but different generated
* line and column the same. Useful when searching for a mapping with a
* stubbed out mapping.
*/
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
var cmp;
cmp = strcmp(mappingA.source, mappingB.source);
if (cmp) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp || onlyCompareOriginal) {
return cmp;
}
cmp = strcmp(mappingA.name, mappingB.name);
if (cmp) {
return cmp;
}
cmp = mappingA.generatedLine - mappingB.generatedLine;
if (cmp) {
return cmp;
}
return mappingA.generatedColumn - mappingB.generatedColumn;
};
exports.compareByOriginalPositions = compareByOriginalPositions;
/**
* Comparator between two mappings where the generated positions are
* compared.
*
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
* mappings with the same generated line and column, but different
* source/name/original line and column the same. Useful when searching for a
* mapping with a stubbed out mapping.
*/
function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) {
var cmp;
cmp = mappingA.generatedLine - mappingB.generatedLine;
if (cmp) {
return cmp;
}
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp || onlyCompareGenerated) {
return cmp;
}
cmp = strcmp(mappingA.source, mappingB.source);
if (cmp) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
};
exports.compareByGeneratedPositions = compareByGeneratedPositions;
});
2015-01-30 14:24:39 +01:00
},{"amdefine":127}],127:[function(require,module,exports){
2014-11-03 14:32:38 +01:00
(function (process,__filename){
/** vim: et:ts=4:sw=4:sts=4
* @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/amdefine for details
*/
/*jslint node: true */
/*global module, process */
'use strict';
/**
* Creates a define for node.
* @param {Object} module the "module" object that is defined by Node for the
* current module.
* @param {Function} [requireFn]. Node's require function for the current module.
* It only needs to be passed in Node versions before 0.5, when module.require
* did not exist.
* @returns {Function} a define function that is usable for the current node
* module.
*/
function amdefine(module, requireFn) {
'use strict';
var defineCache = {},
loaderCache = {},
alreadyCalled = false,
path = require('path'),
makeRequire, stringRequire;
/**
* Trims the . and .. from an array of path segments.
* It will keep a leading path segment if a .. will become
* the first path segment, to help with module name lookups,
* which act like paths, but can be remapped. But the end result,
* all paths that use this function should look normalized.
* NOTE: this method MODIFIES the input array.
* @param {Array} ary the array of path segments.
*/
function trimDots(ary) {
var i, part;
for (i = 0; ary[i]; i+= 1) {
part = ary[i];
if (part === '.') {
ary.splice(i, 1);
i -= 1;
} else if (part === '..') {
if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
//End of the line. Keep at least one non-dot
//path segment at the front so it can be mapped
//correctly to disk. Otherwise, there is likely
//no path mapping for a path starting with '..'.
//This can still fail, but catches the most reasonable
//uses of ..
break;
} else if (i > 0) {
ary.splice(i - 1, 2);
i -= 2;
}
}
}
}
function normalize(name, baseName) {
var baseParts;
//Adjust any relative paths.
if (name && name.charAt(0) === '.') {
//If have a base name, try to normalize against it,
//otherwise, assume it is a top-level require that will
//be relative to baseUrl in the end.
if (baseName) {
baseParts = baseName.split('/');
baseParts = baseParts.slice(0, baseParts.length - 1);
baseParts = baseParts.concat(name.split('/'));
trimDots(baseParts);
name = baseParts.join('/');
}
}
return name;
}
/**
* Create the normalize() function passed to a loader plugin's
* normalize method.
*/
function makeNormalize(relName) {
return function (name) {
return normalize(name, relName);
};
}
function makeLoad(id) {
function load(value) {
loaderCache[id] = value;
}
load.fromText = function (id, text) {
//This one is difficult because the text can/probably uses
//define, and any relative paths and requires should be relative
//to that id was it would be found on disk. But this would require
//bootstrapping a module/require fairly deeply from node core.
//Not sure how best to go about that yet.
throw new Error('amdefine does not implement load.fromText');
};
return load;
}
makeRequire = function (systemRequire, exports, module, relId) {
function amdRequire(deps, callback) {
if (typeof deps === 'string') {
//Synchronous, single module require('')
return stringRequire(systemRequire, exports, module, deps, relId);
} else {
//Array of dependencies with a callback.
//Convert the dependencies to modules.
deps = deps.map(function (depName) {
return stringRequire(systemRequire, exports, module, depName, relId);
});
//Wait for next tick to call back the require call.
process.nextTick(function () {
callback.apply(null, deps);
});
}
}
amdRequire.toUrl = function (filePath) {
if (filePath.indexOf('.') === 0) {
return normalize(filePath, path.dirname(module.filename));
} else {
return filePath;
}
};
return amdRequire;
};
//Favor explicit value, passed in if the module wants to support Node 0.4.
requireFn = requireFn || function req() {
return module.require.apply(module, arguments);
};
function runFactory(id, deps, factory) {
var r, e, m, result;
if (id) {
e = loaderCache[id] = {};
m = {
id: id,
uri: __filename,
exports: e
};
r = makeRequire(requireFn, e, m, id);
} else {
//Only support one define call per file
if (alreadyCalled) {
throw new Error('amdefine with no module ID cannot be called more than once per file.');
}
alreadyCalled = true;
//Use the real variables from node
//Use module.exports for exports, since
//the exports in here is amdefine exports.
e = module.exports;
m = module;
r = makeRequire(requireFn, e, m, module.id);
}
//If there are dependencies, they are strings, so need
//to convert them to dependency values.
if (deps) {
deps = deps.map(function (depName) {
return r(depName);
});
}
//Call the factory with the right dependencies.
if (typeof factory === 'function') {
result = factory.apply(m.exports, deps);
} else {
result = factory;
}
if (result !== undefined) {
m.exports = result;
if (id) {
loaderCache[id] = m.exports;
}
}
}
stringRequire = function (systemRequire, exports, module, id, relId) {
//Split the ID by a ! so that
var index = id.indexOf('!'),
originalId = id,
prefix, plugin;
if (index === -1) {
id = normalize(id, relId);
//Straight module lookup. If it is one of the special dependencies,
//deal with it, otherwise, delegate to node.
if (id === 'require') {
return makeRequire(systemRequire, exports, module, relId);
} else if (id === 'exports') {
return exports;
} else if (id === 'module') {
return module;
} else if (loaderCache.hasOwnProperty(id)) {
return loaderCache[id];
} else if (defineCache[id]) {
runFactory.apply(null, defineCache[id]);
return loaderCache[id];
} else {
if(systemRequire) {
return systemRequire(originalId);
} else {
throw new Error('No module with ID: ' + id);
}
}
} else {
//There is a plugin in play.
prefix = id.substring(0, index);
id = id.substring(index + 1, id.length);
plugin = stringRequire(systemRequire, exports, module, prefix, relId);
if (plugin.normalize) {
id = plugin.normalize(id, makeNormalize(relId));
} else {
//Normalize the ID normally.
id = normalize(id, relId);
}
if (loaderCache[id]) {
return loaderCache[id];
} else {
plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {});
return loaderCache[id];
}
}
};
//Create a define function specific to the module asking for amdefine.
function define(id, deps, factory) {
if (Array.isArray(id)) {
factory = deps;
deps = id;
id = undefined;
} else if (typeof id !== 'string') {
factory = id;
id = deps = undefined;
}
if (deps && !Array.isArray(deps)) {
factory = deps;
deps = undefined;
}
if (!deps) {
deps = ['require', 'exports', 'module'];
}
//Set up properties for this module. If an ID, then use
//internal cache. If no ID, then use the external variables
//for this node module.
if (id) {
//Put the module in deep freeze until there is a
//require call for it.
defineCache[id] = [id, deps, factory];
} else {
runFactory(id, deps, factory);
}
}
//define.require, which has access to all the values in the
//cache. Useful for AMD modules that all have IDs in the file,
//but need to finally export a value to node based on one of those
//IDs.
define.require = function (id) {
if (loaderCache[id]) {
return loaderCache[id];
}
if (defineCache[id]) {
runFactory.apply(null, defineCache[id]);
return loaderCache[id];
}
};
define.amd = {};
return define;
}
module.exports = amdefine;
}).call(this,require('_process'),"/../node_modules/postcss/node_modules/source-map/node_modules/amdefine/amdefine.js")
2015-01-30 14:24:39 +01:00
},{"_process":54,"path":53}]},{},[1])(1)
2014-11-03 14:32:38 +01:00
});