2 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
3 Code licensed under the BSD License:
4 http://developer.yahoo.net/yui/license.txt
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 {
240 .yui-overlay.yui-force-redraw {