1 |
|
2 |
|
3 |
|
4 | @import "../../common/variables";
|
5 | @import "~@blueprintjs/icons/src/icons";
|
6 | @import "../../common/mixins";
|
7 |
|
8 | @import "./common";
|
9 | @import "./submenu";
|
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 | .#{$ns}-menu {
|
37 | background: $menu-background-color;
|
38 | border-radius: $pt-border-radius;
|
39 | color: $pt-text-color;
|
40 | list-style: none;
|
41 | margin: 0;
|
42 | min-width: $menu-min-width;
|
43 | padding: $half-grid-size;
|
44 | text-align: left;
|
45 | }
|
46 |
|
47 | .#{$ns}-menu-divider {
|
48 | @include menu-divider();
|
49 | }
|
50 |
|
51 | .#{$ns}-menu-item {
|
52 | @include menu-item();
|
53 | @include menu-item-intent();
|
54 |
|
55 | &::before {
|
56 |
|
57 | @include pt-icon();
|
58 | margin-right: $menu-item-padding;
|
59 | }
|
60 |
|
61 | &::before,
|
62 | > .#{$ns}-icon {
|
63 | color: $pt-icon-color;
|
64 | margin-top: ($menu-item-line-height - $pt-icon-size-standard) / 2;
|
65 | }
|
66 |
|
67 | .#{$ns}-menu-item-label {
|
68 | color: $pt-text-color-muted;
|
69 | }
|
70 |
|
71 | &:hover {
|
72 | color: inherit;
|
73 | }
|
74 |
|
75 | &.#{$ns}-active,
|
76 | &:active {
|
77 | background-color: $menu-item-color-active;
|
78 | }
|
79 |
|
80 |
|
81 |
|
82 | &.#{$ns}-disabled {
|
83 | background-color: inherit !important;
|
84 | color: $pt-text-color-disabled !important;
|
85 | cursor: not-allowed !important;
|
86 |
|
87 | outline: none !important;
|
88 |
|
89 | &::before,
|
90 | > .#{$ns}-icon,
|
91 | .#{$ns}-menu-item-label {
|
92 | color: $pt-icon-color-disabled !important;
|
93 | }
|
94 | }
|
95 |
|
96 |
|
97 | .#{$ns}-large & {
|
98 | @include menu-item-large();
|
99 |
|
100 | .#{$ns}-icon {
|
101 |
|
102 | margin-top: ($menu-item-line-height-large - $pt-icon-size-standard) / 2;
|
103 | }
|
104 |
|
105 | &::before {
|
106 | @include pt-icon($pt-icon-size-large);
|
107 | margin-right: $menu-item-padding-large;
|
108 | margin-top: ($menu-item-line-height-large - $pt-icon-size-large) / 2;
|
109 | }
|
110 | }
|
111 | }
|
112 |
|
113 | button.#{$ns}-menu-item {
|
114 | background: none;
|
115 | border: none;
|
116 | text-align: left;
|
117 | width: 100%;
|
118 | }
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 | .#{$ns}-menu-header {
|
139 | @include menu-header($heading-selector: "> h6");
|
140 |
|
141 | .#{$ns}-large & {
|
142 | @include menu-header-large($heading-selector: "> h6");
|
143 | }
|
144 | }
|
145 |
|
146 |
|
147 | .#{$ns}-dark {
|
148 | .#{$ns}-menu {
|
149 | background: $dark-menu-background-color;
|
150 | color: $pt-dark-text-color;
|
151 | }
|
152 |
|
153 | .#{$ns}-menu-item {
|
154 | @include menu-item-intent($pt-dark-intent-text-colors);
|
155 |
|
156 | &::before,
|
157 | > .#{$ns}-icon {
|
158 | color: $pt-dark-icon-color;
|
159 | }
|
160 |
|
161 | .#{$ns}-menu-item-label {
|
162 | color: $pt-dark-text-color-muted;
|
163 | }
|
164 |
|
165 | &.#{$ns}-active,
|
166 | &:active {
|
167 | background-color: $dark-menu-item-color-active;
|
168 | }
|
169 |
|
170 |
|
171 |
|
172 | &.#{$ns}-disabled {
|
173 | color: $pt-dark-text-color-disabled !important;
|
174 |
|
175 | &::before,
|
176 | > .#{$ns}-icon,
|
177 | .#{$ns}-menu-item-label {
|
178 | color: $pt-dark-icon-color-disabled !important;
|
179 | }
|
180 | }
|
181 |
|
182 | }
|
183 |
|
184 | .#{$ns}-menu-divider,
|
185 | .#{$ns}-menu-header {
|
186 | border-color: $pt-dark-divider-white;
|
187 | }
|
188 |
|
189 | .#{$ns}-menu-header > h6 {
|
190 | color: $pt-dark-heading-color;
|
191 | }
|
192 | }
|
193 |
|
194 |
|
195 | .#{$ns}-label .#{$ns}-menu {
|
196 | margin-top: $pt-grid-size / 2;
|
197 | }
|