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

Version Path
stylus-source-0.23.0 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.22.6 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.22.5 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.22.4 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.22.3 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.22.2 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.22.1 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.22.0 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.21.2 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.21.1 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.21.0 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.20.1 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.20.0 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.19.8 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.19.7 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.19.6 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.19.5 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.19.4 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.19.3 vendor/node_modules/cssom/plugins/toHTML.js
stylus-source-0.19.2 vendor/node_modules/cssom/plugins/toHTML.js