mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-13 21:33:32 -06:00
Initial commit
This commit is contained in:
57
node_modules/autoprefixer/lib/hacks/align-content.js
generated
vendored
Normal file
57
node_modules/autoprefixer/lib/hacks/align-content.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
(function() {
|
||||
var AlignContent, Declaration, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
AlignContent = (function(superClass) {
|
||||
extend(AlignContent, superClass);
|
||||
|
||||
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 ref, spec;
|
||||
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);
|
57
node_modules/autoprefixer/lib/hacks/align-items.js
generated
vendored
Normal file
57
node_modules/autoprefixer/lib/hacks/align-items.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
(function() {
|
||||
var AlignItems, Declaration, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
AlignItems = (function(superClass) {
|
||||
extend(AlignItems, superClass);
|
||||
|
||||
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 ref, spec;
|
||||
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);
|
55
node_modules/autoprefixer/lib/hacks/align-self.js
generated
vendored
Normal file
55
node_modules/autoprefixer/lib/hacks/align-self.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
(function() {
|
||||
var AlignSelf, Declaration, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
AlignSelf = (function(superClass) {
|
||||
extend(AlignSelf, superClass);
|
||||
|
||||
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 ref, spec;
|
||||
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);
|
32
node_modules/autoprefixer/lib/hacks/background-size.js
generated
vendored
Normal file
32
node_modules/autoprefixer/lib/hacks/background-size.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
(function() {
|
||||
var BackgroundSize, Declaration,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BackgroundSize = (function(superClass) {
|
||||
extend(BackgroundSize, superClass);
|
||||
|
||||
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);
|
35
node_modules/autoprefixer/lib/hacks/block-logical.js
generated
vendored
Normal file
35
node_modules/autoprefixer/lib/hacks/block-logical.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
(function() {
|
||||
var BlockLogical, Declaration,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BlockLogical = (function(superClass) {
|
||||
extend(BlockLogical, superClass);
|
||||
|
||||
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);
|
28
node_modules/autoprefixer/lib/hacks/border-image.js
generated
vendored
Normal file
28
node_modules/autoprefixer/lib/hacks/border-image.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
(function() {
|
||||
var BorderImage, Declaration,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BorderImage = (function(superClass) {
|
||||
extend(BorderImage, superClass);
|
||||
|
||||
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);
|
56
node_modules/autoprefixer/lib/hacks/border-radius.js
generated
vendored
Normal file
56
node_modules/autoprefixer/lib/hacks/border-radius.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
(function() {
|
||||
var BorderRadius, Declaration,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BorderRadius = (function(superClass) {
|
||||
var hor, i, j, len, len1, mozilla, normal, ref, ref1, ver;
|
||||
|
||||
extend(BorderRadius, superClass);
|
||||
|
||||
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);
|
64
node_modules/autoprefixer/lib/hacks/break-props.js
generated
vendored
Normal file
64
node_modules/autoprefixer/lib/hacks/break-props.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
(function() {
|
||||
var BreakProps, Declaration,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BreakProps = (function(superClass) {
|
||||
extend(BreakProps, superClass);
|
||||
|
||||
function BreakProps() {
|
||||
return BreakProps.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
BreakProps.names = ['break-inside', 'page-break-inside', 'column-break-inside', 'break-before', 'page-break-before', 'column-break-before', 'break-after', 'page-break-after', 'column-break-after'];
|
||||
|
||||
BreakProps.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return '-webkit-column-' + prop;
|
||||
} else if (prefix === '-moz-') {
|
||||
return 'page-' + prop;
|
||||
} else {
|
||||
return BreakProps.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
BreakProps.prototype.normalize = function(prop) {
|
||||
if (prop.indexOf('inside') !== -1) {
|
||||
return 'break-inside';
|
||||
} else if (prop.indexOf('before') !== -1) {
|
||||
return 'break-before';
|
||||
} else if (prop.indexOf('after') !== -1) {
|
||||
return 'break-after';
|
||||
}
|
||||
};
|
||||
|
||||
BreakProps.prototype.set = function(decl, prefix) {
|
||||
var v;
|
||||
v = decl.value;
|
||||
if (decl.prop === 'break-inside' && v === 'avoid-column' || v === 'avoid-page') {
|
||||
decl.value = 'avoid';
|
||||
}
|
||||
return BreakProps.__super__.set.apply(this, arguments);
|
||||
};
|
||||
|
||||
BreakProps.prototype.insert = function(decl, prefix, prefixes) {
|
||||
if (decl.prop !== 'break-inside') {
|
||||
return BreakProps.__super__.insert.apply(this, arguments);
|
||||
} else if (decl.value === 'avoid-region') {
|
||||
|
||||
} else if (decl.value === 'avoid-page' && prefix === '-webkit-') {
|
||||
|
||||
} else {
|
||||
return BreakProps.__super__.insert.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return BreakProps;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = BreakProps;
|
||||
|
||||
}).call(this);
|
53
node_modules/autoprefixer/lib/hacks/cross-fade.js
generated
vendored
Normal file
53
node_modules/autoprefixer/lib/hacks/cross-fade.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
(function() {
|
||||
var CrossFade, OldValue, Value, list, utils,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
utils = require('../utils');
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
CrossFade = (function(superClass) {
|
||||
extend(CrossFade, superClass);
|
||||
|
||||
function CrossFade() {
|
||||
return CrossFade.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
CrossFade.names = ['cross-fade'];
|
||||
|
||||
CrossFade.prototype.replace = function(string, prefix) {
|
||||
return list.space(string).map((function(_this) {
|
||||
return function(value) {
|
||||
var after, args, close, match;
|
||||
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);
|
||||
if (prefix === '-webkit-') {
|
||||
match = args.match(/\d*.?\d+%?/);
|
||||
if (match) {
|
||||
args = args.slice(match[0].length).trim();
|
||||
args += ', ' + match[0];
|
||||
} else {
|
||||
args += ', 0.5';
|
||||
}
|
||||
}
|
||||
return prefix + _this.name + '(' + args + ')' + after;
|
||||
};
|
||||
})(this)).join(' ');
|
||||
};
|
||||
|
||||
return CrossFade;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = CrossFade;
|
||||
|
||||
}).call(this);
|
52
node_modules/autoprefixer/lib/hacks/display-flex.js
generated
vendored
Normal file
52
node_modules/autoprefixer/lib/hacks/display-flex.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
(function() {
|
||||
var DisplayFlex, OldValue, Value, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
DisplayFlex = (function(superClass) {
|
||||
extend(DisplayFlex, superClass);
|
||||
|
||||
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.prop === 'display' && decl.value === this.name;
|
||||
};
|
||||
|
||||
DisplayFlex.prototype.prefixed = function(prefix) {
|
||||
var ref, spec;
|
||||
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) {
|
||||
return new OldValue(this.name, prefixed);
|
||||
}
|
||||
};
|
||||
|
||||
return DisplayFlex;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = DisplayFlex;
|
||||
|
||||
}).call(this);
|
34
node_modules/autoprefixer/lib/hacks/display-grid.js
generated
vendored
Normal file
34
node_modules/autoprefixer/lib/hacks/display-grid.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
(function() {
|
||||
var DisplayGrid, OldValue, Value, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
DisplayGrid = (function(superClass) {
|
||||
extend(DisplayGrid, superClass);
|
||||
|
||||
DisplayGrid.names = ['display-grid', 'inline-grid'];
|
||||
|
||||
function DisplayGrid(name, prefixes) {
|
||||
DisplayGrid.__super__.constructor.apply(this, arguments);
|
||||
if (name === 'display-grid') {
|
||||
this.name = 'grid';
|
||||
}
|
||||
}
|
||||
|
||||
DisplayGrid.prototype.check = function(decl) {
|
||||
return decl.prop === 'display' && decl.value === this.name;
|
||||
};
|
||||
|
||||
return DisplayGrid;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = DisplayGrid;
|
||||
|
||||
}).call(this);
|
72
node_modules/autoprefixer/lib/hacks/filter-value.js
generated
vendored
Normal file
72
node_modules/autoprefixer/lib/hacks/filter-value.js
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
(function() {
|
||||
var FilterValue, OldFilterValue, OldValue, Value, utils,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
utils = require('../utils');
|
||||
|
||||
OldFilterValue = (function(superClass) {
|
||||
extend(OldFilterValue, superClass);
|
||||
|
||||
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);
|
||||
|
||||
FilterValue = (function(superClass) {
|
||||
extend(FilterValue, superClass);
|
||||
|
||||
FilterValue.names = ['filter', 'filter-function'];
|
||||
|
||||
function FilterValue(name, prefixes) {
|
||||
FilterValue.__super__.constructor.apply(this, arguments);
|
||||
if (name === 'filter-function') {
|
||||
this.name = 'filter';
|
||||
}
|
||||
}
|
||||
|
||||
FilterValue.prototype.replace = function(value, prefix) {
|
||||
if (prefix === '-webkit-' && value.indexOf('filter(') === -1) {
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
FilterValue.prototype.old = function(prefix) {
|
||||
return new OldFilterValue(this.name, prefix + this.name);
|
||||
};
|
||||
|
||||
return FilterValue;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = FilterValue;
|
||||
|
||||
}).call(this);
|
29
node_modules/autoprefixer/lib/hacks/filter.js
generated
vendored
Normal file
29
node_modules/autoprefixer/lib/hacks/filter.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
(function() {
|
||||
var Declaration, Filter,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
Filter = (function(superClass) {
|
||||
extend(Filter, superClass);
|
||||
|
||||
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);
|
47
node_modules/autoprefixer/lib/hacks/flex-basis.js
generated
vendored
Normal file
47
node_modules/autoprefixer/lib/hacks/flex-basis.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
(function() {
|
||||
var Declaration, FlexBasis, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexBasis = (function(superClass) {
|
||||
extend(FlexBasis, superClass);
|
||||
|
||||
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 ref, spec;
|
||||
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 ref, spec;
|
||||
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);
|
71
node_modules/autoprefixer/lib/hacks/flex-direction.js
generated
vendored
Normal file
71
node_modules/autoprefixer/lib/hacks/flex-direction.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
(function() {
|
||||
var Declaration, FlexDirection, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexDirection = (function(superClass) {
|
||||
extend(FlexDirection, superClass);
|
||||
|
||||
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, ref, spec, value;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec !== 2009) {
|
||||
return FlexDirection.__super__.insert.apply(this, arguments);
|
||||
} else {
|
||||
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.raws.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.raws.before = this.calcBefore(prefixes, decl, prefix);
|
||||
}
|
||||
return decl.parent.insertBefore(decl, cloned);
|
||||
}
|
||||
};
|
||||
|
||||
FlexDirection.prototype.old = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
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);
|
63
node_modules/autoprefixer/lib/hacks/flex-flow.js
generated
vendored
Normal file
63
node_modules/autoprefixer/lib/hacks/flex-flow.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
(function() {
|
||||
var Declaration, FlexFlow, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexFlow = (function(superClass) {
|
||||
extend(FlexFlow, superClass);
|
||||
|
||||
function FlexFlow() {
|
||||
return FlexFlow.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexFlow.names = ['flex-flow', 'box-direction', 'box-orient'];
|
||||
|
||||
FlexFlow.prototype.insert = function(decl, prefix, prefixes) {
|
||||
var already, cloned, dir, orient, ref, spec, value, values;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec !== 2009) {
|
||||
return FlexFlow.__super__.insert.apply(this, arguments);
|
||||
} else {
|
||||
values = decl.value.split(/\s+/).filter(function(i) {
|
||||
return i !== 'wrap' && i !== 'nowrap' && 'wrap-reverse';
|
||||
});
|
||||
if (values.length === 0) {
|
||||
return;
|
||||
}
|
||||
already = decl.parent.some(function(i) {
|
||||
return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
|
||||
});
|
||||
if (already) {
|
||||
return;
|
||||
}
|
||||
value = values[0];
|
||||
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.raws.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.raws.before = this.calcBefore(prefixes, decl, prefix);
|
||||
}
|
||||
return decl.parent.insertBefore(decl, cloned);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexFlow;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = FlexFlow;
|
||||
|
||||
}).call(this);
|
41
node_modules/autoprefixer/lib/hacks/flex-grow.js
generated
vendored
Normal file
41
node_modules/autoprefixer/lib/hacks/flex-grow.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
(function() {
|
||||
var Declaration, Flex, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
Flex = (function(superClass) {
|
||||
extend(Flex, superClass);
|
||||
|
||||
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 ref, spec;
|
||||
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);
|
47
node_modules/autoprefixer/lib/hacks/flex-shrink.js
generated
vendored
Normal file
47
node_modules/autoprefixer/lib/hacks/flex-shrink.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
(function() {
|
||||
var Declaration, FlexShrink, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexShrink = (function(superClass) {
|
||||
extend(FlexShrink, superClass);
|
||||
|
||||
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 ref, spec;
|
||||
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 ref, spec;
|
||||
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);
|
11
node_modules/autoprefixer/lib/hacks/flex-spec.js
generated
vendored
Normal file
11
node_modules/autoprefixer/lib/hacks/flex-spec.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
(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);
|
37
node_modules/autoprefixer/lib/hacks/flex-values.js
generated
vendored
Normal file
37
node_modules/autoprefixer/lib/hacks/flex-values.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
(function() {
|
||||
var FlexValues, OldValue, Value,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
FlexValues = (function(superClass) {
|
||||
extend(FlexValues, superClass);
|
||||
|
||||
function FlexValues() {
|
||||
return FlexValues.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexValues.names = ['flex', 'flex-grow', 'flex-shrink', 'flex-basis'];
|
||||
|
||||
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);
|
33
node_modules/autoprefixer/lib/hacks/flex-wrap.js
generated
vendored
Normal file
33
node_modules/autoprefixer/lib/hacks/flex-wrap.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
(function() {
|
||||
var Declaration, FlexWrap, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexWrap = (function(superClass) {
|
||||
extend(FlexWrap, superClass);
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexWrap;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = FlexWrap;
|
||||
|
||||
}).call(this);
|
64
node_modules/autoprefixer/lib/hacks/flex.js
generated
vendored
Normal file
64
node_modules/autoprefixer/lib/hacks/flex.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
(function() {
|
||||
var Declaration, Flex, flexSpec, list,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
Flex = (function(superClass) {
|
||||
extend(Flex, superClass);
|
||||
|
||||
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 ref, spec;
|
||||
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 components, spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009) {
|
||||
decl.value = list.space(decl.value)[0];
|
||||
decl.value = Flex.oldValues[decl.value] || decl.value;
|
||||
return Flex.__super__.set.call(this, decl, prefix);
|
||||
} else if (spec === 2012) {
|
||||
components = list.space(decl.value);
|
||||
if (components.length === 3 && components[2] === '0') {
|
||||
decl.value = components.slice(0, 2).concat('0px').join(' ');
|
||||
}
|
||||
return Flex.__super__.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return Flex.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Flex;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = Flex;
|
||||
|
||||
}).call(this);
|
33
node_modules/autoprefixer/lib/hacks/fullscreen.js
generated
vendored
Normal file
33
node_modules/autoprefixer/lib/hacks/fullscreen.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
(function() {
|
||||
var Fullscreen, Selector,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Selector = require('../selector');
|
||||
|
||||
Fullscreen = (function(superClass) {
|
||||
extend(Fullscreen, superClass);
|
||||
|
||||
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);
|
368
node_modules/autoprefixer/lib/hacks/gradient.js
generated
vendored
Normal file
368
node_modules/autoprefixer/lib/hacks/gradient.js
generated
vendored
Normal file
@@ -0,0 +1,368 @@
|
||||
(function() {
|
||||
var Gradient, OldValue, Value, isDirection, list, parser, range, utils,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty,
|
||||
slice = [].slice;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
utils = require('../utils');
|
||||
|
||||
parser = require('postcss-value-parser');
|
||||
|
||||
range = require('normalize-range');
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
isDirection = /top|left|right|bottom/gi;
|
||||
|
||||
Gradient = (function(superClass) {
|
||||
extend(Gradient, superClass);
|
||||
|
||||
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) {
|
||||
var ast, changes, j, len, node, ref;
|
||||
ast = parser(string);
|
||||
ref = ast.nodes;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
node = ref[j];
|
||||
if (node.type === 'function' && node.value === this.name) {
|
||||
node.nodes = this.newDirection(node.nodes);
|
||||
node.nodes = this.normalize(node.nodes);
|
||||
if (prefix === '-webkit- old') {
|
||||
changes = this.oldWebkit(node);
|
||||
if (!changes) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
node.nodes = this.convertDirection(node.nodes);
|
||||
node.value = prefix + node.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ast.toString();
|
||||
};
|
||||
|
||||
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.replaceFirst = function() {
|
||||
var params, prefix, words;
|
||||
params = arguments[0], words = 2 <= arguments.length ? slice.call(arguments, 1) : [];
|
||||
prefix = words.map(function(i) {
|
||||
if (i === ' ') {
|
||||
return {
|
||||
type: 'space',
|
||||
value: i
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
type: 'word',
|
||||
value: i
|
||||
};
|
||||
}
|
||||
});
|
||||
return prefix.concat(params.slice(1));
|
||||
};
|
||||
|
||||
Gradient.prototype.normalizeUnit = function(str, full) {
|
||||
var deg, num;
|
||||
num = parseFloat(str);
|
||||
deg = (num / full) * 360;
|
||||
return deg + "deg";
|
||||
};
|
||||
|
||||
Gradient.prototype.normalize = function(nodes) {
|
||||
var num;
|
||||
if (!nodes[0]) {
|
||||
return nodes;
|
||||
}
|
||||
if (/-?\d+(.\d+)?grad/.test(nodes[0].value)) {
|
||||
nodes[0].value = this.normalizeUnit(nodes[0].value, 400);
|
||||
} else if (/-?\d+(.\d+)?rad/.test(nodes[0].value)) {
|
||||
nodes[0].value = this.normalizeUnit(nodes[0].value, 2 * Math.PI);
|
||||
} else if (/-?\d+(.\d+)?turn/.test(nodes[0].value)) {
|
||||
nodes[0].value = this.normalizeUnit(nodes[0].value, 1);
|
||||
} else if (nodes[0].value.indexOf('deg') !== -1) {
|
||||
num = parseFloat(nodes[0].value);
|
||||
num = range.wrap(0, 360, num);
|
||||
nodes[0].value = num + "deg";
|
||||
}
|
||||
if (nodes[0].value === '0deg') {
|
||||
nodes = this.replaceFirst(nodes, 'to', ' ', 'top');
|
||||
} else if (nodes[0].value === '90deg') {
|
||||
nodes = this.replaceFirst(nodes, 'to', ' ', 'right');
|
||||
} else if (nodes[0].value === '180deg') {
|
||||
nodes = this.replaceFirst(nodes, 'to', ' ', 'bottom');
|
||||
} else if (nodes[0].value === '270deg') {
|
||||
nodes = this.replaceFirst(nodes, 'to', ' ', 'left');
|
||||
}
|
||||
return nodes;
|
||||
};
|
||||
|
||||
Gradient.prototype.newDirection = function(params) {
|
||||
var i, j, ref;
|
||||
if (params[0].value === 'to') {
|
||||
return params;
|
||||
}
|
||||
if (!isDirection.test(params[0].value)) {
|
||||
return params;
|
||||
}
|
||||
params.unshift({
|
||||
type: 'word',
|
||||
value: 'to'
|
||||
}, {
|
||||
type: 'space',
|
||||
value: ' '
|
||||
});
|
||||
for (i = j = 2, ref = params.length; 2 <= ref ? j < ref : j > ref; i = 2 <= ref ? ++j : --j) {
|
||||
if (params[i].type === 'div') {
|
||||
break;
|
||||
}
|
||||
if (params[i].type === 'word') {
|
||||
params[i].value = this.revertDirection(params[i].value);
|
||||
}
|
||||
}
|
||||
return params;
|
||||
};
|
||||
|
||||
Gradient.prototype.convertDirection = function(params) {
|
||||
if (params.length > 0) {
|
||||
if (params[0].value === 'to') {
|
||||
this.fixDirection(params);
|
||||
} else if (params[0].value.indexOf('deg') !== -1) {
|
||||
this.fixAngle(params);
|
||||
} else if (params[2].value === 'at') {
|
||||
this.fixRadial(params);
|
||||
}
|
||||
}
|
||||
return params;
|
||||
};
|
||||
|
||||
Gradient.prototype.fixDirection = function(params) {
|
||||
var i, j, ref, results;
|
||||
params.splice(0, 2);
|
||||
results = [];
|
||||
for (i = j = 0, ref = params.length; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
|
||||
if (params[i].type === 'div') {
|
||||
break;
|
||||
}
|
||||
if (params[i].type === 'word') {
|
||||
results.push(params[i].value = this.revertDirection(params[i].value));
|
||||
} else {
|
||||
results.push(void 0);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
Gradient.prototype.fixAngle = function(params) {
|
||||
var first;
|
||||
first = params[0].value;
|
||||
first = parseFloat(first);
|
||||
first = Math.abs(450 - first) % 360;
|
||||
first = this.roundFloat(first, 3);
|
||||
return params[0].value = first + "deg";
|
||||
};
|
||||
|
||||
Gradient.prototype.fixRadial = function(params) {
|
||||
var first, i, j, ref, second;
|
||||
first = params[0];
|
||||
second = [];
|
||||
for (i = j = 4, ref = params.length; 4 <= ref ? j < ref : j > ref; i = 4 <= ref ? ++j : --j) {
|
||||
if (params[i].type === 'div') {
|
||||
break;
|
||||
} else {
|
||||
second.push(params[i]);
|
||||
}
|
||||
}
|
||||
return params.splice.apply(params, [0, i].concat(slice.call(second), [params[i + 2]], [first]));
|
||||
};
|
||||
|
||||
Gradient.prototype.revertDirection = function(word) {
|
||||
return this.directions[word.toLowerCase()] || word;
|
||||
};
|
||||
|
||||
Gradient.prototype.roundFloat = function(float, digits) {
|
||||
return parseFloat(float.toFixed(digits));
|
||||
};
|
||||
|
||||
Gradient.prototype.oldWebkit = function(node) {
|
||||
var i, j, k, len, len1, nodes, param, params, string;
|
||||
nodes = node.nodes;
|
||||
string = parser.stringify(node.nodes);
|
||||
if (this.name !== 'linear-gradient') {
|
||||
return false;
|
||||
}
|
||||
if (nodes[0] && nodes[0].value.indexOf('deg') !== -1) {
|
||||
return false;
|
||||
}
|
||||
if (string.indexOf('px') !== -1) {
|
||||
return false;
|
||||
}
|
||||
if (string.indexOf('-corner') !== -1) {
|
||||
return false;
|
||||
}
|
||||
if (string.indexOf('-side') !== -1) {
|
||||
return false;
|
||||
}
|
||||
params = [[]];
|
||||
for (j = 0, len = nodes.length; j < len; j++) {
|
||||
i = nodes[j];
|
||||
params[params.length - 1].push(i);
|
||||
if (i.type === 'div' && i.value === ',') {
|
||||
params.push([]);
|
||||
}
|
||||
}
|
||||
this.oldDirection(params);
|
||||
this.colorStops(params);
|
||||
node.nodes = [];
|
||||
for (k = 0, len1 = params.length; k < len1; k++) {
|
||||
param = params[k];
|
||||
node.nodes = node.nodes.concat(param);
|
||||
}
|
||||
node.nodes.unshift({
|
||||
type: 'word',
|
||||
value: 'linear'
|
||||
}, this.cloneDiv(node.nodes));
|
||||
node.value = '-webkit-gradient';
|
||||
return true;
|
||||
};
|
||||
|
||||
Gradient.prototype.oldDirection = function(params) {
|
||||
var div, j, len, node, old, ref, words;
|
||||
div = this.cloneDiv(params[0]);
|
||||
if (params[0][0].value !== 'to') {
|
||||
return params.unshift([
|
||||
{
|
||||
type: 'word',
|
||||
value: this.oldDirections.bottom
|
||||
}, div
|
||||
]);
|
||||
} else {
|
||||
words = [];
|
||||
ref = params[0].slice(2);
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
node = ref[j];
|
||||
if (node.type === 'word') {
|
||||
words.push(node.value.toLowerCase());
|
||||
}
|
||||
}
|
||||
words = words.join(' ');
|
||||
old = this.oldDirections[words] || words;
|
||||
return params[0] = [
|
||||
{
|
||||
type: 'word',
|
||||
value: old
|
||||
}, div
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
Gradient.prototype.cloneDiv = function(params) {
|
||||
var i, j, len;
|
||||
for (j = 0, len = params.length; j < len; j++) {
|
||||
i = params[j];
|
||||
if (i.type === 'div' && i.value === ',') {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return {
|
||||
type: 'div',
|
||||
value: ',',
|
||||
after: ' '
|
||||
};
|
||||
};
|
||||
|
||||
Gradient.prototype.colorStops = function(params) {
|
||||
var color, div, i, j, len, param, pos, results, stop;
|
||||
results = [];
|
||||
for (i = j = 0, len = params.length; j < len; i = ++j) {
|
||||
param = params[i];
|
||||
if (i === 0) {
|
||||
continue;
|
||||
}
|
||||
color = parser.stringify(param[0]);
|
||||
if (param[1] && param[1].type === 'word') {
|
||||
pos = param[1].value;
|
||||
} else if (param[2] && param[2].type === 'word') {
|
||||
pos = param[2].value;
|
||||
}
|
||||
stop = i === 1 && (!pos || pos === '0%') ? "from(" + color + ")" : i === params.length - 1 && (!pos || pos === '100%') ? "to(" + color + ")" : pos ? "color-stop(" + pos + ", " + color + ")" : "color-stop(" + color + ")";
|
||||
div = param[param.length - 1];
|
||||
params[i] = [
|
||||
{
|
||||
type: 'word',
|
||||
value: stop
|
||||
}
|
||||
];
|
||||
if (div.type === 'div' && div.value === ',') {
|
||||
results.push(params[i].push(div));
|
||||
} else {
|
||||
results.push(void 0);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
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);
|
||||
return new OldValue(this.name, prefix + this.name, string, regexp);
|
||||
} else {
|
||||
return Gradient.__super__.old.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Gradient.prototype.add = function(decl, prefix) {
|
||||
var p;
|
||||
p = decl.prop;
|
||||
if (p.indexOf('mask') !== -1) {
|
||||
if (prefix === '-webkit-' || prefix === '-webkit- old') {
|
||||
return Gradient.__super__.add.apply(this, arguments);
|
||||
}
|
||||
} else if (p === 'list-style' || p === 'list-style-image' || p === 'content') {
|
||||
if (prefix === '-webkit-' || prefix === '-webkit- old') {
|
||||
return Gradient.__super__.add.apply(this, arguments);
|
||||
}
|
||||
} else {
|
||||
return Gradient.__super__.add.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Gradient;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = Gradient;
|
||||
|
||||
}).call(this);
|
46
node_modules/autoprefixer/lib/hacks/grid-end.js
generated
vendored
Normal file
46
node_modules/autoprefixer/lib/hacks/grid-end.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
(function() {
|
||||
var Declaration, GridEnd,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
GridEnd = (function(superClass) {
|
||||
extend(GridEnd, superClass);
|
||||
|
||||
function GridEnd() {
|
||||
return GridEnd.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
GridEnd.names = ['grid-row-end', 'grid-column-end', 'grid-row-span', 'grid-column-span'];
|
||||
|
||||
GridEnd.prototype.check = function(decl) {
|
||||
return decl.value.indexOf('span') !== -1;
|
||||
};
|
||||
|
||||
GridEnd.prototype.normalize = function(prop) {
|
||||
return prop.replace(/(-span|-end)/, '');
|
||||
};
|
||||
|
||||
GridEnd.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return prefix + prop.replace('-end', '-span');
|
||||
} else {
|
||||
return GridEnd.__super__.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
GridEnd.prototype.set = function(decl, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
decl.value = decl.value.replace(/span\s/i, '');
|
||||
}
|
||||
return GridEnd.__super__.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return GridEnd;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = GridEnd;
|
||||
|
||||
}).call(this);
|
35
node_modules/autoprefixer/lib/hacks/grid-row-align.js
generated
vendored
Normal file
35
node_modules/autoprefixer/lib/hacks/grid-row-align.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
(function() {
|
||||
var Declaration, GridRowAlign,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
GridRowAlign = (function(superClass) {
|
||||
extend(GridRowAlign, superClass);
|
||||
|
||||
function GridRowAlign() {
|
||||
return GridRowAlign.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
GridRowAlign.names = ['grid-row-align'];
|
||||
|
||||
GridRowAlign.prototype.check = function(decl) {
|
||||
return decl.value.indexOf('flex-') === -1 && decl.value !== 'baseline';
|
||||
};
|
||||
|
||||
GridRowAlign.prototype.prefixed = function(prop, prefix) {
|
||||
return prefix + 'grid-row-align';
|
||||
};
|
||||
|
||||
GridRowAlign.prototype.normalize = function(prop) {
|
||||
return 'align-self';
|
||||
};
|
||||
|
||||
return GridRowAlign;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = GridRowAlign;
|
||||
|
||||
}).call(this);
|
71
node_modules/autoprefixer/lib/hacks/grid-start.js
generated
vendored
Normal file
71
node_modules/autoprefixer/lib/hacks/grid-start.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
(function() {
|
||||
var Declaration, GridStart,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
GridStart = (function(superClass) {
|
||||
extend(GridStart, superClass);
|
||||
|
||||
function GridStart() {
|
||||
return GridStart.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
GridStart.names = ['grid-row-start', 'grid-column-start', 'grid-row', 'grid-column'];
|
||||
|
||||
GridStart.prototype.check = function(decl) {
|
||||
return decl.value.indexOf('/') === -1 || decl.value.indexOf('span') !== -1;
|
||||
};
|
||||
|
||||
GridStart.prototype.normalize = function(prop) {
|
||||
return prop.replace('-start', '');
|
||||
};
|
||||
|
||||
GridStart.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return prefix + prop.replace('-start', '');
|
||||
} else {
|
||||
return GridStart.__super__.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
GridStart.prototype.insert = function(decl, prefix, prefixes) {
|
||||
var parts;
|
||||
parts = this.splitValue(decl, prefix);
|
||||
if (parts.length === 2) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-' + decl.prop + '-span',
|
||||
value: parts[1]
|
||||
});
|
||||
}
|
||||
return GridStart.__super__.insert.call(this, decl, prefix, prefixes);
|
||||
};
|
||||
|
||||
GridStart.prototype.set = function(decl, prefix) {
|
||||
var parts;
|
||||
parts = this.splitValue(decl, prefix);
|
||||
if (parts.length === 2) {
|
||||
decl.value = parts[0];
|
||||
}
|
||||
return GridStart.__super__.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
GridStart.prototype.splitValue = function(decl, prefix) {
|
||||
var parts;
|
||||
if (prefix === '-ms-' && decl.prop.indexOf('-start') === -1) {
|
||||
parts = decl.value.split(/\s*\/\s*span\s+/);
|
||||
if (parts.length === 2) {
|
||||
return parts;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
return GridStart;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = GridStart;
|
||||
|
||||
}).call(this);
|
77
node_modules/autoprefixer/lib/hacks/grid-template.js
generated
vendored
Normal file
77
node_modules/autoprefixer/lib/hacks/grid-template.js
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
(function() {
|
||||
var Declaration, GridTemplate, parser,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
parser = require('postcss-value-parser');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
GridTemplate = (function(superClass) {
|
||||
extend(GridTemplate, superClass);
|
||||
|
||||
function GridTemplate() {
|
||||
return GridTemplate.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
GridTemplate.names = ['grid-template-rows', 'grid-template-columns', 'grid-rows', 'grid-columns'];
|
||||
|
||||
GridTemplate.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return prefix + prop.replace('template-', '');
|
||||
} else {
|
||||
return GridTemplate.__super__.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
GridTemplate.prototype.normalize = function(prop) {
|
||||
return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1');
|
||||
};
|
||||
|
||||
GridTemplate.prototype.walkRepeat = function(node) {
|
||||
var count, first, fixed, i, j, len, ref;
|
||||
fixed = [];
|
||||
ref = node.nodes;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
i = ref[j];
|
||||
if (i.nodes) {
|
||||
this.walkRepeat(i);
|
||||
}
|
||||
fixed.push(i);
|
||||
if (i.type === 'function' && i.value === 'repeat') {
|
||||
first = i.nodes.shift();
|
||||
if (first) {
|
||||
count = first.value;
|
||||
i.nodes.shift();
|
||||
i.value = '';
|
||||
fixed.push({
|
||||
type: 'word',
|
||||
value: "[" + count + "]"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return node.nodes = fixed;
|
||||
};
|
||||
|
||||
GridTemplate.prototype.changeRepeat = function(value) {
|
||||
var ast;
|
||||
ast = parser(value);
|
||||
this.walkRepeat(ast);
|
||||
return ast.toString();
|
||||
};
|
||||
|
||||
GridTemplate.prototype.set = function(decl, prefix) {
|
||||
if (prefix === '-ms-' && decl.value.indexOf('repeat(') !== -1) {
|
||||
decl.value = this.changeRepeat(decl.value);
|
||||
}
|
||||
return GridTemplate.__super__.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return GridTemplate;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = GridTemplate;
|
||||
|
||||
}).call(this);
|
53
node_modules/autoprefixer/lib/hacks/image-rendering.js
generated
vendored
Normal file
53
node_modules/autoprefixer/lib/hacks/image-rendering.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
(function() {
|
||||
var Declaration, ImageRendering,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
ImageRendering = (function(superClass) {
|
||||
extend(ImageRendering, superClass);
|
||||
|
||||
function ImageRendering() {
|
||||
return ImageRendering.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
ImageRendering.names = ['image-rendering', 'interpolation-mode'];
|
||||
|
||||
ImageRendering.prototype.check = function(decl) {
|
||||
return decl.value === 'pixelated';
|
||||
};
|
||||
|
||||
ImageRendering.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return '-ms-interpolation-mode';
|
||||
} else {
|
||||
return ImageRendering.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
ImageRendering.prototype.set = function(decl, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
decl.prop = '-ms-interpolation-mode';
|
||||
decl.value = 'nearest-neighbor';
|
||||
return decl;
|
||||
} else {
|
||||
return ImageRendering.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
ImageRendering.prototype.normalize = function(prop) {
|
||||
return 'image-rendering';
|
||||
};
|
||||
|
||||
ImageRendering.prototype.process = function(node, result) {
|
||||
return ImageRendering.__super__.process.apply(this, arguments);
|
||||
};
|
||||
|
||||
return ImageRendering;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = ImageRendering;
|
||||
|
||||
}).call(this);
|
33
node_modules/autoprefixer/lib/hacks/image-set.js
generated
vendored
Normal file
33
node_modules/autoprefixer/lib/hacks/image-set.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
(function() {
|
||||
var ImageSet, Value, list,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
ImageSet = (function(superClass) {
|
||||
extend(ImageSet, superClass);
|
||||
|
||||
function ImageSet() {
|
||||
return ImageSet.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
ImageSet.names = ['image-set'];
|
||||
|
||||
ImageSet.prototype.replace = function(string, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return ImageSet.__super__.replace.apply(this, arguments).replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi, 'url($1)$2');
|
||||
} else {
|
||||
return ImageSet.__super__.replace.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return ImageSet;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = ImageSet;
|
||||
|
||||
}).call(this);
|
31
node_modules/autoprefixer/lib/hacks/inline-logical.js
generated
vendored
Normal file
31
node_modules/autoprefixer/lib/hacks/inline-logical.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
(function() {
|
||||
var Declaration, InlineLogical,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
InlineLogical = (function(superClass) {
|
||||
extend(InlineLogical, superClass);
|
||||
|
||||
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);
|
62
node_modules/autoprefixer/lib/hacks/justify-content.js
generated
vendored
Normal file
62
node_modules/autoprefixer/lib/hacks/justify-content.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
(function() {
|
||||
var Declaration, JustifyContent, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
JustifyContent = (function(superClass) {
|
||||
extend(JustifyContent, superClass);
|
||||
|
||||
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 ref, spec;
|
||||
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);
|
31
node_modules/autoprefixer/lib/hacks/justify-items.js
generated
vendored
Normal file
31
node_modules/autoprefixer/lib/hacks/justify-items.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
(function() {
|
||||
var Declaration, JustifyItems,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
JustifyItems = (function(superClass) {
|
||||
extend(JustifyItems, superClass);
|
||||
|
||||
function JustifyItems() {
|
||||
return JustifyItems.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
JustifyItems.names = ['justify-items', 'grid-column-align'];
|
||||
|
||||
JustifyItems.prototype.prefixed = function(prop, prefix) {
|
||||
return prefix + (prefix === '-ms-' ? 'grid-column-align' : prop);
|
||||
};
|
||||
|
||||
JustifyItems.prototype.normalize = function(prop) {
|
||||
return 'justify-items';
|
||||
};
|
||||
|
||||
return JustifyItems;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = JustifyItems;
|
||||
|
||||
}).call(this);
|
35
node_modules/autoprefixer/lib/hacks/mask-border.js
generated
vendored
Normal file
35
node_modules/autoprefixer/lib/hacks/mask-border.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
(function() {
|
||||
var Declaration, MaskBorder,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
MaskBorder = (function(superClass) {
|
||||
extend(MaskBorder, superClass);
|
||||
|
||||
function MaskBorder() {
|
||||
return MaskBorder.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
MaskBorder.names = ['mask-border', 'mask-border-source', 'mask-border-slice', 'mask-border-width', 'mask-border-outset', 'mask-border-repeat', 'mask-box-image', 'mask-box-image-source', 'mask-box-image-slice', 'mask-box-image-width', 'mask-box-image-outset', 'mask-box-image-repeat'];
|
||||
|
||||
MaskBorder.prototype.normalize = function() {
|
||||
return this.name.replace('box-image', 'border');
|
||||
};
|
||||
|
||||
MaskBorder.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return MaskBorder.__super__.prefixed.apply(this, arguments).replace('border', 'box-image');
|
||||
} else {
|
||||
return MaskBorder.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return MaskBorder;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = MaskBorder;
|
||||
|
||||
}).call(this);
|
52
node_modules/autoprefixer/lib/hacks/order.js
generated
vendored
Normal file
52
node_modules/autoprefixer/lib/hacks/order.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
(function() {
|
||||
var Declaration, Order, flexSpec,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
Order = (function(superClass) {
|
||||
extend(Order, superClass);
|
||||
|
||||
function Order() {
|
||||
return Order.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Order.names = ['order', 'flex-order', 'box-ordinal-group'];
|
||||
|
||||
Order.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
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);
|
45
node_modules/autoprefixer/lib/hacks/pixelated.js
generated
vendored
Normal file
45
node_modules/autoprefixer/lib/hacks/pixelated.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
(function() {
|
||||
var OldValue, Pixelated, Value,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
Pixelated = (function(superClass) {
|
||||
extend(Pixelated, superClass);
|
||||
|
||||
function Pixelated() {
|
||||
return Pixelated.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Pixelated.names = ['pixelated'];
|
||||
|
||||
Pixelated.prototype.replace = function(string, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return string.replace(this.regexp(), '$1-webkit-optimize-contrast');
|
||||
} else if (prefix === '-moz-') {
|
||||
return string.replace(this.regexp(), '$1-moz-crisp-edges');
|
||||
} else {
|
||||
return Pixelated.__super__.replace.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Pixelated.prototype.old = function(prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return new OldValue(this.name, '-webkit-optimize-contrast');
|
||||
} else if (prefix === '-moz-') {
|
||||
return new OldValue(this.name, '-moz-crisp-edges');
|
||||
} else {
|
||||
return Pixelated.__super__.old.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Pixelated;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = Pixelated;
|
||||
|
||||
}).call(this);
|
39
node_modules/autoprefixer/lib/hacks/placeholder.js
generated
vendored
Normal file
39
node_modules/autoprefixer/lib/hacks/placeholder.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
(function() {
|
||||
var Placeholder, Selector,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Selector = require('../selector');
|
||||
|
||||
Placeholder = (function(superClass) {
|
||||
extend(Placeholder, superClass);
|
||||
|
||||
function Placeholder() {
|
||||
return Placeholder.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Placeholder.names = [':placeholder-shown', '::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);
|
45
node_modules/autoprefixer/lib/hacks/stretch.js
generated
vendored
Normal file
45
node_modules/autoprefixer/lib/hacks/stretch.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
(function() {
|
||||
var OldValue, Stretch, Value,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
Stretch = (function(superClass) {
|
||||
extend(Stretch, superClass);
|
||||
|
||||
function Stretch() {
|
||||
return Stretch.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Stretch.names = ['stretch', 'fill', 'fill-available'];
|
||||
|
||||
Stretch.prototype.replace = function(string, prefix) {
|
||||
if (prefix === '-moz-') {
|
||||
return string.replace(this.regexp(), '$1-moz-available$3');
|
||||
} else if (prefix === '-webkit-') {
|
||||
return string.replace(this.regexp(), '$1-webkit-fill-available$3');
|
||||
} else {
|
||||
return Stretch.__super__.replace.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Stretch.prototype.old = function(prefix) {
|
||||
if (prefix === '-moz-') {
|
||||
return new OldValue(this.name, '-moz-available');
|
||||
} else if (prefix === '-webkit-') {
|
||||
return new OldValue(this.name, '-webkit-fill-available');
|
||||
} else {
|
||||
return Stretch.__super__.old.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Stretch;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = Stretch;
|
||||
|
||||
}).call(this);
|
32
node_modules/autoprefixer/lib/hacks/text-emphasis-position.js
generated
vendored
Normal file
32
node_modules/autoprefixer/lib/hacks/text-emphasis-position.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
(function() {
|
||||
var Declaration, TextEmphasisPosition,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
TextEmphasisPosition = (function(superClass) {
|
||||
extend(TextEmphasisPosition, superClass);
|
||||
|
||||
function TextEmphasisPosition() {
|
||||
return TextEmphasisPosition.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
TextEmphasisPosition.names = ['text-emphasis-position'];
|
||||
|
||||
TextEmphasisPosition.prototype.set = function(decl, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
decl.value = decl.value.replace(/\s*(right|left)\s*/i, '');
|
||||
return TextEmphasisPosition.__super__.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return TextEmphasisPosition.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return TextEmphasisPosition;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = TextEmphasisPosition;
|
||||
|
||||
}).call(this);
|
74
node_modules/autoprefixer/lib/hacks/transform-decl.js
generated
vendored
Normal file
74
node_modules/autoprefixer/lib/hacks/transform-decl.js
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
(function() {
|
||||
var Declaration, TransformDecl,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
TransformDecl = (function(superClass) {
|
||||
extend(TransformDecl, superClass);
|
||||
|
||||
function TransformDecl() {
|
||||
return TransformDecl.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
TransformDecl.names = ['transform', 'transform-origin'];
|
||||
|
||||
TransformDecl.functions3d = ['matrix3d', 'translate3d', 'translateZ', 'scale3d', 'scaleZ', 'rotate3d', 'rotateX', 'rotateY', 'perspective'];
|
||||
|
||||
TransformDecl.prototype.keyframeParents = 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.set = function(decl, prefix) {
|
||||
decl = TransformDecl.__super__.set.apply(this, arguments);
|
||||
if (prefix === '-ms-') {
|
||||
decl.value = decl.value.replace(/rotateZ/gi, 'rotate');
|
||||
}
|
||||
return decl;
|
||||
};
|
||||
|
||||
TransformDecl.prototype.insert = function(decl, prefix, prefixes) {
|
||||
if (prefix === '-ms-') {
|
||||
if (!this.contain3d(decl) && !this.keyframeParents(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);
|
38
node_modules/autoprefixer/lib/hacks/writing-mode.js
generated
vendored
Normal file
38
node_modules/autoprefixer/lib/hacks/writing-mode.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
(function() {
|
||||
var Declaration, WritingMode,
|
||||
extend = 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; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
WritingMode = (function(superClass) {
|
||||
extend(WritingMode, superClass);
|
||||
|
||||
function WritingMode() {
|
||||
return WritingMode.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
WritingMode.names = ['writing-mode'];
|
||||
|
||||
WritingMode.msValues = {
|
||||
'horizontal-tb': 'lr-tb',
|
||||
'vertical-rl': 'tb-rl',
|
||||
'vertical-lr': 'tb-lr'
|
||||
};
|
||||
|
||||
WritingMode.prototype.set = function(decl, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
decl.value = WritingMode.msValues[decl.value] || decl.value;
|
||||
return WritingMode.__super__.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return WritingMode.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return WritingMode;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = WritingMode;
|
||||
|
||||
}).call(this);
|
Reference in New Issue
Block a user