Menu.less 5.8 KB

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