Menu.less 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. /* Menu
  2. There are three areas of styling for the Menu:
  3. 1. The menu
  4. There are three types of menus:
  5. i)Context Menu
  6. ii)Drop down Menu
  7. iii) Navigation Menu
  8. All three types of menus are affected by the .dijitMenu class in which you can set the background-color, padding and border
  9. .dijitMenu affects the drop down menu in TimeTextBox, Calendar, ComboBox and FilteringSelect
  10. .dijitMenuTable - for padding - also affects Select widget
  11. 2. The menu bar
  12. .dijitMenuBar - for border, margins, padding, background-color of the menu bar
  13. .dijitMenuBar .dijitMenuItem - for padding, text color of menu items in the menu bar (overrides .dijitMenuItem)
  14. 3. Menu items - items in the menu.
  15. .dijitMenuItem - for color
  16. .dijitMenuItemHover, .dijitMenuItemSelected - for background-color, border, text color, padding of a menu item or menubar item that has been hovered over or selected
  17. .dijitMenuItemActive - for bacgkround-color of an active (mousedown) menu item
  18. td.dijitMenuItemIconCell - for padding around a menu item's icon
  19. td.dijitMenuItemLabel - for padding around a menu item's label
  20. .dijitMenuSeparatorTop - for border, top border, of the separator
  21. .dijitMenuSeparatorBottom - for bottom margin of the separator
  22. Styles specific to ComboBox and FilteringSelect widgets:
  23. .dijitComboBoxMenu .dijitMenuItem - for padding and border of a menu item in a ComboBox or FilteringSelect widget's menu
  24. .dijitComboBoxMenu .dijitMenuItemSelected- for text color, background-color and border of a menu item in a ComboBox or FilteringSelect widget's menu
  25. */
  26. @import "variables";
  27. .claro .dijitMenuBar {
  28. border: 1px solid @border-color;
  29. margin: 0;
  30. padding: 0;
  31. background-color: @bar-background-color;
  32. background-image: url("images/commonHighlight.png");
  33. background-position:0 0;
  34. background-repeat:repeat-x;
  35. }
  36. .dj_ie6 .claro .dijitMenuBar {
  37. background-image:none;
  38. }
  39. .claro .dijitMenu {
  40. background-repeat:repeat-y;
  41. background-color:@menu-background-color;
  42. border: 1px solid @popup-border-color;
  43. /* so adjoining borders of MenuBar/ComboBox and Menu overlap, avoiding double border */
  44. margin: -1px 0;
  45. }
  46. .dj_ie6 .claro .dijitMenu {
  47. margin: 0; /* above -1px makes top/bottom borders disappear on IE6 */
  48. }
  49. .claro .dijitMenuBar .dijitMenuItem {
  50. padding: 6px 10px 7px;
  51. background-position:0 100px;
  52. color:@unselected-text-color;
  53. margin:-1px;
  54. }
  55. .claro .dijitMenuItem {
  56. background-image: url("images/menuHighlight.png");
  57. background-position:0 -40px;
  58. background-repeat:repeat-x;
  59. }
  60. /* this prevents jiggling upon hover of a menu item */
  61. .claro .dijitMenuTable {
  62. border-collapse:separate;
  63. border-spacing:0 0;
  64. padding:0;
  65. }
  66. .claro .dijitMenuItem td{
  67. padding:1px;
  68. }
  69. /* hover over a MenuBarItem */
  70. .claro .dijitMenuPassive .dijitMenuItemHover,
  71. .claro .dijitMenuPassive .dijitMenuItemSelected {
  72. background-color: @hovered-background-color;
  73. border:solid 1px @hovered-border-color;
  74. background-position:0 0;
  75. color:@text-color;
  76. padding: 5px 9px 6px;
  77. }
  78. .claro .dijitMenuPassive .dijitMenuItemActive{
  79. background-position:0 -177px;
  80. }
  81. .dj_ie6 .claro .dijitMenuItem,
  82. .dj_ie6 .claro .dijitMenuPassive .dijitMenuItem {
  83. background-image: none;
  84. }
  85. /* MenuBarItem that has been selected and menu drops down from it */
  86. .claro .dijitMenuActive .dijitMenuItemHover,
  87. .claro .dijitMenuActive .dijitMenuItemSelected {
  88. border:solid 1px @hovered-border-color;
  89. padding: 5px 9px 6px;
  90. background-color: @hovered-background-color;
  91. background-position:0 0;
  92. color:@hovered-text-color;
  93. }
  94. .dj_ie .claro .dijitMenuActive .dijitMenuItemHover,
  95. .dj_ie .claro .dijitMenuActive .dijitMenuItemSelected,
  96. .dj_ie .claro .dijitMenuPassive .dijitMenuItemHover,
  97. .dj_ie .claro .dijitMenuPassive .dijitMenuItemSelected {
  98. padding-top: 6px;
  99. padding-bottom: 5px;
  100. margin-top: -3px;
  101. }
  102. .claro .dijitMenuActive .dijitMenuItemActive{
  103. background-color: @pressed-background-color;
  104. background-position:0 -177px;
  105. }
  106. .claro .dijitMenuItemActive {
  107. background-position:0 -177px;
  108. }
  109. .claro td.dijitMenuItemIconCell {
  110. padding: 2px;
  111. margin: 0 0 0 4px;
  112. }
  113. .claro td.dijitMenuItemLabel {
  114. padding-top: 5px;
  115. padding-bottom: 5px;
  116. }
  117. .claro .dijitMenuExpand {
  118. width: 7px;
  119. height: 7px;
  120. background-image: url('images/spriteArrows.png');
  121. background-position: -14px 0;
  122. margin-right:3px;
  123. }
  124. .claro .dijitMenuItemDisabled .dijitMenuItemIconCell {
  125. opacity:1;
  126. }
  127. .claro .dijitMenuSeparatorTop {
  128. height: auto;
  129. margin-top:1px; /* prevents spacing above/below separator */
  130. border-bottom: 1px solid @border-color
  131. }
  132. .claro .dijitMenuSeparatorBottom{
  133. height: auto;
  134. margin-bottom:1px;
  135. }
  136. /* the checked menu item */
  137. .claro .dijitCheckedMenuItemIconChar {
  138. display: none;
  139. }
  140. .claro .dijitCheckedMenuItemIcon {
  141. background-image: url('form/images/checkboxRadioButtonStates.png');
  142. background-repeat:no-repeat;
  143. background-position: -15px 50%;
  144. width:15px;
  145. height:16px;
  146. }
  147. .dj_ie6 .claro .dijitCheckedMenuItemIcon {
  148. background-image: url('form/images/checkboxAndRadioButtons_IE6.png');
  149. }
  150. .claro .dijitCheckedMenuItemChecked .dijitCheckedMenuItemIcon {
  151. background-position: 0 50%;
  152. }
  153. /*ComboBox Menu*/
  154. .claro .dijitComboBoxMenu {
  155. margin-left:0;
  156. background-image: none;
  157. }
  158. .claro .dijitComboBoxMenu .dijitMenuItem {
  159. padding: @textbox-padding; // Make drop down menu text line up with text in <input>.
  160. border-width:1px 0 1px 0;
  161. border-style:solid;
  162. border-color: @select-dropdownitem-background-color;
  163. }
  164. .claro .dijitComboBoxMenu .dijitMenuItemSelected {
  165. color:@selected-text-color;
  166. border-color:@hovered-border-color;
  167. background-color:@hovered-background-color;
  168. }
  169. .claro .dijitComboBoxMenuActive .dijitMenuItemSelected {
  170. background-position:0 -177px;
  171. background-color: @select-dropdownitem-hovered-background-color; /* TODO: why is this a different color than normal .dijitMenuItemSelected? */
  172. }
  173. .claro .dijitMenuPreviousButton, .claro .dijitMenuNextButton {
  174. font-style: italic;
  175. }