Utility class for manipulating CSS rules
Creates a stylesheet from a text blob of rules. These rules will be wrapped in a STYLE tag and appended to the HEAD of the document.
The text containing the css rules
An id to add to the stylesheet for later removal
Gets an an individual CSS rule by selector(s)
Gets an an individual CSS rule by selector(s)
The CSS selector or an array of selectors to try. The first selector that is found is returned.
true to refresh the internal cache if you have recently updated any rules or added styles dynamically
The CSS rule or null if one is not found
Gets all css rules for the document
Gets all css rules for the document
true to refresh the internal cache
An object (hash) of rules indexed by selector
Refresh the rule cache if you have dynamically added stylesheets
Refresh the rule cache if you have dynamically added stylesheets
An object (hash) of rules indexed by selector
Removes a style or link tag by id
Removes a style or link tag by id
The id of the tag
Dynamically swaps an existing stylesheet reference for a new one
Dynamically swaps an existing stylesheet reference for a new one
The id of an existing link tag to remove
The href of the new stylesheet to include
Updates a rule property
Updates a rule property
If it's an array it tries each selector until it finds one. Stops immediately once one is found.
The css property
The new value for the property
true If a rule was found and updated