Debian Codegraph @

dijit-themes/flat/dijit/Menu.styl

raw
1 /* Menu
2
3 There are three areas of styling for the Menu:
4
5 1. The menu
6 There are three types of menus:
7 i) Context Menu
8 ii) Drop down Menu
9 iii) Navigation Menu
10 All three types of menus are affected by the .dijitMenu class in which you can set the background-color, padding and border
11 .dijitMenu affects the drop down menu in TimeTextBox, Calendar, ComboBox and FilteringSelect
12 .dijitMenuTable - for padding - also affects Select widget
13
14 2. The menu bar
15 .dijitMenuBar - for border, margins, padding, background-color of the menu bar
16 .dijitMenuBar .dijitMenuItem - for padding, text color of menu items in the menu bar (overrides .dijitMenuItem)
17
18 3. Menu items - items in the menu.
19 .dijitMenuItem - for color
20 .dijitMenuItemHover, .dijitMenuItemSelected - for background-color, border, text color, padding of a menu item or menubar item that has been hovered over or selected
21 .dijitMenuItemActive - for background-color of an active (mousedown) menu item
22 td.dijitMenuItemIconCell - for padding around a menu item's icon
23 td.dijitMenuItemLabel - for padding around a menu item's label
24 .dijitMenuSeparatorTop - for border, top border, of the separator
25 .dijitMenuSeparatorBottom - for bottom margin of the separator
26
27 Styles specific to ComboBox and FilteringSelect widgets:
28 .dijitComboBoxMenu .dijitMenuItem - for padding and border of a menu item in a ComboBox or FilteringSelect widget's menu
29 .dijitComboBoxMenu .dijitMenuItemSelected- for text color, background-color and border of a menu item in a ComboBox or FilteringSelect widget's menu
30
31 */
32
33 @import 'dijit_variables';
34
35 .{$theme-name} {
36 /* ----- Menu (Common) ----- */
37 .dijitMenu {
38 background: $menu-background-color;
39 border: 1px solid $menu-border-color;
40 border-radius: $menu-border-radius;
41 margin: 0;
42 box-shadow: $popup-box-shadow;
43 }
44
45 .dijitMenuTable,
46 .dijitComboBoxMenu {
47 padding: $menu-padding 0;
48 }
49
50 .dijitComboBoxMenu {
51 margin-left:0;
52 background-image: none;
53 }
54
55 .dijitMenuTable {
56 /* this prevents jiggling upon hover of a menu item */
57 border-collapse: separate;
58 border-spacing: 0 0;
59 }
60
61 /* ---- MenuItem ---- */
62 .dijitMenuItem,
63 .dijitMenuItem td {
64 line-height: $line-height;
65 padding: $menu-item-padding;
66 white-space: nowrap;
67 }
68
69 // hover
70 .dijitMenuItemHover td,
71 .dijitMenuItemHover {
72 color: $menu-item-hovered-text-color;
73 background-color: $menu-item-hovered-background-color;
74 }
75
76 // active
77 .dijitMenuItemActive td,
78 .dijitMenuItemActive {
79 color: $menu-item-active-text-color;
80 background-color: $menu-item-active-background-color;
81 }
82
83 // selected
84 .dijitMenuItemSelected td,
85 .dijitMenuItemSelected {
86 color: $menu-item-selected-text-color;
87 background-color: $menu-item-selected-background-color;
88 }
89
90 // disabled
91 .dijitMenuItemDisabled {
92 color: $menu-item-disabled-text-color;
93 }
94
95 .dijitMenuItemDisabled.dijitMenuItemSelected td,
96 .dijitMenuItemDisabled.dijitMenuItemSelected {
97 color: $menu-item-disabled-hovered-text-color;
98 background: $menu-item-disabled-hovered-background-color;
99 }
100
101 /* ---- MenuItemSeparator ---- */
102 .dijitMenuSeparatorTop {
103 height: auto
104 margin-top: 1px; /* prevents spacing above/below separator */
105 border-bottom: 1px solid $menu-item-separator-top-color;
106 }
107
108 .dijitMenuSeparatorBottom {
109 height: auto;
110 margin-bottom:1px;
111 border-top: 1px solid $menu-item-separator-bottom-color;
112 }
113
114 /* ---- MenuItem icons ---- */
115 td.dijitMenuItemIconCell {
116 padding: $menu-item-icon-padding;
117 margin: 0 0 0 $menu-item-icon-margin;
118 text-align: center;
119 }
120
121 // popup menu icon
122 .dijitMenuExpand {
123 _icon-core-style();
124 &:before {
125 content: $menu-item-icon;
126 }
127 }
128
129 // checked icon
130 .dijitCheckedMenuItemIconChar {
131 display: none;
132 }
133
134 .dijitMenuPreviousButton, .dijitMenuNextButton {
135 font-style: italic;
136 }
137
138 /* ----- Menu Bar ----- */
139 .dijitMenuBar {
140 margin: 0;
141 padding: 0;
142 background-color: $menubar-background-color;
143
144 .dijitMenuItem {
145 padding: $menubar-item-padding;
146 margin: 0;
147 }
148
149 // hover
150 .dijitMenuItemHover {
151 color: $menubar-item-hover-color;
152 background-color: $menubar-item-hover-background-color;
153 }
154
155 // active
156 .dijitMenuItemActive {
157 color: $menubar-item-active-color;
158 background-color: $menubar-item-active-background-color;
159 }
160
161 // selected
162 .dijitMenuItemSelected,
163 .dijitMenuItemHover.dijitMenuItemSelected,
164 .dijitMenuItemActive.dijitMenuItemSelected {
165 color: $menubar-item-selected-text-color;
166 background-color: $menubar-item-selected-background-color;
167 }
168
169 // disabled
170 .dijitMenuItemDisabled.dijitMenuItemSelected,
171 .dijitMenuItemDisabled.dijitMenuItemSelected {
172 color: $menu-item-disabled-hovered-text-color;
173 background: $menu-item-disabled-hovered-background-color;
174 }
175 }
176
177 /* ---- MenuBar Dropdown ---- */
178 .dijitMenuPopup {
179 border-top-left-radius: 0;
180 border-top-right-radius: 0;
181
182 .dijitMenu {
183 border-top-left-radius: 0;
184 border-top-right-radius: 0;
185 }
186 .dijitMenuItem,
187 .dijitMenuItem td {
188 padding: $menubar-popup-item-padding;
189 }
190 }
191 }