]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * Creates a visual theme for a Tab.\r | |
3 | *\r | |
4 | * @param {string} $ui\r | |
5 | * The name of the UI being created. Can not included spaces or special punctuation\r | |
6 | * (used in CSS class names).\r | |
7 | *\r | |
8 | * @param {color} $background-color\r | |
9 | * Tab background-color\r | |
10 | *\r | |
11 | * @param {color} $active-background-color\r | |
12 | * Tab background-color when active\r | |
13 | *\r | |
14 | * @param {string/list} $background-gradient\r | |
15 | * Tab background-gradient. Can be either the name of a gradient defined by\r | |
16 | * {@link Global_CSS#background-gradient} or a list of color stops.\r | |
17 | *\r | |
18 | * @param {string/list} $active-background-gradient\r | |
19 | * Tab background-gradient when active. Can be either the name of a gradient\r | |
20 | * defined by {@link Global_CSS#background-gradient} or a list of color stops.\r | |
21 | *\r | |
22 | * @param {color} $color\r | |
23 | * Tab text color\r | |
24 | *\r | |
25 | * @param {color} $active-color\r | |
26 | * Tab text color when active\r | |
27 | *\r | |
28 | * @param {color/list} $border-color\r | |
29 | * Tab border-color\r | |
30 | *\r | |
31 | * @param {color/list} $active-border-color\r | |
32 | * Tab border-color when active\r | |
33 | *\r | |
34 | * @param {number/list} $border-width\r | |
35 | * Tab border-width\r | |
36 | *\r | |
37 | * @param {number/list} $border-style\r | |
38 | * Tab border-style\r | |
39 | *\r | |
40 | * @param {number} $border-radius\r | |
41 | * Tab border-radius\r | |
42 | *\r | |
43 | * @param {number} $border-radius-big\r | |
44 | * Tab border-radius in the {@link Global_CSS#$enable-big big} sizing scheme\r | |
45 | *\r | |
46 | * @param {number} $font-weight\r | |
47 | * Tab font-weight\r | |
48 | *\r | |
49 | * @param {number} $font-size\r | |
50 | * Tab font-size\r | |
51 | *\r | |
52 | * @param {number} $font-size-big\r | |
53 | * Tab font-size in the {@link Global_CSS#$enable-big big} sizing scheme\r | |
54 | *\r | |
55 | * @param {number} $line-height\r | |
56 | * Tab line-height\r | |
57 | *\r | |
58 | * @param {number} $line-height-big\r | |
59 | * Tab line-height in the {@link Global_CSS#$enable-big big} sizing scheme\r | |
60 | *\r | |
61 | * @param {font-family} $font-family\r | |
62 | * Tab font-family\r | |
63 | *\r | |
64 | * @param {number/list} $padding\r | |
65 | * Tab padding\r | |
66 | *\r | |
67 | * @param {number/list} $padding-big\r | |
68 | * Tab padding in the {@link Global_CSS#$enable-big big} sizing scheme\r | |
69 | *\r | |
70 | * @param {number} $icon-size\r | |
71 | * Tab icon size\r | |
72 | *\r | |
73 | * @param {number} $icon-size-big\r | |
74 | * Tab icon size in the {@link Global_CSS#$enable-big big} sizing scheme\r | |
75 | *\r | |
76 | * @param {number} $icon-font-size\r | |
77 | * Tab icon font-size. Used for configuring the size of font icons\r | |
78 | *\r | |
79 | * @param {number} $icon-font-size-big\r | |
80 | * Tab icon font-size in the {@link Global_CSS#$enable-big big} sizing scheme\r | |
81 | *\r | |
82 | * @param {number} $icon-horizontal-spacing\r | |
83 | * The space between the button icon and text when the icon is horizontally aligned\r | |
84 | *\r | |
85 | * @param {number} $icon-horizontal-spacing-big\r | |
86 | * The space between the button icon and text when the icon is horizontally aligned\r | |
87 | * in the {@link Global_CSS#$enable-big big} sizing scheme\r | |
88 | *\r | |
89 | * @param {number} $icon-vertical-spacing\r | |
90 | * The space between the button icon and text when the icon is vertically aligned\r | |
91 | *\r | |
92 | * @param {number} $icon-vertical-spacing-big\r | |
93 | * The space between the button icon and text when the icon is vertically aligned\r | |
94 | * in the {@link Global_CSS#$enable-big big} sizing scheme\r | |
95 | *\r | |
96 | * @param {number} $disabled-opacity\r | |
97 | * Tab opacity when disabled\r | |
98 | * @param {color} $badge-background-color\r | |
99 | * The background-color of the button's {@link #badgeText badge}\r | |
100 | *\r | |
101 | * @param {string/list} $badge-background-gradient\r | |
102 | * The background-gradient of the button's {@link #badgeText badge} Can be either the name\r | |
103 | * of a gradient defined by {@link Global_CSS#background-gradient} or a list of color stops.\r | |
104 | *\r | |
105 | * @param {color} $badge-color\r | |
106 | * The text color of the button's {@link #badgeText badge}\r | |
107 | *\r | |
108 | * @param {color} $badge-border-color\r | |
109 | * The border-color of the button's {@link #badgeText badge}\r | |
110 | *\r | |
111 | * @param {number/list} $badge-border-radius\r | |
112 | * The border-radius of the button's {@link #badgeText badge}\r | |
113 | *\r | |
114 | * @param {number} $badge-min-width\r | |
115 | * The min-width of the button's {@link #badgeText badge}\r | |
116 | *\r | |
117 | * @param {number} $badge-max-width\r | |
118 | * The max-width of the button's {@link #badgeText badge}\r | |
119 | *\r | |
120 | * @param {number} $badge-font-weight\r | |
121 | * The font-weight of the button's {@link #badgeText badge}\r | |
122 | *\r | |
123 | * @param {number} $badge-font-size\r | |
124 | * The font-size of the button's {@link #badgeText badge}\r | |
125 | *\r | |
126 | * @param {string} $badge-font-family\r | |
127 | * The font-family of the button's {@link #badgeText badge}\r | |
128 | *\r | |
129 | * @param {number} $badge-line-height\r | |
130 | * The line-height of the button's {@link #badgeText badge}\r | |
131 | *\r | |
132 | * @param {number} $badge-top\r | |
133 | * Offset of the {@link #badgeText badge} from the top of the button\r | |
134 | *\r | |
135 | * @param {number} $badge-right\r | |
136 | * Offset of the {@link #badgeText badge} from the right of the button\r | |
137 | *\r | |
138 | * @param {number} $badge-bottom\r | |
139 | * Offset of the {@link #badgeText badge} from the bottom of the button\r | |
140 | *\r | |
141 | * @param {number} $badge-left\r | |
142 | * Offset of the {@link #badgeText badge} from the left of the button\r | |
143 | *\r | |
144 | * @param {number} $badge-padding\r | |
145 | * The padding of the button's {@link #badgeText badge}\r | |
146 | *\r | |
147 | * @member Ext.tab.Tab\r | |
148 | */\r | |
149 | @mixin tab-ui(\r | |
150 | $ui: null,\r | |
151 | \r | |
152 | $background-color: null,\r | |
153 | $active-background-color: null,\r | |
154 | \r | |
155 | $background-gradient: null,\r | |
156 | $active-background-gradient: null,\r | |
157 | \r | |
158 | $color: null,\r | |
159 | $active-color: null,\r | |
160 | \r | |
161 | $border-color: null,\r | |
162 | $active-border-color: null,\r | |
163 | \r | |
164 | $border-width: null,\r | |
165 | $border-style: null,\r | |
166 | \r | |
167 | $border-radius: null,\r | |
168 | $border-radius-big: null,\r | |
169 | \r | |
170 | $font-weight: null,\r | |
171 | $font-size: null,\r | |
172 | $font-size-big: null,\r | |
173 | $line-height: null,\r | |
174 | $line-height-big: null,\r | |
175 | $font-family: null,\r | |
176 | \r | |
177 | $padding: null,\r | |
178 | $padding-big: null,\r | |
179 | \r | |
180 | $icon-size: null,\r | |
181 | $icon-size-big: null,\r | |
182 | $icon-font-size: null,\r | |
183 | $icon-font-size-big: null,\r | |
184 | $icon-horizontal-spacing: null,\r | |
185 | $icon-horizontal-spacing-big: null,\r | |
186 | $icon-vertical-spacing: null,\r | |
187 | $icon-vertical-spacing-big: null,\r | |
188 | \r | |
189 | $disabled-opacity: null,\r | |
190 | \r | |
191 | $badge-background-color: null,\r | |
192 | $badge-background-gradient: null,\r | |
193 | $badge-color: null,\r | |
194 | $badge-border-color: null,\r | |
195 | $badge-border-radius: null,\r | |
196 | $badge-min-width: null,\r | |
197 | $badge-max-width: null,\r | |
198 | $badge-font-weight: null,\r | |
199 | $badge-font-size: null,\r | |
200 | $badge-font-family: null,\r | |
201 | $badge-line-height: null,\r | |
202 | $badge-top: null,\r | |
203 | $badge-right: null,\r | |
204 | $badge-bottom: null,\r | |
205 | $badge-left: null,\r | |
206 | $badge-padding: null\r | |
207 | ) {\r | |
208 | $ui-suffix: ui-suffix($ui);\r | |
209 | \r | |
210 | .x-tab#{$ui-suffix} {\r | |
211 | color: $color;\r | |
212 | padding: $padding;\r | |
213 | @include font($font-weight, $font-size, $line-height, $font-family);\r | |
214 | @include border($border-width, $border-style, $border-color);\r | |
215 | \r | |
216 | @if $include-border-radius {\r | |
217 | @include border-radius($border-radius);\r | |
218 | }\r | |
219 | \r | |
220 | @if $enable-big {\r | |
221 | .x-big & {\r | |
222 | @if $padding-big != $padding {\r | |
223 | padding: $padding-big;\r | |
224 | }\r | |
225 | @if $font-size-big != $font-size {\r | |
226 | font-size: $font-size-big;\r | |
227 | }\r | |
228 | @if $line-height-big != $line-height {\r | |
229 | line-height: $line-height-big;\r | |
230 | }\r | |
231 | @if $include-border-radius and ($border-radius-big != $border-radius) {\r | |
232 | @include border-radius($border-radius-big);\r | |
233 | }\r | |
234 | }\r | |
235 | }\r | |
236 | \r | |
237 | @include background-gradient($background-color, $background-gradient);\r | |
238 | \r | |
239 | &.x-tab-active {\r | |
240 | color: $active-color;\r | |
241 | @include background-gradient($active-background-color, $active-background-gradient);\r | |
242 | border-color: $active-border-color;\r | |
243 | }\r | |
244 | \r | |
245 | .x-button-icon {\r | |
246 | width: $icon-size;\r | |
247 | height: $icon-size;\r | |
248 | line-height: $icon-size;\r | |
249 | font-size: $icon-font-size;\r | |
250 | \r | |
251 | @if $enable-big {\r | |
252 | .x-big & {\r | |
253 | @if $icon-size-big != $icon-size {\r | |
254 | width: $icon-size-big;\r | |
255 | height: $icon-size-big;\r | |
256 | line-height: $icon-size-big;\r | |
257 | }\r | |
258 | @if $icon-font-size-big != $icon-font-size {\r | |
259 | font-size: $icon-font-size-big;\r | |
260 | }\r | |
261 | }\r | |
262 | }\r | |
263 | }\r | |
264 | \r | |
265 | &.x-iconalign-left .x-button-icon {\r | |
266 | margin-right: $icon-horizontal-spacing;\r | |
267 | \r | |
268 | @if $enable-big and $icon-horizontal-spacing-big != $icon-horizontal-spacing {\r | |
269 | .x-big & {\r | |
270 | margin-right: $icon-horizontal-spacing-big;\r | |
271 | }\r | |
272 | }\r | |
273 | }\r | |
274 | \r | |
275 | &.x-iconalign-right .x-button-icon {\r | |
276 | margin-left: $icon-horizontal-spacing;\r | |
277 | \r | |
278 | @if $enable-big and $icon-horizontal-spacing-big != $icon-horizontal-spacing {\r | |
279 | .x-big & {\r | |
280 | margin-left: $icon-horizontal-spacing-big;\r | |
281 | }\r | |
282 | }\r | |
283 | }\r | |
284 | \r | |
285 | &.x-iconalign-top .x-button-icon {\r | |
286 | margin-bottom: $icon-vertical-spacing;\r | |
287 | \r | |
288 | @if $enable-big and $icon-vertical-spacing-big != $icon-vertical-spacing {\r | |
289 | .x-big & {\r | |
290 | margin-bottom: $icon-vertical-spacing-big;\r | |
291 | }\r | |
292 | }\r | |
293 | }\r | |
294 | \r | |
295 | &.x-iconalign-bottom .x-button-icon {\r | |
296 | margin-top: $icon-vertical-spacing;\r | |
297 | \r | |
298 | @if $enable-big and $icon-vertical-spacing-big != $icon-vertical-spacing {\r | |
299 | .x-big & {\r | |
300 | margin-top: $icon-vertical-spacing-big;\r | |
301 | }\r | |
302 | }\r | |
303 | }\r | |
304 | \r | |
305 | .x-button-label {\r | |
306 | // prevents the button height from shrinking when it has no text\r | |
307 | min-height: $line-height;\r | |
308 | }\r | |
309 | \r | |
310 | &.x-item-disabled {\r | |
311 | opacity: $disabled-opacity;\r | |
312 | }\r | |
313 | \r | |
314 | .x-badge {\r | |
315 | border-color: $badge-border-color;\r | |
316 | min-width: $badge-min-width;\r | |
317 | \r | |
318 | @include font($badge-font-weight, $badge-font-size, $badge-line-height, $badge-font-family);\r | |
319 | \r | |
320 | top: $badge-top;\r | |
321 | right: $badge-right;\r | |
322 | bottom: $badge-bottom;\r | |
323 | left: $badge-left;\r | |
324 | padding: $badge-padding;\r | |
325 | max-width: $badge-max-width;\r | |
326 | color: $badge-color;\r | |
327 | \r | |
328 | @include background-gradient($badge-background-color, $badge-background-gradient);\r | |
329 | \r | |
330 | @if $include-border-radius {\r | |
331 | @include border-radius($badge-border-radius);\r | |
332 | }\r | |
333 | }\r | |
334 | }\r | |
335 | }\r | |
336 | \r | |
337 | @include tab-ui(\r | |
338 | $background-color: $tab-background-color,\r | |
339 | $active-background-color: $tab-active-background-color,\r | |
340 | \r | |
341 | $background-gradient: $tab-background-gradient,\r | |
342 | $active-background-gradient: $tab-active-background-gradient,\r | |
343 | \r | |
344 | $color: $tab-color,\r | |
345 | $active-color: $tab-active-color,\r | |
346 | \r | |
347 | $border-color: $tab-border-color,\r | |
348 | $active-border-color: $tab-active-border-color,\r | |
349 | \r | |
350 | \r | |
351 | $border-style: $tab-border-style,\r | |
352 | $border-width: $tab-border-width,\r | |
353 | \r | |
354 | $border-radius: $tab-border-radius,\r | |
355 | $border-radius-big: $tab-border-radius-big,\r | |
356 | \r | |
357 | $font-weight: $tab-font-weight,\r | |
358 | $font-size: $tab-font-size,\r | |
359 | $font-size-big: $tab-font-size-big,\r | |
360 | $line-height: $tab-line-height,\r | |
361 | $line-height-big: $tab-line-height-big,\r | |
362 | $font-family: $tab-font-family,\r | |
363 | \r | |
364 | $padding: $tab-padding,\r | |
365 | $padding-big: $tab-padding-big,\r | |
366 | \r | |
367 | $icon-size: $tab-icon-size,\r | |
368 | $icon-size-big: $tab-icon-size-big,\r | |
369 | $icon-font-size: $tab-icon-font-size,\r | |
370 | $icon-font-size-big: $tab-icon-font-size-big,\r | |
371 | $icon-horizontal-spacing: $tab-icon-horizontal-spacing,\r | |
372 | $icon-horizontal-spacing-big: $tab-icon-horizontal-spacing-big,\r | |
373 | $icon-vertical-spacing: $tab-icon-vertical-spacing,\r | |
374 | $icon-vertical-spacing-big: $tab-icon-vertical-spacing-big,\r | |
375 | \r | |
376 | $disabled-opacity: $button-disabled-opacity,\r | |
377 | \r | |
378 | $badge-background-color: $button-badge-background-color,\r | |
379 | $badge-background-gradient: $button-badge-background-gradient,\r | |
380 | $badge-color: $button-badge-color,\r | |
381 | $badge-border-color: $button-badge-border-color,\r | |
382 | $badge-border-radius: $button-badge-border-radius,\r | |
383 | $badge-min-width: $button-badge-min-width,\r | |
384 | $badge-max-width: $button-badge-max-width,\r | |
385 | $badge-font-weight: $button-badge-font-weight,\r | |
386 | $badge-font-size: $button-badge-font-size,\r | |
387 | $badge-font-family: $button-badge-font-family,\r | |
388 | $badge-line-height: $button-badge-line-height,\r | |
389 | $badge-top: $button-badge-top,\r | |
390 | $badge-right: $button-badge-right,\r | |
391 | $badge-bottom: $button-badge-bottom,\r | |
392 | $badge-left: $button-badge-left,\r | |
393 | $badge-padding: $button-badge-padding\r | |
394 | ); |