diff options
| author | ruki <waruqi@gmail.com> | 2018-11-08 00:43:05 +0800 |
|---|---|---|
| committer | ruki <waruqi@gmail.com> | 2018-11-07 22:18:30 +0800 |
| commit | 89e95b3f143682ed9a006991bacf45c9dcba4818 (patch) | |
| tree | 4f44cf41b828577d583890bdd5a1c31e8491a6ba /node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock | |
| parent | aa7f0199255277949790b41c56e8ec97dd4f0da4 (diff) | |
| download | xmake-docs-vuepress.tar.gz xmake-docs-vuepress.zip | |
remove node_modulesvuepress
Diffstat (limited to 'node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock')
19 files changed, 0 insertions, 552 deletions
diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Arbitrary.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Arbitrary.js deleted file mode 100644 index 5411b3a7..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Arbitrary.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var Arbitrary, _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'); - -module.exports = Arbitrary = (function(superClass) { - extend(Arbitrary, superClass); - - function Arbitrary() { - return Arbitrary.__super__.constructor.apply(this, arguments); - } - - return Arbitrary; - -})(_Declaration); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Background.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Background.js deleted file mode 100644 index e02b377c..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Background.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var Background, _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'); - -module.exports = Background = (function(superClass) { - extend(Background, superClass); - - function Background() { - return Background.__super__.constructor.apply(this, arguments); - } - - return Background; - -})(_Declaration); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Bullet.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Bullet.js deleted file mode 100644 index a04e0c7b..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Bullet.js +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var Bullet, _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'); - -module.exports = Bullet = (function(superClass) { - var self; - - extend(Bullet, superClass); - - function Bullet() { - return Bullet.__super__.constructor.apply(this, arguments); - } - - self = Bullet; - - Bullet.prototype._set = function(val) { - var alignment, bg, char, color, enabled, m, original; - val = String(val); - original = val; - char = null; - enabled = false; - color = 'none'; - bg = 'none'; - if (m = val.match(/\"([^"]+)\"/) || (m = val.match(/\'([^']+)\'/))) { - char = m[1]; - val = val.replace(m[0], ''); - enabled = true; - } - if (m = val.match(/(none|left|right|center)/)) { - alignment = m[1]; - val = val.replace(m[0], ''); - } else { - alignment = 'left'; - } - if (alignment === 'none') { - enabled = false; - } - if (m = val.match(/color\:([\w\-]+)/)) { - color = m[1]; - val = val.replace(m[0], ''); - } - if (m = val.match(/bg\:([\w\-]+)/)) { - bg = m[1]; - val = val.replace(m[0], ''); - } - if (val.trim() !== '') { - throw Error("Unrecognizable value `" + original + "` for `" + this.prop + "`"); - } - return this.val = { - enabled: enabled, - char: char, - alignment: alignment, - background: bg, - color: color - }; - }; - - return Bullet; - -})(_Declaration); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Color.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Color.js deleted file mode 100644 index 709dd89e..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Color.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var Color, _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'); - -module.exports = Color = (function(superClass) { - extend(Color, superClass); - - function Color() { - return Color.__super__.constructor.apply(this, arguments); - } - - return Color; - -})(_Declaration); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Display.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Display.js deleted file mode 100644 index 80a9ae44..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Display.js +++ /dev/null @@ -1,32 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var Display, _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, - indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - -_Declaration = require('./_Declaration'); - -module.exports = Display = (function(superClass) { - var self; - - extend(Display, superClass); - - function Display() { - return Display.__super__.constructor.apply(this, arguments); - } - - self = Display; - - Display._allowed = ['inline', 'block', 'none']; - - Display.prototype._set = function(val) { - val = String(val).toLowerCase(); - if (indexOf.call(self._allowed, val) < 0) { - throw Error("Unrecognizable value `" + val + "` for `" + this.prop + "`"); - } - return this.val = val; - }; - - return Display; - -})(_Declaration); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Height.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Height.js deleted file mode 100644 index 35bf7ba7..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Height.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var Height, _Length, - 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; - -_Length = require('./_Length'); - -module.exports = Height = (function(superClass) { - extend(Height, superClass); - - function Height() { - return Height.__super__.constructor.apply(this, arguments); - } - - return Height; - -})(_Length); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Margin.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Margin.js deleted file mode 100644 index 6dfe0764..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Margin.js +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var Margin, MarginBottom, MarginLeft, MarginRight, MarginTop, _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'); - -MarginTop = require('./MarginTop'); - -MarginLeft = require('./MarginLeft'); - -MarginRight = require('./MarginRight'); - -MarginBottom = require('./MarginBottom'); - -module.exports = Margin = (function(superClass) { - var self; - - extend(Margin, superClass); - - function Margin() { - return Margin.__super__.constructor.apply(this, arguments); - } - - self = Margin; - - Margin.setOnto = function(declarations, prop, originalValue) { - var append, val, vals; - append = ''; - val = _Declaration.sanitizeValue(originalValue); - if (_Declaration.importantClauseRx.test(String(val))) { - append = ' !important'; - val = val.replace(_Declaration.importantClauseRx, ''); - } - val = val.trim(); - if (val.length === 0) { - return self._setAllDirections(declarations, append, append, append, append); - } - vals = val.split(" ").map(function(val) { - return val + append; - }); - if (vals.length === 1) { - return self._setAllDirections(declarations, vals[0], vals[0], vals[0], vals[0]); - } else if (vals.length === 2) { - return self._setAllDirections(declarations, vals[0], vals[1], vals[0], vals[1]); - } else if (vals.length === 3) { - return self._setAllDirections(declarations, vals[0], vals[1], vals[2], vals[1]); - } else if (vals.length === 4) { - return self._setAllDirections(declarations, vals[0], vals[1], vals[2], vals[3]); - } else { - throw Error("Can't understand value for margin: `" + originalValue + "`"); - } - }; - - Margin._setAllDirections = function(declarations, top, right, bottom, left) { - MarginTop.setOnto(declarations, 'marginTop', top); - MarginTop.setOnto(declarations, 'marginRight', right); - MarginTop.setOnto(declarations, 'marginBottom', bottom); - MarginTop.setOnto(declarations, 'marginLeft', left); - }; - - return Margin; - -})(_Declaration); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/MarginBottom.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/MarginBottom.js deleted file mode 100644 index 45f2e21a..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/MarginBottom.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var MarginBottom, _Length, - 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; - -_Length = require('./_Length'); - -module.exports = MarginBottom = (function(superClass) { - extend(MarginBottom, superClass); - - function MarginBottom() { - return MarginBottom.__super__.constructor.apply(this, arguments); - } - - return MarginBottom; - -})(_Length); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/MarginLeft.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/MarginLeft.js deleted file mode 100644 index e4b1ddd6..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/MarginLeft.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var MarginLeft, _Length, - 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; - -_Length = require('./_Length'); - -module.exports = MarginLeft = (function(superClass) { - extend(MarginLeft, superClass); - - function MarginLeft() { - return MarginLeft.__super__.constructor.apply(this, arguments); - } - - return MarginLeft; - -})(_Length); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/MarginRight.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/MarginRight.js deleted file mode 100644 index 3d6fcdc0..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/MarginRight.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var MarginRight, _Length, - 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; - -_Length = require('./_Length'); - -module.exports = MarginRight = (function(superClass) { - extend(MarginRight, superClass); - - function MarginRight() { - return MarginRight.__super__.constructor.apply(this, arguments); - } - - return MarginRight; - -})(_Length); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/MarginTop.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/MarginTop.js deleted file mode 100644 index ffd5ef32..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/MarginTop.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var MarginTop, _Length, - 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; - -_Length = require('./_Length'); - -module.exports = MarginTop = (function(superClass) { - extend(MarginTop, superClass); - - function MarginTop() { - return MarginTop.__super__.constructor.apply(this, arguments); - } - - return MarginTop; - -})(_Length); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Padding.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Padding.js deleted file mode 100644 index 9681204b..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Padding.js +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var Padding, PaddingBottom, PaddingLeft, PaddingRight, PaddingTop, _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'); - -PaddingTop = require('./PaddingTop'); - -PaddingLeft = require('./PaddingLeft'); - -PaddingRight = require('./PaddingRight'); - -PaddingBottom = require('./PaddingBottom'); - -module.exports = Padding = (function(superClass) { - var self; - - extend(Padding, superClass); - - function Padding() { - return Padding.__super__.constructor.apply(this, arguments); - } - - self = Padding; - - Padding.setOnto = function(declarations, prop, originalValue) { - var append, val, vals; - append = ''; - val = _Declaration.sanitizeValue(originalValue); - if (_Declaration.importantClauseRx.test(String(val))) { - append = ' !important'; - val = val.replace(_Declaration.importantClauseRx, ''); - } - val = val.trim(); - if (val.length === 0) { - return self._setAllDirections(declarations, append, append, append, append); - } - vals = val.split(" ").map(function(val) { - return val + append; - }); - if (vals.length === 1) { - return self._setAllDirections(declarations, vals[0], vals[0], vals[0], vals[0]); - } else if (vals.length === 2) { - return self._setAllDirections(declarations, vals[0], vals[1], vals[0], vals[1]); - } else if (vals.length === 3) { - return self._setAllDirections(declarations, vals[0], vals[1], vals[2], vals[1]); - } else if (vals.length === 4) { - return self._setAllDirections(declarations, vals[0], vals[1], vals[2], vals[3]); - } else { - throw Error("Can't understand value for padding: `" + originalValue + "`"); - } - }; - - Padding._setAllDirections = function(declarations, top, right, bottom, left) { - PaddingTop.setOnto(declarations, 'paddingTop', top); - PaddingTop.setOnto(declarations, 'paddingRight', right); - PaddingTop.setOnto(declarations, 'paddingBottom', bottom); - PaddingTop.setOnto(declarations, 'paddingLeft', left); - }; - - return Padding; - -})(_Declaration); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/PaddingBottom.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/PaddingBottom.js deleted file mode 100644 index 7052a606..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/PaddingBottom.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var PaddingBottom, _Length, - 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; - -_Length = require('./_Length'); - -module.exports = PaddingBottom = (function(superClass) { - extend(PaddingBottom, superClass); - - function PaddingBottom() { - return PaddingBottom.__super__.constructor.apply(this, arguments); - } - - return PaddingBottom; - -})(_Length); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/PaddingLeft.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/PaddingLeft.js deleted file mode 100644 index 35d5fbd6..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/PaddingLeft.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var PaddingLeft, _Length, - 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; - -_Length = require('./_Length'); - -module.exports = PaddingLeft = (function(superClass) { - extend(PaddingLeft, superClass); - - function PaddingLeft() { - return PaddingLeft.__super__.constructor.apply(this, arguments); - } - - return PaddingLeft; - -})(_Length); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/PaddingRight.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/PaddingRight.js deleted file mode 100644 index 31d2af99..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/PaddingRight.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var PaddingRight, _Length, - 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; - -_Length = require('./_Length'); - -module.exports = PaddingRight = (function(superClass) { - extend(PaddingRight, superClass); - - function PaddingRight() { - return PaddingRight.__super__.constructor.apply(this, arguments); - } - - return PaddingRight; - -})(_Length); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/PaddingTop.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/PaddingTop.js deleted file mode 100644 index a6cf14ac..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/PaddingTop.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var PaddingTop, _Length, - 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; - -_Length = require('./_Length'); - -module.exports = PaddingTop = (function(superClass) { - extend(PaddingTop, superClass); - - function PaddingTop() { - return PaddingTop.__super__.constructor.apply(this, arguments); - } - - return PaddingTop; - -})(_Length); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Width.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Width.js deleted file mode 100644 index 4f573b62..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/Width.js +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var Width, _Length, - 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; - -_Length = require('./_Length'); - -module.exports = Width = (function(superClass) { - extend(Width, superClass); - - function Width() { - return Width.__super__.constructor.apply(this, arguments); - } - - return Width; - -})(_Length); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/_Declaration.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/_Declaration.js deleted file mode 100644 index dce27e21..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/_Declaration.js +++ /dev/null @@ -1,84 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var _Declaration; - -module.exports = _Declaration = (function() { - var self; - - self = _Declaration; - - _Declaration.importantClauseRx = /(\s\!important)$/; - - _Declaration.setOnto = function(declarations, prop, val) { - var dec; - if (!(dec = declarations[prop])) { - return declarations[prop] = new this(prop, val); - } else { - return dec.set(val); - } - }; - - _Declaration.sanitizeValue = function(val) { - return String(val).trim().replace(/[\s]+/g, ' '); - }; - - _Declaration.inheritAllowed = false; - - function _Declaration(prop1, val) { - this.prop = prop1; - this.important = false; - this.set(val); - } - - _Declaration.prototype.get = function() { - return this._get(); - }; - - _Declaration.prototype._get = function() { - return this.val; - }; - - _Declaration.prototype._pickImportantClause = function(val) { - if (self.importantClauseRx.test(String(val))) { - this.important = true; - return val.replace(self.importantClauseRx, ''); - } else { - this.important = false; - return val; - } - }; - - _Declaration.prototype.set = function(val) { - val = self.sanitizeValue(val); - val = this._pickImportantClause(val); - val = val.trim(); - if (this._handleNullOrInherit(val)) { - return this; - } - this._set(val); - return this; - }; - - _Declaration.prototype._set = function(val) { - return this.val = val; - }; - - _Declaration.prototype._handleNullOrInherit = function(val) { - if (val === '') { - this.val = ''; - return true; - } - if (val === 'inherit') { - if (this.constructor.inheritAllowed) { - this.val = 'inherit'; - } else { - throw Error("Inherit is not allowed for `" + this.prop + "`"); - } - return true; - } else { - return false; - } - }; - - return _Declaration; - -})(); diff --git a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/_Length.js b/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/_Length.js deleted file mode 100644 index 0440d30c..00000000 --- a/node_modules/renderkid/lib/renderKid/styles/rule/declarationBlock/_Length.js +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var _Declaration, _Length, - 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'); - -module.exports = _Length = (function(superClass) { - extend(_Length, superClass); - - function _Length() { - return _Length.__super__.constructor.apply(this, arguments); - } - - _Length.prototype._set = function(val) { - if (!/^[0-9]+$/.test(String(val))) { - throw Error("`" + this.prop + "` only takes an integer for value"); - } - return this.val = parseInt(val); - }; - - return _Length; - -})(_Declaration); |
