commit extjs-2.2.1
[extjs.git] / docs / output / Ext.util.CSS.html
1         <div class="body-wrap">
2         <div class="top-tools">
3             <a class="inner-link" href="#Ext.util.CSS-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4             <a class="inner-link" href="#Ext.util.CSS-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5             <a class="inner-link" href="#Ext.util.CSS-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6                         <a class="bookmark" href="../docs/?class=Ext.util.CSS"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
7         </div>
8                 <h1>Class Ext.util.CSS</h1>
9         <table cellspacing="0">
10             <tr><td class="label">Package:</td><td class="hd-info">Ext.util</td></tr>
11             <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/CSS.js" target="_blank">CSS.js</a></td></tr>
12             <tr><td class="label">Class:</td><td class="hd-info">CSS</td></tr>
13                                     <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
14                     </table>
15         <div class="description">
16             *
17 Utility class for manipulating CSS rules<br><br><i>This class is a singleton and cannot be created directly.</i>        </div>
18         
19         <div class="hr"></div>
20                 <a id="Ext.util.CSS-props"></a>
21         <h2>Public Properties</h2>
22         <div class="no-members">This class has no public properties.</div>        <a id="Ext.util.CSS-methods"></a>
23         <h2>Public Methods</h2>
24                 <table cellspacing="0" class="member-table">
25             <tr>
26                 <th class="sig-header" colspan="2">Method</th>
27                 <th class="msource-header">Defined By</th>
28             </tr>
29                 <tr class="method-row expandable">\r
30         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
31         <td class="sig">\r
32         <a id="Ext.util.CSS-createStyleSheet"></a>\r
33             <b>createStyleSheet</b>(&nbsp;<code>String cssText</code>, <code>String id</code>&nbsp;) : StyleSheet            <div class="mdesc">\r
34                         <div class="short">Creates a stylesheet from a text blob of rules.
35 These rules will be wrapped in a STYLE tag and appended to the HEAD o...</div>\r
36             <div class="long">\r
37                 Creates a stylesheet from a text blob of rules.
38 These rules will be wrapped in a STYLE tag and appended to the HEAD of the document.    <div class="mdetail-params">\r
39         <strong>Parameters:</strong>\r
40         <ul><li><code>cssText</code> : String<div class="sub-desc">The text containing the css rules</div></li><li><code>id</code> : String<div class="sub-desc">An id to add to the stylesheet for later removal</div></li>        </ul>\r
41         <strong>Returns:</strong>\r
42         <ul>\r
43             <li><code>StyleSheet</code></li>\r
44         </ul>\r
45     </div>\r
46                 </div>\r
47                         </div>\r
48         </td>\r
49         <td class="msource">CSS</td>\r
50     </tr>\r
51         <tr class="method-row alt expandable">\r
52         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
53         <td class="sig">\r
54         <a id="Ext.util.CSS-getRule"></a>\r
55             <b>getRule</b>(&nbsp;<code>String/Array selector</code>, <code>Boolean refreshCache</code>&nbsp;) : CSSRule            <div class="mdesc">\r
56                         <div class="short">Gets an an individual CSS rule by selector(s)</div>\r
57             <div class="long">\r
58                 Gets an an individual CSS rule by selector(s)    <div class="mdetail-params">\r
59         <strong>Parameters:</strong>\r
60         <ul><li><code>selector</code> : String/Array<div class="sub-desc">The CSS selector or an array of selectors to try. The first selector that is found is returned.</div></li><li><code>refreshCache</code> : Boolean<div class="sub-desc">true to refresh the internal cache if you have recently updated any rules or added styles dynamically</div></li>        </ul>\r
61         <strong>Returns:</strong>\r
62         <ul>\r
63             <li><code>CSSRule</code><div class="sub-desc">The CSS rule or null if one is not found</div></li>\r
64         </ul>\r
65     </div>\r
66                 </div>\r
67                         </div>\r
68         </td>\r
69         <td class="msource">CSS</td>\r
70     </tr>\r
71         <tr class="method-row expandable">\r
72         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
73         <td class="sig">\r
74         <a id="Ext.util.CSS-getRules"></a>\r
75             <b>getRules</b>(&nbsp;<code>Boolean refreshCache</code>&nbsp;) : Object            <div class="mdesc">\r
76                         <div class="short">Gets all css rules for the document</div>\r
77             <div class="long">\r
78                 Gets all css rules for the document    <div class="mdetail-params">\r
79         <strong>Parameters:</strong>\r
80         <ul><li><code>refreshCache</code> : Boolean<div class="sub-desc">true to refresh the internal cache</div></li>        </ul>\r
81         <strong>Returns:</strong>\r
82         <ul>\r
83             <li><code>Object</code><div class="sub-desc">An object (hash) of rules indexed by selector</div></li>\r
84         </ul>\r
85     </div>\r
86                 </div>\r
87                         </div>\r
88         </td>\r
89         <td class="msource">CSS</td>\r
90     </tr>\r
91         <tr class="method-row alt expandable">\r
92         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
93         <td class="sig">\r
94         <a id="Ext.util.CSS-refreshCache"></a>\r
95             <b>refreshCache</b>() : Object            <div class="mdesc">\r
96                         <div class="short">Refresh the rule cache if you have dynamically added stylesheets</div>\r
97             <div class="long">\r
98                 Refresh the rule cache if you have dynamically added stylesheets    <div class="mdetail-params">\r
99         <strong>Parameters:</strong>\r
100         <ul><li>None.</li>        </ul>\r
101         <strong>Returns:</strong>\r
102         <ul>\r
103             <li><code>Object</code><div class="sub-desc">An object (hash) of rules indexed by selector</div></li>\r
104         </ul>\r
105     </div>\r
106                 </div>\r
107                         </div>\r
108         </td>\r
109         <td class="msource">CSS</td>\r
110     </tr>\r
111         <tr class="method-row expandable">\r
112         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
113         <td class="sig">\r
114         <a id="Ext.util.CSS-removeStyleSheet"></a>\r
115             <b>removeStyleSheet</b>(&nbsp;<code>String id</code>&nbsp;) : void            <div class="mdesc">\r
116                         <div class="short">Removes a style or link tag by id</div>\r
117             <div class="long">\r
118                 Removes a style or link tag by id    <div class="mdetail-params">\r
119         <strong>Parameters:</strong>\r
120         <ul><li><code>id</code> : String<div class="sub-desc">The id of the tag</div></li>        </ul>\r
121         <strong>Returns:</strong>\r
122         <ul>\r
123             <li><code>void</code></li>\r
124         </ul>\r
125     </div>\r
126                 </div>\r
127                         </div>\r
128         </td>\r
129         <td class="msource">CSS</td>\r
130     </tr>\r
131         <tr class="method-row alt expandable">\r
132         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
133         <td class="sig">\r
134         <a id="Ext.util.CSS-swapStyleSheet"></a>\r
135             <b>swapStyleSheet</b>(&nbsp;<code>String id</code>, <code>String url</code>&nbsp;) : void            <div class="mdesc">\r
136                         <div class="short">Dynamically swaps an existing stylesheet reference for a new one</div>\r
137             <div class="long">\r
138                 Dynamically swaps an existing stylesheet reference for a new one    <div class="mdetail-params">\r
139         <strong>Parameters:</strong>\r
140         <ul><li><code>id</code> : String<div class="sub-desc">The id of an existing link tag to remove</div></li><li><code>url</code> : String<div class="sub-desc">The href of the new stylesheet to include</div></li>        </ul>\r
141         <strong>Returns:</strong>\r
142         <ul>\r
143             <li><code>void</code></li>\r
144         </ul>\r
145     </div>\r
146                 </div>\r
147                         </div>\r
148         </td>\r
149         <td class="msource">CSS</td>\r
150     </tr>\r
151         <tr class="method-row expandable">\r
152         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
153         <td class="sig">\r
154         <a id="Ext.util.CSS-updateRule"></a>\r
155             <b>updateRule</b>(&nbsp;<code>String/Array selector</code>, <code>String property</code>, <code>String value</code>&nbsp;) : Boolean            <div class="mdesc">\r
156                         <div class="short">Updates a rule property</div>\r
157             <div class="long">\r
158                 Updates a rule property    <div class="mdetail-params">\r
159         <strong>Parameters:</strong>\r
160         <ul><li><code>selector</code> : String/Array<div class="sub-desc">If it's an array it tries each selector until it finds one. Stops immediately once one is found.</div></li><li><code>property</code> : String<div class="sub-desc">The css property</div></li><li><code>value</code> : String<div class="sub-desc">The new value for the property</div></li>        </ul>\r
161         <strong>Returns:</strong>\r
162         <ul>\r
163             <li><code>Boolean</code><div class="sub-desc">true If a rule was found and updated</div></li>\r
164         </ul>\r
165     </div>\r
166                 </div>\r
167                         </div>\r
168         </td>\r
169         <td class="msource">CSS</td>\r
170     </tr>\r
171             </table>
172                 <a id="Ext.util.CSS-events"></a>
173         <h2>Public Events</h2>
174         <div class="no-members">This class has no public events.</div>
175         </div>