var sheet = Y.StyleSheet(..);
var sheet = new Y.StyleSheet(..);
<link>
<style>
If a string is passed, StyleSheet will first look in its static name * registry for an existing sheet, then in the DOM for an element with that id. * If neither are found and the string contains the { character, it will be * used as a the initial cssText for a new StyleSheet. Otherwise, a new empty * StyleSheet is created, assigned the string value as a name, and registered * statically by that name.
The optional second parameter is a string name to register the sheet as. * This param is largely useful when providing a node id/ref or chunk of css * text to create a populated instance.
Set style properties for a provided selector string. * If the selector includes commas, it will be split into individual * selectors and applied accordingly. If the selector string does not * have a corresponding rule in the sheet, it will be added.
The object properties in the second parameter must be the JavaScript * names of style properties. E.g. fontSize rather than font-size.
The float style property will be set by any of "float", * "styleFloat", or "cssFloat".
Unset style properties for a provided selector string, removing * their effect from the style cascade.
If the selector includes commas, it will be split into individual * selectors and applied accordingly. If there are no properties * remaining in the rule after unsetting, the rule is removed.
The style property or properties in the second parameter must be the * JavaScript style property names. E.g. fontSize rather than font-size.
The float style property will be unset by any of "float", * "styleFloat", or "cssFloat".
Converts an object literal of style properties and values into a string * of css text. This can then be assigned to el.style.cssText.
The optional second parameter is a cssText string representing the * starting state of the style prior to alterations. This is most often * extracted from the eventual target's current el.style.cssText.
Determines if a selector string is safe to use. Used internally * in set to prevent IE from locking up when attempting to add a rule for a * "bad selector".
Bad selectors are considered to be any string containing unescaped * `~!@$%^&()+=|{}[];'"?< or space. Also forbidden are . or # followed by * anything other than an alphanumeric. Additionally -abc or .-abc or * #_abc or '# ' all fail. There are likely more failure cases, so * please file a bug if you encounter one.