Mercurial > kallithea
comparison pylons_app/public/js/yui/menu/assets/menu-core.css @ 0:564e40829f80
initial commit.
author | Marcin Kuzminski |
---|---|
date | Thu, 18 Feb 2010 13:01:57 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:564e40829f80 |
---|---|
1 /* | |
2 Copyright (c) 2009, Yahoo! Inc. All rights reserved. | |
3 Code licensed under the BSD License: | |
4 http://developer.yahoo.net/yui/license.txt | |
5 version: 2.8.0r4 | |
6 */ | |
7 /* Menu & MenuBar styles */ | |
8 | |
9 .yuimenu { | |
10 | |
11 top: -999em; | |
12 left: -999em; | |
13 | |
14 } | |
15 | |
16 .yuimenubar { | |
17 | |
18 position: static; | |
19 | |
20 } | |
21 | |
22 .yuimenu .yuimenu, | |
23 .yuimenubar .yuimenu { | |
24 | |
25 position: absolute; | |
26 | |
27 } | |
28 | |
29 .yuimenubar li, | |
30 .yuimenu li { | |
31 | |
32 list-style-type: none; | |
33 | |
34 } | |
35 | |
36 .yuimenubar ul, | |
37 .yuimenu ul, | |
38 .yuimenubar li, | |
39 .yuimenu li, | |
40 .yuimenu h6, | |
41 .yuimenubar h6 { | |
42 | |
43 margin: 0; | |
44 padding: 0; | |
45 | |
46 } | |
47 | |
48 .yuimenuitemlabel, | |
49 .yuimenubaritemlabel { | |
50 | |
51 text-align: left; | |
52 white-space: nowrap; | |
53 | |
54 } | |
55 | |
56 | |
57 /* | |
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 | |
61 child <li> elements. | |
62 */ | |
63 | |
64 .yuimenubar ul { | |
65 | |
66 *zoom: 1; | |
67 | |
68 } | |
69 | |
70 | |
71 /* | |
72 Remove the "hasLayout" trigger for submenus of MenuBar instances as it | |
73 is unnecessary. | |
74 */ | |
75 | |
76 .yuimenubar .yuimenu ul { | |
77 | |
78 *zoom: normal; | |
79 | |
80 } | |
81 | |
82 /* | |
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. | |
85 */ | |
86 | |
87 .yuimenubar>.bd>ul:after { | |
88 | |
89 content: "."; | |
90 display: block; | |
91 clear: both; | |
92 visibility: hidden; | |
93 height: 0; | |
94 line-height: 0; | |
95 | |
96 } | |
97 | |
98 .yuimenubaritem { | |
99 | |
100 float: left; | |
101 | |
102 } | |
103 | |
104 .yuimenubaritemlabel, | |
105 .yuimenuitemlabel { | |
106 | |
107 display: block; | |
108 | |
109 } | |
110 | |
111 .yuimenuitemlabel .helptext { | |
112 | |
113 font-style: normal; | |
114 display: block; | |
115 | |
116 /* | |
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. | |
120 */ | |
121 | |
122 margin: -1em 0 0 10em; | |
123 | |
124 } | |
125 | |
126 /* | |
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. | |
133 */ | |
134 | |
135 .yui-menu-shadow { | |
136 | |
137 position: absolute; | |
138 visibility: hidden; | |
139 z-index: -1; | |
140 | |
141 } | |
142 | |
143 .yui-menu-shadow-visible { | |
144 | |
145 top: 2px; | |
146 right: -3px; | |
147 left: -3px; | |
148 bottom: -3px; | |
149 visibility: visible; | |
150 | |
151 } | |
152 | |
153 | |
154 /* | |
155 | |
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: | |
158 | |
159 1) Elements with scrollbars will poke through Overlay instances floating | |
160 above them. | |
161 | |
162 2) An Overlay's scrollbars and the scrollbars of its child nodes remain | |
163 visible when the Overlay is hidden. | |
164 | |
165 To fix these bugs in Menu (a subclass of YAHOO.widget.Overlay): | |
166 | |
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 | |
171 "false" and "true." | |
172 | |
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. | |
175 | |
176 PLEASE NOTE: | |
177 | |
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. | |
182 | |
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. | |
188 | |
189 ** For more information on this issue, see: | |
190 | |
191 + https://bugzilla.mozilla.org/show_bug.cgi?id=187435 | |
192 + YUILibrary bug #1723530 | |
193 | |
194 */ | |
195 | |
196 .hide-scrollbars * { | |
197 | |
198 overflow: hidden; | |
199 | |
200 } | |
201 | |
202 .hide-scrollbars select { | |
203 | |
204 display: none; | |
205 | |
206 } | |
207 | |
208 | |
209 /* | |
210 | |
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. | |
216 | |
217 */ | |
218 | |
219 .yuimenu.show-scrollbars, | |
220 .yuimenubar.show-scrollbars { | |
221 | |
222 overflow: visible; | |
223 | |
224 } | |
225 | |
226 .yuimenu.hide-scrollbars .yui-menu-shadow, | |
227 .yuimenubar.hide-scrollbars .yui-menu-shadow { | |
228 | |
229 overflow: hidden; | |
230 | |
231 } | |
232 | |
233 .yuimenu.show-scrollbars .yui-menu-shadow, | |
234 .yuimenubar.show-scrollbars .yui-menu-shadow { | |
235 | |
236 overflow: auto; | |
237 | |
238 } | |
239 | |
240 .yui-overlay.yui-force-redraw { | |
241 margin-bottom: 1px; | |
242 } |