2 Copyright (c) 2011, Yahoo! Inc. All rights reserved.
3 Code licensed under the BSD License:
4 http://developer.yahoo.com/yui/license.html
7 /* Menu & MenuBar styles */
23 .yuimenubar .yuimenu {
32 list-style-type: none;
49 .yuimenubaritemlabel {
58 The following style rule trigger the "hasLayout" property in
59 IE (http://msdn2.microsoft.com/en-us/library/ms533776.aspx) for a
60 MenuBar instance's <ul> element, allowing both to clear their floated
72 Remove the "hasLayout" trigger for submenus of MenuBar instances as it
76 .yuimenubar .yuimenu ul {
83 The following style rule allows a MenuBar instance's <ul> element to clear
84 its floated <li> elements in Firefox, Safari and and Opera.
87 .yuimenubar>.bd>ul:after {
104 .yuimenubaritemlabel,
111 .yuimenuitemlabel .helptext {
117 The value for the left margin controls how much the help text is
118 offset from the text of the menu item. This value will need to
119 be customized depending on the longest text label of a menu item.
122 margin: -1em 0 0 10em;
127 PLEASE NOTE: The <div> element used for a menu's shadow is appended
128 to its root element via JavaScript once it has been rendered. The
129 code that creates the shadow lives in the menu's public "onRender"
130 event handler that is a prototype method of YAHOO.widget.Menu.
131 Implementers wishing to remove a menu's shadow or add any other markup
132 required for a given skin for menu should override the "onRender" method.
143 .yui-menu-shadow-visible {
156 There are two known issues with YAHOO.widget.Overlay (the superclass class of
157 Menu) that manifest in Gecko-based browsers on Mac OS X:
159 1) Elements with scrollbars will poke through Overlay instances floating
162 2) An Overlay's scrollbars and the scrollbars of its child nodes remain
163 visible when the Overlay is hidden.
165 To fix these bugs in Menu (a subclass of YAHOO.widget.Overlay):
167 1) The "overflow" property of a Menu instance's shadow element and child
168 nodes is toggled between "hidden" and "auto" (through the application
169 and removal of the "hide-scrollbars" and "show-scrollbars" CSS classes)
170 as its "visibility" configuration property is toggled between
173 2) The "display" property of <select> elements that are child nodes of the
174 Menu instance's root element is set to "none" when it is hidden.
178 1) The "hide-scrollbars" and "show-scrollbars" CSS classes classes are
179 applied only for Gecko on Mac OS X and are added/removed to/from the
180 Overlay's root HTML element (DIV) via the "hideMacGeckoScrollbars" and
181 "showMacGeckoScrollbars" methods of YAHOO.widget.Overlay.
183 2) There may be instances where the CSS for a web page or application
184 contains style rules whose specificity override the rules implemented by
185 the Menu CSS files to fix this bug. In such cases, is necessary to
186 leverage the provided "hide-scrollbars" and "show-scrollbars" classes to
187 write custom style rules to guard against this bug.
189 ** For more information on this issue, see:
191 + https://bugzilla.mozilla.org/show_bug.cgi?id=187435
192 + YUILibrary bug #1723530
202 .hide-scrollbars select {
211 The following style rule (".yuimenu.show-scrollbars") overrides the
212 ".show-scrollbars" rule defined in container-core.css which sets the
213 "overflow" property of a YAHOO.widget.Overlay instance's root HTML element to
214 "auto" when it is visible. Without this override, a Menu would have scrollbars
215 when one of its submenus is visible.
219 .yuimenu.show-scrollbars,
220 .yuimenubar.show-scrollbars {
226 .yuimenu.hide-scrollbars .yui-menu-shadow,
227 .yuimenubar.hide-scrollbars .yui-menu-shadow {
233 .yuimenu.show-scrollbars .yui-menu-shadow,
234 .yuimenubar.show-scrollbars .yui-menu-shadow {
241 /* MenuBar style rules */
245 background-color: #f6f7ee;
251 /* Menu style rules */
255 background-color: #f6f7ee;
256 border: solid 1px #c4c4be;
269 border: solid 1px #c4c4be;
270 border-width: 1px 0 0 0;
275 .yuimenu .yui-menu-body-scrolled {
289 border: solid 1px #c4c4be;
298 border-width: 0 1px 0 0;
302 .yuimenubar .yuimenu h6 {
310 border-width: 1px 0 0 0;
311 padding: 5px 10px 0 10px;
315 .yuimenu ul.first-of-type,
316 .yuimenu ul.hastitle,
317 .yuimenu h6.first-of-type {
325 /* Top and bottom scroll controls */
327 .yuimenu .topscrollbar,
328 .yuimenu .bottomscrollbar {
331 background-position: center center;
332 background-repeat: no-repeat;
336 .yuimenu .topscrollbar {
338 background-image: url(menu_up_arrow.png);
342 .yuimenu .topscrollbar_disabled {
344 background-image: url(menu_up_arrow_disabled.png);
348 .yuimenu .bottomscrollbar {
350 background-image: url(menu_down_arrow.png);
354 .yuimenu .bottomscrollbar_disabled {
356 background-image: url(menu_down_arrow_disabled.png);
361 /* MenuItem and MenuBarItem styles */
366 For IE: Used to collapse superfluous white space between <li> elements
367 that is triggered by the "display" property of the <a> elements being
371 *border-bottom: solid 1px #f6f7ee;
376 .yuimenuitemlabel:visited,
377 .yuimenubaritemlabel,
378 .yuimenubaritemlabel:visited {
382 text-decoration: none;
392 .yuimenubaritemlabel {
394 border-width: 0 0 0 1px;
396 border-color: #c4c4be;
401 .yuimenubar li.first-of-type .yuimenubaritemlabel {
407 .yuimenubaritem-hassubmenu {
409 background: url(menubaritem_submenuindicator.png) right center no-repeat;
413 .yuimenuitem-hassubmenu {
415 background: url(menuitem_submenuindicator.png) right center no-repeat;
419 .yuimenuitem-checked {
421 background: url(menuitem_checkbox.png) left center no-repeat;
425 .yuimenuitemlabel .helptext {
428 *margin-top: -1.2em; /* For IE*/
434 /* MenuItem states */
437 /* Selected MenuItem */
439 .yuimenubaritem-selected,
440 .yuimenuitem-selected {
442 background-color: #8c8ad0;
446 .yuimenubaritemlabel-selected,
447 .yuimenubaritemlabel-selected:visited,
448 .yuimenuitemlabel-selected,
449 .yuimenuitemlabel-selected:visited {
451 text-decoration: underline;
456 .yuimenubaritem-hassubmenu-selected {
458 background-image: url(menubaritem_submenuindicator_selected.png);
462 .yuimenuitem-hassubmenu-selected {
464 background-image: url(menuitem_submenuindicator_selected.png);
468 .yuimenuitem-checked-selected {
470 background-image: url(menuitem_checkbox_selected.png);
475 /* Disabled MenuItem */
477 .yuimenubaritemlabel-disabled,
478 .yuimenubaritemlabel-disabled:visited,
479 .yuimenuitemlabel-disabled,
480 .yuimenuitemlabel-disabled:visited {
487 .yuimenubaritem-hassubmenu-disabled {
489 background-image: url(menubaritem_submenuindicator_disabled.png);
493 .yuimenuitem-hassubmenu-disabled {
495 background-image: url(menuitem_submenuindicator_disabled.png);
499 .yuimenuitem-checked-disabled {
501 background-image: url(menuitem_checkbox_disabled.png);