Sha256: 93277840c327bb6f6380d9e9e0588e2e0445936020bedd1728edefc9bc04066f
Contents?: true
Size: 807 Bytes
Versions: 25
Compression:
Stored size: 807 Bytes
Contents
/** * return {string} */ function toHTML(){ var result = ""; var rules = this.cssRules; var length = rules.length; for (var i = 0; i < length; i++) { var rule = rules[i]; if (rule) { result += "<span class='rule'><b class='selector'>" + rule.selectorText + "</b> <span class='brace-open'>{</span>"; var style = rule.style; if (!style) continue; var jj = style.length; if (jj) { for (var j = 0; j < jj; j++) { var name = style[j]; result += "\n<span class='name'> " + name + "</span><span class='colon'>: </span><span class='value'>" + style[name] + "</span><span class='semicolon'>;</span>"; } } result += "<span class='brace-close'>\n}\n</span></span>"; } } return result; } if (typeof exports != "undefined") { exports.toHTML = toHTML; }
Version data entries
25 entries across 25 versions & 1 rubygems