13693261870
2022-09-16 354b3dbfbffb3df45212a2a44dbbf48b4acc2594
1
2
3
4
5
6
7
8
9
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js">// private
$menu-icon-separator-indent: left($menu-padding) + $menu-item-icon-size + ($menu-item-icon-horizontal-spacing * 2);
// private
$menu-item-indent: ($menu-icon-separator-indent + $menu-separator-size + $menu-item-text-horizontal-spacing);
 
@if $menu-border-width != null {
    .#{$prefix}menu {
        // if $menu-border-width is null, we will inherit body border from Panel
        border-style: $menu-border-style;
        border-width: $menu-border-width;
        border-color: $menu-border-color;
    }
}
.#{$prefix}menu-body {
    background: $menu-background-color;
    padding: $menu-padding;
}
 
.#{$prefix}menu-icon-separator {
    left: $menu-icon-separator-indent;
    border-left: solid 1px $menu-separator-border-color;
    background-color: $menu-separator-background-color;
    width: $menu-separator-size;
}
 
@if $include-rtl {
    .#{$prefix}rtl.#{$prefix}menu .#{$prefix}menu-icon-separator {
        left: auto;
        right: $menu-icon-separator-indent;
    }
}
 
.#{$prefix}menu-item {
    // Inactive menu items have padding in place of the active border width.
    // When active, they get their border added, but padding set to zero.
    // So that there's no border occluding the Menu when an item is inactive.
    // TODO: When we drop IE6, use transparent borders on inactive items and no padding and remove this hack.
    @if $menu-item-border-width != 0 {
        padding: $menu-item-border-width;
    }
    cursor: $menu-item-cursor;
}
 
// Components used as menu items configured with &quot;indent:true&quot; are assigned a css class of x-menu-item-indent, unless
// the menu is configured with &quot;plain: true&quot;
.#{$prefix}menu-item-indent {
    margin-left: $menu-item-indent;
}
 
@if $include-rtl {
    .#{$prefix}rtl.#{$prefix}menu-item-indent {
        margin-left: 0;
        margin-right: $menu-item-indent;
    }
}
 
.#{$prefix}menu-item-active {
    @include background-gradient($menu-item-active-background-color, $menu-item-background-gradient);
    border-color: $menu-item-active-border-color;
    @if $menu-item-active-border-radius != 0 {
        @include border-radius($menu-item-active-border-radius);
    }
 
    // When active, the border takes the place of padding so that a border can appear
    // without changing the overall size of the item.
    // TODO: When we drop IE6, use transparent borders on inactive items and no padding and remove this hack.
    @if $menu-item-border-width != 0 {
        border-width: $menu-item-border-width;
        border-style: solid;
        padding: 0;
    }
 
    // Background linear gradient
    @if not $supports-gradients or $compile-all {
        .#{$prefix}nlg &amp; {
            background: $menu-item-active-background-color repeat-x left top;
            background-image: slicer-background-image(menu-item-link, 'menu/menu-item-active-bg');
        }
    }
}
 
.#{$prefix}menu-item-link {
    line-height: $menu-item-height - vertical($menu-item-border-width);
    padding: 0 $menu-item-trailing-padding 0 $menu-item-indent;
 
    // Otherwise, multi line menu items wrap into the padding area (icon space) in Webkit
    display: inline-block;
}
 
@if $include-rtl {
    .#{$prefix}rtl.#{$prefix}menu-item-link {
        padding: 0 $menu-item-indent 0 $menu-item-trailing-padding;
    }
}
 
// Menu check items need padding at end to accommodate checkbox.
// Class is always x-right-check-item-text where &quot;right&quot; means &quot;after&quot;
.#{$prefix}right-check-item-text {
    padding-right: $menu-check-item-padding;
}
@if $include-rtl {
    .#{$prefix}rtl.#{$prefix}right-check-item-text {
        padding-left: $menu-check-item-padding;
        padding-right: 0;
    }
}
 
.#{$prefix}menu-item-icon {
    width: $menu-item-icon-size;
    height: $menu-item-icon-size;
    top: $menu-item-icon-top;
    left: $menu-item-icon-horizontal-spacing;
    background-position: $menu-item-icon-background-position;
}
 
.#{$prefix}menu-item-glyph {
    font-size: $menu-item-icon-size;
    line-height: $menu-item-icon-size;
    color: $menu-glyph-color;
 
    @if $menu-glyph-opacity != 1 {
        // do not use the opacity mixin because we do not want IE's filter version of
        // opacity to be included.  We emulate the opacity setting in IE8m by mixing
        // the icon color into the background color. (see below)
        opacity: $menu-glyph-opacity;
    }
    // In IE8 and below when a glyph contains partially transparent pixels, we 
    // can't apply an opacity filter to the glyph element, because IE8m will render
    // the partially transparent pixels of the glyph as black. To work around this,
    // we emulate the approximate color that the glyph would have if it had opacity
    // applied by mixing the glyph color with the menus's background-color.
    .#{$prefix}ie8m &amp; {
        color: mix($menu-glyph-color, $menu-background-color, $menu-glyph-opacity * 100);
    }
}
 
// Stop the addition of bordering to active items shifting the menu icon in bad IEs (and FF)
// TODO: When we drop IE6, use transparent borders on inactive items and no padding and remove this hack.
@if $menu-item-border-width != 0 {
    .#{$prefix}gecko .#{$prefix}menu-item-active .#{$prefix}menu-item-icon,
    .#{$prefix}quirks .#{$prefix}menu-item-active .#{$prefix}menu-item-icon,
    .#{$prefix}ie9m .#{$prefix}menu-item-active .#{$prefix}menu-item-icon {
        top: ($menu-item-icon-top - $menu-item-border-width);
        left: ($menu-item-icon-horizontal-spacing - $menu-item-border-width);
    }
}
 
@if $include-rtl {
    .#{$prefix}rtl.#{$prefix}menu-item-icon {
        left: auto;
        right: $menu-item-icon-horizontal-spacing;
    }
 
    // Stop the addition of bordering to active items shifting the menu icon in bad IEs (and FF)
    // TODO: When we drop IE6, use transparent borders on inactive items and no padding and remove this hack.
    @if $menu-item-border-width != 0 {
        .#{$prefix}gecko .#{$prefix}menu-item-active .#{$prefix}rtl.#{$prefix}menu-item-icon,
        .#{$prefix}quirks .#{$prefix}menu-item-active .#{$prefix}rtl.#{$prefix}menu-item-icon,
        .#{$prefix}ie9m .#{$prefix}menu-item-active .#{$prefix}rtl.#{$prefix}menu-item-icon {
            left: auto;
            right: ($menu-item-icon-horizontal-spacing - $menu-item-border-width);
        }
    }
}
 
// For when an icon needs to be used in the right position where a submenu arrow usually goes.
// eg: When a CheckItem needs an icon. The left icon position is a checkbox, so the icon is moved to the right.
.#{$prefix}menu-item-icon-right {
    width: $menu-item-icon-size;
    height: $menu-item-icon-size;
    top: round(($menu-item-height - vertical($menu-item-border-width) - $menu-item-icon-size) / 2);
    right: $menu-item-icon-horizontal-spacing;
    background-position: $menu-item-icon-background-position;
}
 
@if $include-rtl {
    .#{$prefix}rtl.#{$prefix}menu-item-icon-right {
        right: auto;
        left: $menu-item-icon-horizontal-spacing;
    }
}
 
.#{$prefix}menu-item-text {
    font-size: $menu-item-font-size;
    color: $menu-text-color;
    cursor: $menu-item-cursor; // needed to override cursor:default set by x-unselectable
    margin-right: $menu-item-arrow-width + 4; // Leave space for a submenu arrow
}
 
// If inside a menu link item with RTL, switch the margin space for the submenu arrow
@if $include-rtl {
    a.#{$prefix}rtl {
        .#{$prefix}menu-item-text {
            margin-right: 0;
            margin-left: $menu-item-arrow-width + 4;
        }
    }
}
 
.#{$prefix}menu-item-checked {
    .#{$prefix}menu-item-icon, .#{$prefix}menu-item-icon-right {
        background-image: theme-background-image('menu/checked');
    }
    .#{$prefix}menu-group-icon {
        background-image: theme-background-image('menu/group-checked');
    }
}
 
.#{$prefix}menu-item-unchecked {
    .#{$prefix}menu-item-icon, .#{$prefix}menu-item-icon-right {
        background-image: theme-background-image('menu/unchecked');
    }
    .#{$prefix}menu-group-icon {
        background-image: none;
    }
}
 
.#{$prefix}menu-item-separator {
    height: $menu-separator-size;
    border-top: solid 1px $menu-separator-border-color;
    background-color: $menu-separator-background-color;
    margin: $menu-item-separator-margin;
    padding: 0;
}
 
.#{$prefix}menu-item-arrow {
    width: $menu-item-arrow-width;
    height: $menu-item-arrow-height;
    top: $menu-item-arrow-top;
    right: $menu-item-arrow-horizontal-spacing;
    background-image: theme-background-image('menu/menu-parent');
}
 
// Stop the addition of bordering to active items shifting the arrow in bad IEs (and FF)
// TODO: When we drop IE6, use transparent borders on inactive items and no padding and remove this hack.
@if $menu-item-border-width != 0 {
    .#{$prefix}gecko .#{$prefix}menu-item-active .#{$prefix}menu-item-arrow,
    .#{$prefix}quirks .#{$prefix}menu-item-active .#{$prefix}menu-item-arrow,
    .#{$prefix}ie9m .#{$prefix}menu-item-active .#{$prefix}menu-item-arrow {
        top: ($menu-item-arrow-top - $menu-item-border-width);
        right: ($menu-item-arrow-horizontal-spacing - $menu-item-border-width);
    }
}
 
@if $include-rtl {    
    .#{$prefix}rtl.#{$prefix}menu-item-arrow {
        left: $menu-item-arrow-horizontal-spacing;
        right: auto;
        background-image: theme-background-image('menu/menu-parent-left');
    }
 
    // Stop the addition of bordering to active items shifting the arrow in bad IEs (and FF)
    // TODO: When we drop IE6, use transparent borders on inactive items and no padding and remove this hack.
    @if $menu-item-border-width != 0 {
        .#{$prefix}gecko .#{$prefix}menu-item-active .#{$prefix}rtl.#{$prefix}menu-item-arrow,
        .#{$prefix}ie9m .#{$prefix}menu-item-active .#{$prefix}rtl.#{$prefix}menu-item-arrow,
        .#{$prefix}quirks .#{$prefix}menu-item-active .#{$prefix}rtl.#{$prefix}menu-item-arrow {
            right: auto;
            left: ($menu-item-arrow-horizontal-spacing - $menu-item-border-width);
        }
    }
}
 
.#{$prefix}menu-item-disabled {
    @include opacity($menu-item-disabled-opacity);
}
 
@if $include-content-box {
  .#{$prefix}content-box {
        .#{$prefix}menu-icon-separator {
            width: $menu-separator-size - 1;
        }
 
        .#{$prefix}menu-item-separator {
            height: $menu-separator-size - 1;
        }
    }
 
    .#{$prefix}ie {
        .#{$prefix}menu-item-disabled {
            .#{$prefix}menu-item-icon {
                @include opacity($menu-item-disabled-opacity);
            }
 
            .#{$prefix}menu-item-text {
                // IE opacity/cleartype bug workaround
                background-color: transparent;
            }
        }
    }
}
 
// TODO: what is this for?
.#{$prefix}menu-date-item {
    border-color: #99BBE8;
}
 
@if $include-ext-form-labelable {
    // When Fields are added to Menus...
    .#{$prefix}menu-item .#{$prefix}form-item-label {
        font-size: $menu-item-font-size;
        color: $menu-text-color;
    }
}
 
.#{$prefix}menu-scroll-top {
    height: $menu-scroller-height;
    background-image: theme-background-image('menu/scroll-top');
}
.#{$prefix}menu-scroll-bottom {
    height: $menu-scroller-height;
    background-image: theme-background-image('menu/scroll-bottom');
}
 
 
.#{$prefix}menu-scroll-top, .#{$prefix}menu-scroll-bottom {
    @if $menu-scroller-opacity != 1 {
        @include opacity($menu-scroller-opacity);   
    }
    @if $menu-scroller-opacity != 1 $menu-scroller-opacity-over != 1 $menu-scroller-opacity-pressed != 1 {
        // EXTJSIV-8846: partially transparent png images do not display correctly
        // in winXP/IE8m when the image element has a transparent background.
        // to fix this, we give the element the same background-color as the menu.
        background-color: $menu-background-color;
    }
}
 
@if $menu-scroller-opacity-over != 1 or $menu-scroller-opacity != 1 {
    .#{$prefix}menu-scroll-top-hover, .#{$prefix}menu-scroll-bottom-hover {
        @include opacity($menu-scroller-opacity-over);
    }
}
 
@if $menu-scroller-opacity-pressed != 1 or $menu-scroller-opacity != 1 {
    .#{$prefix}menu-scroll-top-pressed, .#{$prefix}menu-scroll-bottom-pressed {
        @include opacity($menu-scroller-opacity-pressed);
    }
}
 
@include x-slicer(menu-item-link);
</pre>
</body>
</html>