Class Ext.util.CSS
Package: | Ext.util |
Class: | CSS |
Extends: | Object |
Defined In: | CSS.js |
Utility class for manipulating CSS rules
This class is a singleton and cannot be created directly.
Properties
-
Methods
-
Events
Public Properties
This class has no public properties.
Public Methods
|
createStyleSheet( String cssText , String id ) : StyleSheet |
CSS |
Very simple dynamic creation of stylesheets from a text blob of rules. The text will wrapped in a style
tag and appe... |
|
getRule( String/Array selector , Boolean refreshCache ) : CSSRule |
CSS |
Gets an an individual CSS rule by selector(s) |
|
getRules( Boolean refreshCache ) : Object |
CSS |
Gets all css rules for the document |
|
refreshCache() : Object |
CSS |
Refresh the rule cache if you have dynamically added stylesheets |
|
removeStyleSheet( String id ) : void |
CSS |
Removes a style or link tag by id |
|
swapStyleSheet( String id , String url ) : void |
CSS |
Dynamically swaps an existing stylesheet reference for a new one |
|
updateRule( String/Array selector , String property , String value ) : Boolean |
CSS |
Updates a rule property |
Public Events
This class has no public events.
Method Details
createStyleSheet
public function createStyleSheet( String cssText
, String id
)
Very simple dynamic creation of stylesheets from a text blob of rules. The text will wrapped in a style
tag and appended to the HEAD of the document.
This method is defined by CSS.
getRule
public function getRule( String/Array selector
, Boolean refreshCache
)
Gets an an individual CSS rule by selector(s)
This method is defined by CSS.
getRules
public function getRules( Boolean refreshCache
)
Gets all css rules for the document
This method is defined by CSS.
refreshCache
public function refreshCache()
Refresh the rule cache if you have dynamically added stylesheets
This method is defined by CSS.
removeStyleSheet
public function removeStyleSheet( String id
)
Removes a style or link tag by id
Parameters:
id
: StringThe id of the tag
Returns:
This method is defined by CSS.
swapStyleSheet
public function swapStyleSheet( String id
, String url
)
Dynamically swaps an existing stylesheet reference for a new one
This method is defined by CSS.
updateRule
public function updateRule( String/Array selector
, String property
, String value
)
This method is defined by CSS.