menu.css 8.52 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
/* Menu & MenuBar styles */

.yuimenu {

    top: -999em;
    left: -999em;

}

.yuimenubar {

    position: static;

}

.yuimenu .yuimenu,
.yuimenubar .yuimenu {

    position: absolute;

}

.yuimenubar li, 
.yuimenu li {

    list-style-type: none;    

}

.yuimenubar ul, 
.yuimenu ul,
.yuimenubar li, 
.yuimenu li,
.yuimenu h6,
.yuimenubar h6 { 

    margin: 0;
    padding: 0;

}

.yuimenuitemlabel,
.yuimenubaritemlabel {

    text-align: left;
    white-space: nowrap;

}


/* 
    The following style rule trigger the "hasLayout" property in 
    IE (http://msdn2.microsoft.com/en-us/library/ms533776.aspx) for a
    MenuBar instance's <ul> element, allowing both to clear their floated 
    child <li> elements.
*/

.yuimenubar ul {

    *zoom: 1;

}


/* 
    Remove the "hasLayout" trigger for submenus of MenuBar instances as it 
    is unnecessary. 
*/

.yuimenubar .yuimenu ul {

    *zoom: normal;

}

/*
    The following style rule allows a MenuBar instance's <ul> element to clear
    its floated <li> elements in Firefox, Safari and and Opera.
*/

.yuimenubar>.bd>ul:after {

    content: ".";
    display: block;
    clear: both;
    visibility: hidden;
    height: 0;
    line-height: 0;

}

.yuimenubaritem {

    float: left;

}

.yuimenubaritemlabel,
.yuimenuitemlabel {

    display: block;

}

.yuimenuitemlabel .helptext {

    font-style: normal;
    display: block;
    
    /*
        The value for the left margin controls how much the help text is
        offset from the text of the menu item.  This value will need to 
        be customized depending on the longest text label of a menu item.
    */
    
    margin: -1em 0 0 10em;
    
}

/*
    PLEASE NOTE: The <div> element used for a menu's shadow is appended 
    to its root element via JavaScript once it has been rendered.  The 
    code that creates the shadow lives in the menu's public "onRender" 
    event handler that is a prototype method of YAHOO.widget.Menu.  
    Implementers wishing to remove a menu's shadow or add any other markup
    required for a given skin for menu should override the "onRender" method.
*/

.yui-menu-shadow {

    position: absolute;
    visibility: hidden;
    z-index: -1;

}

.yui-menu-shadow-visible {

    top: 2px;
    right: -3px;
    left: -3px;
    bottom: -3px;
    visibility: visible;

}


/*

There are two known issues with YAHOO.widget.Overlay (the superclass class of 
Menu) that manifest in Gecko-based browsers on Mac OS X:

    1) Elements with scrollbars will poke through Overlay instances floating 
       above them.
    
    2) An Overlay's scrollbars and the scrollbars of its child nodes remain  
       visible when the Overlay is hidden.

To fix these bugs in Menu (a subclass of YAHOO.widget.Overlay):

    1) The "overflow" property of a Menu instance's shadow element and child 
       nodes is toggled between "hidden" and "auto" (through the application  
       and removal of the "hide-scrollbars" and "show-scrollbars" CSS classes)
       as its "visibility" configuration property is toggled between 
       "false" and "true."
    
    2) The "display" property of <select> elements that are child nodes of the 
       Menu instance's root element is set to "none" when it is hidden.

PLEASE NOTE:  
  
    1) The "hide-scrollbars" and "show-scrollbars" CSS classes classes are 
       applied only for Gecko on Mac OS X and are added/removed to/from the 
       Overlay's root HTML element (DIV) via the "hideMacGeckoScrollbars" and 
       "showMacGeckoScrollbars" methods of YAHOO.widget.Overlay.
    
    2) There may be instances where the CSS for a web page or application 
       contains style rules whose specificity override the rules implemented by 
       the Menu CSS files to fix this bug.  In such cases, is necessary to 
       leverage the provided "hide-scrollbars" and "show-scrollbars" classes to 
       write custom style rules to guard against this bug.

** For more information on this issue, see:

   + https://bugzilla.mozilla.org/show_bug.cgi?id=187435
   + YUILibrary bug #1723530

*/

.hide-scrollbars * {

	overflow: hidden;

}

.hide-scrollbars select {

	display: none;

}


/*

The following style rule (".yuimenu.show-scrollbars") overrides the 
".show-scrollbars" rule defined in container-core.css which sets the 
"overflow" property of a YAHOO.widget.Overlay instance's root HTML element to 
"auto" when it is visible.  Without this override, a Menu would have scrollbars
when one of its submenus is visible.

*/

.yuimenu.show-scrollbars,
.yuimenubar.show-scrollbars {

	overflow: visible; 

}

.yuimenu.hide-scrollbars .yui-menu-shadow,
.yuimenubar.hide-scrollbars .yui-menu-shadow {

    overflow: hidden;

}

.yuimenu.show-scrollbars .yui-menu-shadow,
.yuimenubar.show-scrollbars .yui-menu-shadow {

    overflow: auto;

}


/* MenuBar style rules */

.yuimenubar {

    background-color: #f6f7ee;
    
}



/* Menu style rules */

.yuimenu {

    background-color: #f6f7ee;
    border: solid 1px #c4c4be;
    padding: 1px;
    
}

.yui-menu-shadow {

    display: none;

}

.yuimenu ul {

    border: solid 1px #c4c4be;
    border-width: 1px 0 0 0;
    padding: 10px 0;

}

.yuimenu .yui-menu-body-scrolled {

    overflow: hidden;

}


/* Group titles */

.yuimenu h6,
.yuimenubar h6 { 

    font-size: 100%;
    font-weight: normal;
    border: solid 1px #c4c4be;
    color: #b9b9b9;    

}

.yuimenubar h6 {

    float: left;
    padding: 4px 12px;
    border-width: 0 1px 0 0;

}

.yuimenubar .yuimenu h6 {

    float: none;

}

.yuimenu h6 {

    border-width: 1px 0 0 0;
    padding: 5px 10px 0 10px;

}

.yuimenu ul.first-of-type, 
.yuimenu ul.hastitle,
.yuimenu h6.first-of-type {

    border-width: 0;

}



/* Top and bottom scroll controls */

.yuimenu .topscrollbar,
.yuimenu .bottomscrollbar {

    height: 16px;
    background-position: center center;
    background-repeat: no-repeat;

}

.yuimenu .topscrollbar {

    background-image: url(menu_up_arrow.png);

}

.yuimenu .topscrollbar_disabled {

    background-image: url(menu_up_arrow_disabled.png);

}

.yuimenu .bottomscrollbar {

    background-image: url(menu_down_arrow.png);

}

.yuimenu .bottomscrollbar_disabled {

    background-image: url(menu_down_arrow_disabled.png);

}


/* MenuItem and MenuBarItem styles */

.yuimenuitem {

    /*
        For IE: Used to collapse superfluous white space between <li> elements
        that is triggered by the "display" property of the <a> elements being
        set to "block."
    */

    *border-bottom: solid 1px #f6f7ee;

}

.yuimenuitemlabel,
.yuimenuitemlabel:visited,
.yuimenubaritemlabel,
.yuimenubaritemlabel:visited {

    font-size: 85%;
    color: #000;
    text-decoration: none;

}

.yuimenuitemlabel {

    padding: 2px 24px;
    
}

.yuimenubaritemlabel {

    border-width: 0 0 0 1px;
    border-style: solid;
    border-color: #c4c4be;
    padding: 4px 24px;

}

.yuimenubar li.first-of-type .yuimenubaritemlabel {

    border-width: 0;

}

.yuimenubaritem-hassubmenu {

    background: url(menubaritem_submenuindicator.png) right center no-repeat;

}

.yuimenuitem-hassubmenu {

    background: url(menuitem_submenuindicator.png) right center no-repeat;

}

.yuimenuitem-checked {

    background: url(menuitem_checkbox.png) left center no-repeat;

}

.yuimenuitemlabel .helptext {

    margin-top: -1.1em;
    *margin-top: -1.2em;  /* For IE*/
    
}



/* MenuItem states */


/* Selected MenuItem */

.yuimenubaritem-selected,
.yuimenuitem-selected {

    background-color: #8c8ad0;

}

.yuimenubaritemlabel-selected,
.yuimenubaritemlabel-selected:visited,
.yuimenuitemlabel-selected,
.yuimenuitemlabel-selected:visited {

    text-decoration: underline;
    color: #fff;

}

.yuimenubaritem-hassubmenu-selected {

    background-image: url(menubaritem_submenuindicator_selected.png);

}

.yuimenuitem-hassubmenu-selected {

    background-image: url(menuitem_submenuindicator_selected.png);

}

.yuimenuitem-checked-selected {

    background-image: url(menuitem_checkbox_selected.png);

}


/* Disabled MenuItem */

.yuimenubaritemlabel-disabled,
.yuimenubaritemlabel-disabled:visited,
.yuimenuitemlabel-disabled,
.yuimenuitemlabel-disabled:visited {

    cursor: default;
    color: #b9b9b9;

}

.yuimenubaritem-hassubmenu-disabled {

    background-image: url(menubaritem_submenuindicator_disabled.png);

}

.yuimenuitem-hassubmenu-disabled {

    background-image: url(menuitem_submenuindicator_disabled.png);

}

.yuimenuitem-checked-disabled {

    background-image: url(menuitem_checkbox_disabled.png);

}