PageRenderTime 15ms CodeModel.GetById 2ms app.highlight 9ms RepoModel.GetById 2ms app.codeStats 0ms

/hudson-war/src/main/webapp/scripts/yui/menu/assets/menu.css

http://github.com/hudson/hudson
CSS | 494 lines | 212 code | 185 blank | 97 comment | 0 complexity | 51d1bd1ddd6f28cec0bdffa83a84409f MD5 | raw file
  1/*
  2Copyright (c) 2008, Yahoo! Inc. All rights reserved.
  3Code licensed under the BSD License:
  4http://developer.yahoo.net/yui/license.txt
  5version: 2.5.1
  6*/
  7/* Menu & MenuBar styles */
  8
  9.yuimenubar {
 10
 11    visibility: visible;
 12    position: static;
 13
 14}
 15
 16.yuimenu .yuimenu,
 17.yuimenubar .yuimenu {
 18
 19    visibility: hidden;
 20    position: absolute;
 21    top: -10000px;
 22    left: -10000px;
 23
 24}
 25
 26.yuimenubar li, 
 27.yuimenu li {
 28
 29    list-style-type: none;    
 30
 31}
 32
 33.yuimenubar ul, 
 34.yuimenu ul,
 35.yuimenubar li, 
 36.yuimenu li,
 37.yuimenu h6,
 38.yuimenubar h6 { 
 39
 40    margin: 0;
 41    padding: 0;
 42
 43}
 44
 45.yuimenuitemlabel,
 46.yuimenubaritemlabel {
 47
 48    text-align: left;
 49    white-space: nowrap;
 50
 51}
 52
 53
 54/* 
 55    The following style rule trigger the "hasLayout" property in 
 56    IE (http://msdn2.microsoft.com/en-us/library/ms533776.aspx) for a
 57    MenuBar instance's <ul> element, allowing both to clear their floated 
 58    child <li> elements.
 59*/
 60
 61.yuimenubar ul {
 62
 63    *zoom: 1;
 64
 65}
 66
 67
 68/* 
 69    Remove the "hasLayout" trigger for submenus of MenuBar instances as it 
 70    is unnecessary. 
 71*/
 72
 73.yuimenubar .yuimenu ul {
 74
 75    *zoom: normal;
 76
 77}
 78
 79/*
 80    The following style rule allows a MenuBar instance's <ul> element to clear
 81    its floated <li> elements in Firefox, Safari and and Opera.
 82*/
 83
 84.yuimenubar>.bd>ul:after {
 85
 86    content: ".";
 87    display: block;
 88    clear: both;
 89    visibility: hidden;
 90    height: 0;
 91    line-height: 0;
 92
 93}
 94
 95.yuimenubaritem {
 96
 97    float: left;
 98
 99}
100
101.yuimenubaritemlabel,
102.yuimenuitemlabel {
103
104    display: block;
105
106}
107
108.yuimenuitemlabel .helptext {
109
110    font-style: normal;
111    display: block;
112    
113    /*
114        The value for the left margin controls how much the help text is
115        offset from the text of the menu item.  This value will need to 
116        be customized depending on the longest text label of a menu item.
117    */
118    
119    margin: -1em 0 0 10em;
120    
121}
122
123/*
124    PLEASE NOTE: The <div> element used for a menu's shadow is appended 
125    to its root element via JavaScript once it has been rendered.  The 
126    code that creates the shadow lives in the menu's public "onRender" 
127    event handler that is a prototype method of YAHOO.widget.Menu.  
128    Implementers wishing to remove a menu's shadow or add any other markup
129    required for a given skin for menu should override the "onRender" method.
130*/
131
132.yui-menu-shadow {
133
134    position: absolute;
135    visibility: hidden;
136    z-index: -1;
137
138}
139
140.yui-menu-shadow-visible {
141
142    top: 2px;
143    right: -3px;
144    left: -3px;
145    bottom: -3px;
146    visibility: visible;
147
148}
149
150
151/*
152
153There are two known issues with YAHOO.widget.Overlay (the superclass class of 
154Menu) that manifest in Gecko-based browsers on Mac OS X:
155
156    1) Elements with scrollbars will poke through Overlay instances floating 
157       above them.
158    
159    2) An Overlay's scrollbars and the scrollbars of its child nodes remain  
160       visible when the Overlay is hidden.
161
162To fix these bugs in Menu (a subclass of YAHOO.widget.Overlay):
163
164    1) The "overflow" property of a Menu instance's shadow element and child 
165       nodes is toggled between "hidden" and "auto" (through the application  
166       and removal of the "hide-scrollbars" and "show-scrollbars" CSS classes)
167       as its "visibility" configuration property is toggled between 
168       "false" and "true."
169    
170    2) The "display" property of <select> elements that are child nodes of the 
171       Menu instance's root element is set to "none" when it is hidden.
172
173PLEASE NOTE:  
174  
175    1) The "hide-scrollbars" and "show-scrollbars" CSS classes classes are 
176       applied only for Gecko on Mac OS X and are added/removed to/from the 
177       Overlay's root HTML element (DIV) via the "hideMacGeckoScrollbars" and 
178       "showMacGeckoScrollbars" methods of YAHOO.widget.Overlay.
179    
180    2) There may be instances where the CSS for a web page or application 
181       contains style rules whose specificity override the rules implemented by 
182       the Menu CSS files to fix this bug.  In such cases, is necessary to 
183       leverage the provided "hide-scrollbars" and "show-scrollbars" classes to 
184       write custom style rules to guard against this bug.
185
186** For more information on this issue, see:
187
188   + https://bugzilla.mozilla.org/show_bug.cgi?id=187435
189   + SourceForge bug #1723530
190
191*/
192
193.hide-scrollbars * {
194
195	overflow: hidden;
196
197}
198
199.hide-scrollbars select {
200
201	display: none;
202
203}
204
205
206/*
207
208The following style rule (".yuimenu.show-scrollbars") overrides the 
209".show-scrollbars" rule defined in container-core.css which sets the 
210"overflow" property of a YAHOO.widget.Overlay instance's root HTML element to 
211"auto" when it is visible.  Without this override, a Menu would have scrollbars
212when one of its submenus is visible.
213
214*/
215
216.yuimenu.show-scrollbars,
217.yuimenubar.show-scrollbars {
218
219	overflow: visible; 
220
221}
222
223.yuimenu.hide-scrollbars .yui-menu-shadow,
224.yuimenubar.hide-scrollbars .yui-menu-shadow {
225
226    overflow: hidden;
227
228}
229
230.yuimenu.show-scrollbars .yui-menu-shadow,
231.yuimenubar.show-scrollbars .yui-menu-shadow {
232
233    overflow: auto;
234
235}
236
237
238/* MenuBar style rules */
239
240.yuimenubar {
241
242    background-color: #f6f7ee;
243    
244}
245
246
247
248/* Menu style rules */
249
250.yuimenu {
251
252    background-color: #f6f7ee;
253    border: solid 1px #c4c4be;
254    padding: 1px;
255    
256}
257
258.yui-menu-shadow {
259
260    display: none;
261
262}
263
264.yuimenu ul {
265
266    border: solid 1px #c4c4be;
267    border-width: 1px 0 0 0;
268    padding: 10px 0;
269
270}
271
272.yuimenu .yui-menu-body-scrolled {
273
274    overflow: hidden;
275
276}
277
278
279/* Group titles */
280
281.yuimenu h6,
282.yuimenubar h6 { 
283
284    font-size: 100%;
285    font-weight: normal;
286    border: solid 1px #c4c4be;
287    color: #b9b9b9;    
288
289}
290
291.yuimenubar h6 {
292
293    float: left;
294    padding: 4px 12px;
295    border-width: 0 1px 0 0;
296
297}
298
299.yuimenubar .yuimenu h6 {
300
301    float: none;
302
303}
304
305.yuimenu h6 {
306
307    border-width: 1px 0 0 0;
308    padding: 5px 10px 0 10px;
309
310}
311
312.yuimenu ul.first-of-type, 
313.yuimenu ul.hastitle,
314.yuimenu h6.first-of-type {
315
316    border-width: 0;
317
318}
319
320
321
322/* Top and bottom scroll controls */
323
324.yuimenu .topscrollbar,
325.yuimenu .bottomscrollbar {
326
327    height: 16px;
328    background-position: center center;
329    background-repeat: no-repeat;
330
331}
332
333.yuimenu .topscrollbar {
334
335    background-image: url(menu_up_arrow.png);
336
337}
338
339.yuimenu .topscrollbar_disabled {
340
341    background-image: url(menu_up_arrow_disabled.png);
342
343}
344
345.yuimenu .bottomscrollbar {
346
347    background-image: url(menu_down_arrow.png);
348
349}
350
351.yuimenu .bottomscrollbar_disabled {
352
353    background-image: url(menu_down_arrow_disabled.png);
354
355}
356
357
358/* MenuItem and MenuBarItem styles */
359
360.yuimenuitem {
361
362    /*
363        For IE: Used to collapse superfluous white space between <li> elements
364        that is triggered by the "display" property of the <a> elements being
365        set to "block."
366    */
367
368    *border-bottom: solid 1px #f6f7ee;
369
370}
371
372.yuimenuitemlabel,
373.yuimenubaritemlabel {
374
375    font-size: 85%;
376    color: #000;
377    text-decoration: none;
378
379}
380
381.yuimenuitemlabel {
382
383    padding: 2px 24px;
384    
385}
386
387.yuimenubaritemlabel {
388
389    border-width: 0 0 0 1px;
390    border-style: solid;
391    border-color: #c4c4be;
392    padding: 4px 24px;
393
394}
395
396.yuimenubar li.first-of-type .yuimenubaritemlabel {
397
398    border-width: 0;
399
400}
401
402.yuimenubaritem-hassubmenu {
403
404    background: url(menubaritem_submenuindicator.png) right center no-repeat;
405
406}
407
408.yuimenuitem-hassubmenu {
409
410    background: url(menuitem_submenuindicator.png) right center no-repeat;
411
412}
413
414.yuimenuitem-checked {
415
416    background: url(menuitem_checkbox.png) left center no-repeat;
417
418}
419
420.yuimenuitemlabel .helptext {
421
422    margin-top: -1.1em;
423    *margin-top: -1.2em;  /* For IE*/
424    
425}
426
427
428
429/* MenuItem states */
430
431
432/* Selected MenuItem */
433
434.yuimenubaritem-selected,
435.yuimenuitem-selected {
436
437    background-color: #8c8ad0;
438
439}
440
441.yuimenubaritemlabel-selected,
442.yuimenuitemlabel-selected {
443
444    text-decoration: underline;
445    color: #fff;
446
447}
448
449.yuimenubaritem-hassubmenu-selected {
450
451    background-image: url(menubaritem_submenuindicator_selected.png);
452
453}
454
455.yuimenuitem-hassubmenu-selected {
456
457    background-image: url(menuitem_submenuindicator_selected.png);
458
459}
460
461.yuimenuitem-checked-selected {
462
463    background-image: url(menuitem_checkbox_selected.png);
464
465}
466
467
468/* Disabled MenuItem */
469
470.yuimenubaritemlabel-disabled,
471.yuimenuitemlabel-disabled {
472
473    cursor: default;
474    color: #b9b9b9;
475
476}
477
478.yuimenubaritem-hassubmenu-disabled {
479
480    background-image: url(menubaritem_submenuindicator_disabled.png);
481
482}
483
484.yuimenuitem-hassubmenu-disabled {
485
486    background-image: url(menuitem_submenuindicator_disabled.png);
487
488}
489
490.yuimenuitem-checked-disabled {
491
492    background-image: url(menuitem_checkbox_disabled.png);
493
494}