UnderZ

Javascript Library.

Add CSS code.

Insert a new CSS rule.


Add CSS code

_z.cssRole(String);

Returns: _z Function


Add multi CSS code

_z.cssRole([String1, String2]);

Returns: _z Function

Examples

<script>
// Multi CSS code
var cssCodeMulti = [`
			body {
				width: 50%;
				font-size: 1px;
			}
			`, `
			input {
				font-size: 28px;
				color: blue;
			}
			`
		];

// single CSS code #1
var cssCodeSingle = "button { width: 100%; }";

// single CSS code #2
var cssCodeSingle1 = "button { margin: 0 auto; }";
var cssCodeSingle2 = "p { text-align: right; }";

_z.cssRole(cssCodeMulti);
_z.cssRole(cssCodeSingle);
_z.cssRole(cssCodeSingle1).cssRole(cssCodeSingle2);
</script>

Warning: DO NOT add multiple css code.

Single code is like :

CSSSelector {
  property: value;
}

Multi code is like :

CSSSelector1 {
  property: value;
}

CSSSelector2 {
  property: value;
}