2 |
aperonnet |
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="../source/util/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 |
Utility class for manipulating CSS rules<br><br><i>This class is a singleton and cannot be created directly.</i> </div>
|
|
|
17 |
|
|
|
18 |
<div class="hr"></div>
|
|
|
19 |
<a id="Ext.util.CSS-props"></a>
|
|
|
20 |
<h2>Public Properties</h2>
|
|
|
21 |
<div class="no-members">This class has no public properties.</div> <a id="Ext.util.CSS-methods"></a>
|
|
|
22 |
<h2>Public Methods</h2>
|
|
|
23 |
<table cellspacing="0" class="member-table">
|
|
|
24 |
<tr>
|
|
|
25 |
<th class="sig-header" colspan="2">Method</th>
|
|
|
26 |
<th class="msource-header">Defined By</th>
|
|
|
27 |
</tr>
|
|
|
28 |
<tr class="method-row expandable">
|
|
|
29 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
30 |
<td class="sig">
|
|
|
31 |
<a id="Ext.util.CSS-createStyleSheet"></a>
|
|
|
32 |
<b>createStyleSheet</b>( <code>String cssText</code>, <code>String id</code> ) : StyleSheet <div class="mdesc">
|
|
|
33 |
<div class="short">Creates a stylesheet from a text blob of rules.
|
|
|
34 |
These rules will be wrapped in a STYLE tag and appended to the HEAD o...</div>
|
|
|
35 |
<div class="long">
|
|
|
36 |
Creates a stylesheet from a text blob of rules.
|
|
|
37 |
These rules will be wrapped in a STYLE tag and appended to the HEAD of the document. <div class="mdetail-params">
|
|
|
38 |
<strong>Parameters:</strong>
|
|
|
39 |
<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>
|
|
|
40 |
<strong>Returns:</strong>
|
|
|
41 |
<ul>
|
|
|
42 |
<li><code>StyleSheet</code></li>
|
|
|
43 |
</ul>
|
|
|
44 |
</div>
|
|
|
45 |
</div>
|
|
|
46 |
</div>
|
|
|
47 |
</td>
|
|
|
48 |
<td class="msource">CSS</td>
|
|
|
49 |
</tr>
|
|
|
50 |
<tr class="method-row alt expandable">
|
|
|
51 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
52 |
<td class="sig">
|
|
|
53 |
<a id="Ext.util.CSS-getRule"></a>
|
|
|
54 |
<b>getRule</b>( <code>String/Array selector</code>, <code>Boolean refreshCache</code> ) : CSSRule <div class="mdesc">
|
|
|
55 |
<div class="short">Gets an an individual CSS rule by selector(s)</div>
|
|
|
56 |
<div class="long">
|
|
|
57 |
Gets an an individual CSS rule by selector(s) <div class="mdetail-params">
|
|
|
58 |
<strong>Parameters:</strong>
|
|
|
59 |
<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>
|
|
|
60 |
<strong>Returns:</strong>
|
|
|
61 |
<ul>
|
|
|
62 |
<li><code>CSSRule</code><div class="sub-desc">The CSS rule or null if one is not found</div></li>
|
|
|
63 |
</ul>
|
|
|
64 |
</div>
|
|
|
65 |
</div>
|
|
|
66 |
</div>
|
|
|
67 |
</td>
|
|
|
68 |
<td class="msource">CSS</td>
|
|
|
69 |
</tr>
|
|
|
70 |
<tr class="method-row expandable">
|
|
|
71 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
72 |
<td class="sig">
|
|
|
73 |
<a id="Ext.util.CSS-getRules"></a>
|
|
|
74 |
<b>getRules</b>( <code>Boolean refreshCache</code> ) : Object <div class="mdesc">
|
|
|
75 |
<div class="short">Gets all css rules for the document</div>
|
|
|
76 |
<div class="long">
|
|
|
77 |
Gets all css rules for the document <div class="mdetail-params">
|
|
|
78 |
<strong>Parameters:</strong>
|
|
|
79 |
<ul><li><code>refreshCache</code> : Boolean<div class="sub-desc">true to refresh the internal cache</div></li> </ul>
|
|
|
80 |
<strong>Returns:</strong>
|
|
|
81 |
<ul>
|
|
|
82 |
<li><code>Object</code><div class="sub-desc">An object (hash) of rules indexed by selector</div></li>
|
|
|
83 |
</ul>
|
|
|
84 |
</div>
|
|
|
85 |
</div>
|
|
|
86 |
</div>
|
|
|
87 |
</td>
|
|
|
88 |
<td class="msource">CSS</td>
|
|
|
89 |
</tr>
|
|
|
90 |
<tr class="method-row alt expandable">
|
|
|
91 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
92 |
<td class="sig">
|
|
|
93 |
<a id="Ext.util.CSS-refreshCache"></a>
|
|
|
94 |
<b>refreshCache</b>() : Object <div class="mdesc">
|
|
|
95 |
<div class="short">Refresh the rule cache if you have dynamically added stylesheets</div>
|
|
|
96 |
<div class="long">
|
|
|
97 |
Refresh the rule cache if you have dynamically added stylesheets <div class="mdetail-params">
|
|
|
98 |
<strong>Parameters:</strong>
|
|
|
99 |
<ul><li>None.</li> </ul>
|
|
|
100 |
<strong>Returns:</strong>
|
|
|
101 |
<ul>
|
|
|
102 |
<li><code>Object</code><div class="sub-desc">An object (hash) of rules indexed by selector</div></li>
|
|
|
103 |
</ul>
|
|
|
104 |
</div>
|
|
|
105 |
</div>
|
|
|
106 |
</div>
|
|
|
107 |
</td>
|
|
|
108 |
<td class="msource">CSS</td>
|
|
|
109 |
</tr>
|
|
|
110 |
<tr class="method-row expandable">
|
|
|
111 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
112 |
<td class="sig">
|
|
|
113 |
<a id="Ext.util.CSS-removeStyleSheet"></a>
|
|
|
114 |
<b>removeStyleSheet</b>( <code>String id</code> ) : void <div class="mdesc">
|
|
|
115 |
<div class="short">Removes a style or link tag by id</div>
|
|
|
116 |
<div class="long">
|
|
|
117 |
Removes a style or link tag by id <div class="mdetail-params">
|
|
|
118 |
<strong>Parameters:</strong>
|
|
|
119 |
<ul><li><code>id</code> : String<div class="sub-desc">The id of the tag</div></li> </ul>
|
|
|
120 |
<strong>Returns:</strong>
|
|
|
121 |
<ul>
|
|
|
122 |
<li><code>void</code></li>
|
|
|
123 |
</ul>
|
|
|
124 |
</div>
|
|
|
125 |
</div>
|
|
|
126 |
</div>
|
|
|
127 |
</td>
|
|
|
128 |
<td class="msource">CSS</td>
|
|
|
129 |
</tr>
|
|
|
130 |
<tr class="method-row alt expandable">
|
|
|
131 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
132 |
<td class="sig">
|
|
|
133 |
<a id="Ext.util.CSS-swapStyleSheet"></a>
|
|
|
134 |
<b>swapStyleSheet</b>( <code>String id</code>, <code>String url</code> ) : void <div class="mdesc">
|
|
|
135 |
<div class="short">Dynamically swaps an existing stylesheet reference for a new one</div>
|
|
|
136 |
<div class="long">
|
|
|
137 |
Dynamically swaps an existing stylesheet reference for a new one <div class="mdetail-params">
|
|
|
138 |
<strong>Parameters:</strong>
|
|
|
139 |
<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>
|
|
|
140 |
<strong>Returns:</strong>
|
|
|
141 |
<ul>
|
|
|
142 |
<li><code>void</code></li>
|
|
|
143 |
</ul>
|
|
|
144 |
</div>
|
|
|
145 |
</div>
|
|
|
146 |
</div>
|
|
|
147 |
</td>
|
|
|
148 |
<td class="msource">CSS</td>
|
|
|
149 |
</tr>
|
|
|
150 |
<tr class="method-row expandable">
|
|
|
151 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
152 |
<td class="sig">
|
|
|
153 |
<a id="Ext.util.CSS-updateRule"></a>
|
|
|
154 |
<b>updateRule</b>( <code>String/Array selector</code>, <code>String property</code>, <code>String value</code> ) : Boolean <div class="mdesc">
|
|
|
155 |
<div class="short">Updates a rule property</div>
|
|
|
156 |
<div class="long">
|
|
|
157 |
Updates a rule property <div class="mdetail-params">
|
|
|
158 |
<strong>Parameters:</strong>
|
|
|
159 |
<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>
|
|
|
160 |
<strong>Returns:</strong>
|
|
|
161 |
<ul>
|
|
|
162 |
<li><code>Boolean</code><div class="sub-desc">true If a rule was found and updated</div></li>
|
|
|
163 |
</ul>
|
|
|
164 |
</div>
|
|
|
165 |
</div>
|
|
|
166 |
</div>
|
|
|
167 |
</td>
|
|
|
168 |
<td class="msource">CSS</td>
|
|
|
169 |
</tr>
|
|
|
170 |
</table>
|
|
|
171 |
<a id="Ext.util.CSS-events"></a>
|
|
|
172 |
<h2>Public Events</h2>
|
|
|
173 |
<div class="no-members">This class has no public events.</div>
|
|
|
174 |
</div>
|