See the dojox/html/styles reference documentation for more information.
Getter/Setter
If passed a title, enables a that style sheet. All other toggle-able style sheets are disabled. If no argument is passed, returns currently enabled style sheet.
Parameter | Type | Description |
---|---|---|
title | String |
Optional
|
Disables the dynamic style sheet with the name passed in the argument. If no arg is passed, defaults to the default style sheet.
Parameter | Type | Description |
---|---|---|
styleSheetName | String |
Enables the style sheet with the name passed in the argument. Deafults to the default style sheet.
Parameter | Type | Description |
---|---|---|
styleSheetName | String |
Creates and returns a dynamically created style sheet used for dynamic styles
Parameter | Type | Description |
---|---|---|
styleSheetName | String |
Optional The name given the style sheet so that multiple style sheets can be created and referenced. If no argument is given, the name "default" is used. |
Returns the style sheet that was initially enabled on document launch. TODO, does not work.
Returns a style sheet based on the argument. Searches dynamic style sheets first. If no matches, searches document style sheets.
Parameter | Type | Description |
---|---|---|
styleSheetName | String |
Optional A title or an href to a style sheet. Title can be an attribute in a tag, or a dynamic style sheet reference. Href can be the name of the file. If no argument, the assumed created dynamic style sheet is used. |
Collects all the style sheets referenced in the HTML page, including any included via @import.
An hash map of all the style sheets.
Searches HTML for style sheets that are "toggle-able" - can be enabled and disabled. These would include sheets with the title attribute, as well as the REL attribute.
An array of all toggle-able style sheets
Creates a style and attaches it to a dynamically created stylesheet
Parameter | Type | Description |
---|---|---|
selector | String | A fully qualified class name, as it would appear in a CSS dojo.doc. Start classes with periods, target nodes with '#'. Large selectors can also be created like: "#myDiv.myClass span input" |
declaration | String | A single string that would make up a style block, not including the curly braces. Include semi-colons between statements. Do not use JavaScript style declarations in camel case, use as you would in a CSS dojo.doc: "color:#ffoooo;font-size:12px;margin-left:5px;" |
styleSheetName | String |
Optional Name of the dynamic style sheet this rule should be inserted into. If is not found by that name, it is created. If no name is passed, the name "default" is used. |
Not implemented - it seems to have some merit for changing some complex selectors. It's not much use for changing simple ones like "span". For now, simply write a new rule which will cascade over the first.
Modifies an existing cssRule
Parameter | Type | Description |
---|---|---|
selector | undefined | |
declaration | undefined | |
styleSheetName | undefined |
Removes a cssRule base on the selector and declaration passed The declaration is needed for cases of dupe selectors
Only removes DYNAMICALLY created cssRules. If you created it with dh.insertCssRule, it can be removed.
Parameter | Type | Description |
---|---|---|
selector | String | |
declaration | String | |
styleSheetName | String |