Menu.less 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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 background-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. .standard-gradient;
  33. }
  34. .claro .dijitMenu {
  35. background-color:@menu-background-color;
  36. border: 1px solid @popup-border-color;
  37. /* so adjoining borders of MenuBar/ComboBox and Menu overlap, avoiding double border */
  38. margin: -1px 0;
  39. }
  40. .dj_ie6 .claro .dijitMenu {
  41. margin: 0; /* above -1px makes top/bottom borders disappear on IE6 */
  42. }
  43. .claro .dijitMenuItem {
  44. color: @text-color;
  45. }
  46. .claro .dijitMenuBar .dijitMenuItem {
  47. padding: 6px 10px 7px;
  48. margin:-1px;
  49. }
  50. .claro .dijitMenuBar .dijitMenuItemHover,
  51. .claro .dijitMenuBar .dijitMenuItemSelected {
  52. // on hover or selection of MenuBar item, add border and reduce padding to compensate
  53. border:solid 1px @hovered-border-color;
  54. padding: 5px 9px 6px;
  55. }
  56. /* this prevents jiggling upon hover of a menu item */
  57. .claro .dijitMenuTable {
  58. border-collapse:separate;
  59. border-spacing:0 0;
  60. padding:0;
  61. }
  62. .claro .dijitMenuItem td{
  63. padding:1px;
  64. }
  65. /* hover over a MenuItem or MenuBarItem */
  66. .claro .dijitSelectMenu .dijitMenuItemHover td,
  67. .claro .dijitSelectMenu .dijitMenuItemSelected td,
  68. .claro .dijitMenuItemHover,
  69. .claro .dijitMenuItemSelected {
  70. // note: seems like the selected MenuItem should use @pressed-background-color
  71. // and .active-gradient, but claro didn't to that
  72. background-color: @hovered-background-color;
  73. .standard-gradient;
  74. }
  75. .claro .dijitMenuItemActive {
  76. // todo: seems like the selected MenuItem should come here
  77. // todo: seems like should use @pressed-background-color
  78. .active-gradient;
  79. }
  80. .dj_ie .claro .dijitMenuActive .dijitMenuItemHover,
  81. .dj_ie .claro .dijitMenuActive .dijitMenuItemSelected,
  82. .dj_ie .claro .dijitMenuPassive .dijitMenuItemHover,
  83. .dj_ie .claro .dijitMenuPassive .dijitMenuItemSelected {
  84. // Selectivity set to override ComboBox rules below.
  85. // If this rule isn't present, on IE6 hovering an item in the ComboBox drop down causes two
  86. // items to be highlighted (except when hovering the first item in the list)
  87. padding-top: 6px;
  88. padding-bottom: 5px;
  89. margin-top: -3px;
  90. }
  91. .claro td.dijitMenuItemIconCell {
  92. padding: 2px;
  93. margin: 0 0 0 4px;
  94. }
  95. .claro td.dijitMenuItemLabel {
  96. padding-top: 5px;
  97. padding-bottom: 5px;
  98. }
  99. .claro .dijitMenuExpand {
  100. width: 7px;
  101. height: 7px;
  102. background-image: url(@image-arrow-sprite);
  103. background-position: -14px 0;
  104. margin-right:3px;
  105. }
  106. .claro .dijitMenuItemDisabled .dijitMenuItemIconCell {
  107. opacity:1;
  108. }
  109. .claro .dijitMenuSeparatorTop {
  110. height: auto;
  111. margin-top:1px; /* prevents spacing above/below separator */
  112. border-bottom: 1px solid @border-color
  113. }
  114. .claro .dijitMenuSeparatorBottom{
  115. height: auto;
  116. margin-bottom:1px;
  117. }
  118. /* the checked menu item */
  119. .claro .dijitCheckedMenuItemIconChar {
  120. display: none;
  121. }
  122. .claro .dijitCheckedMenuItemIcon {
  123. background-image: url(@image-form-checkbox-and-radios);
  124. background-repeat:no-repeat;
  125. background-position: -15px 50%;
  126. width:15px;
  127. height:16px;
  128. }
  129. .dj_ie6 .claro .dijitCheckedMenuItemIcon {
  130. background-image: url(@image-form-checkbox-and-radios-ie6);
  131. }
  132. .claro .dijitCheckedMenuItemChecked .dijitCheckedMenuItemIcon {
  133. background-position: 0 50%;
  134. }
  135. /*ComboBox Menu*/
  136. .claro .dijitComboBoxMenu {
  137. margin-left:0;
  138. background-image: none;
  139. }
  140. .claro .dijitSelectMenu .dijitMenuItem td,
  141. .claro .dijitComboBoxMenu .dijitMenuItem {
  142. padding: @textbox-padding; // Make drop down menu text line up with text in <input>.
  143. border-width:1px 0 1px 0;
  144. border-style:solid;
  145. border-color: @select-dropdownitem-background-color;
  146. }
  147. .claro .dijitSelectMenu .dijitMenuItemSelected td,
  148. .claro .dijitComboBoxMenu .dijitMenuItemSelected {
  149. color:@selected-text-color;
  150. border-color:@hovered-border-color;
  151. background-color:@hovered-background-color;
  152. }
  153. .claro .dijitSelectMenu .dijitMenuItemHover td,
  154. .claro .dijitComboBoxMenu .dijitMenuItemHover {
  155. color: #000000;
  156. border-color: #769dc0;
  157. background-color: #abd6ff;
  158. }
  159. .claro .dijitComboBoxMenuActive .dijitMenuItemSelected {
  160. background-color: @select-dropdownitem-hovered-background-color; /* TODO: why is this a different color than normal .dijitMenuItemSelected? */
  161. }
  162. .claro .dijitMenuPreviousButton, .claro .dijitMenuNextButton {
  163. font-style: italic;
  164. }