Sha256: 0ddd19abd995c01ba9683480567c92fef2ab8d843487ffb970fc60f41ed101db

Contents?: true

Size: 1019 Bytes

Versions: 8

Compression:

Stored size: 1019 Bytes

Contents

test("CSSStyleDeclaration", function(){
	var d = new CSSOM.CSSStyleDeclaration;

	d.setProperty("color", "purple");
	equalOwnProperties(d, {
		0: "color",
		length: 1,
		color: "purple"
	});

	d.setProperty("width", "128px", "important");
	equalOwnProperties(d, {
		0: "color",
		1: "width",
		length: 2,
		color: "purple",
		width: "128px"
	});

	equal(d.cssText, "color: purple; width: 128px !important;");

	equal(d.getPropertyValue("color"), "purple");
	equal(d.getPropertyValue("width"), "128px");
	equal(d.getPropertyValue("position"), "");

	strictEqual(d.getPropertyPriority("color"), "");
	strictEqual(d.getPropertyPriority("width"), "important");
	strictEqual(d.getPropertyPriority("position"), "");

	d.setProperty("color", "green");
	d.removeProperty("width");

	equal(d.cssText, "color: green;");

});

test("CSSStyleDeclaration#cssText", function(){
	var d = new CSSOM.CSSStyleDeclaration;
	var cssText = "color: pink; outline: 2px solid red;";
	d.cssText = cssText;
	strictEqual(d.cssText, cssText);
});

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
stylus-source-0.23.0 vendor/node_modules/cssom/test/CSSStyleDeclaration.test.js
stylus-source-0.22.6 vendor/node_modules/cssom/test/CSSStyleDeclaration.test.js
stylus-source-0.22.5 vendor/node_modules/cssom/test/CSSStyleDeclaration.test.js
stylus-source-0.22.4 vendor/node_modules/cssom/test/CSSStyleDeclaration.test.js
stylus-source-0.22.3 vendor/node_modules/cssom/test/CSSStyleDeclaration.test.js
stylus-source-0.22.2 vendor/node_modules/cssom/test/CSSStyleDeclaration.test.js
stylus-source-0.22.1 vendor/node_modules/cssom/test/CSSStyleDeclaration.test.js
stylus-source-0.22.0 vendor/node_modules/cssom/test/CSSStyleDeclaration.test.js