From cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 27 Mar 2019 21:01:33 +0100 Subject: remove node_modules --- node_modules/renderkid/lib/renderKid/Styles.js | 76 -------------------------- 1 file changed, 76 deletions(-) delete mode 100644 node_modules/renderkid/lib/renderKid/Styles.js (limited to 'node_modules/renderkid/lib/renderKid/Styles.js') diff --git a/node_modules/renderkid/lib/renderKid/Styles.js b/node_modules/renderkid/lib/renderKid/Styles.js deleted file mode 100644 index 52651aa01..000000000 --- a/node_modules/renderkid/lib/renderKid/Styles.js +++ /dev/null @@ -1,76 +0,0 @@ -// Generated by CoffeeScript 1.9.3 -var MixedDeclarationSet, StyleSheet, Styles, terminalWidth; - -StyleSheet = require('./styles/StyleSheet'); - -MixedDeclarationSet = require('./styles/rule/MixedDeclarationSet'); - -terminalWidth = require('../tools').getCols(); - -module.exports = Styles = (function() { - var self; - - self = Styles; - - Styles.defaultRules = { - '*': { - display: 'inline' - }, - 'body': { - background: 'none', - color: 'white', - display: 'block', - width: terminalWidth + ' !important' - } - }; - - function Styles() { - this._defaultStyles = new StyleSheet; - this._userStyles = new StyleSheet; - this._setDefaultStyles(); - } - - Styles.prototype._setDefaultStyles = function() { - this._defaultStyles.setRule(self.defaultRules); - }; - - Styles.prototype.setRule = function(selector, rules) { - this._userStyles.setRule.apply(this._userStyles, arguments); - return this; - }; - - Styles.prototype.getStyleFor = function(el) { - var styles; - styles = el.styles; - if (styles == null) { - el.styles = styles = this._getComputedStyleFor(el); - } - return styles; - }; - - Styles.prototype._getRawStyleFor = function(el) { - var def, user; - def = this._defaultStyles.getRulesFor(el); - user = this._userStyles.getRulesFor(el); - return MixedDeclarationSet.mix(def, user).toObject(); - }; - - Styles.prototype._getComputedStyleFor = function(el) { - var decs, parent, prop, ref, val; - decs = {}; - parent = el.parent; - ref = this._getRawStyleFor(el); - for (prop in ref) { - val = ref[prop]; - if (val !== 'inherit') { - decs[prop] = val; - } else { - throw Error("Inherited styles are not supported yet."); - } - } - return decs; - }; - - return Styles; - -})(); -- cgit v1.2.3