forked from firefox-devtools/profiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContextMenu.css
More file actions
192 lines (167 loc) · 5.31 KB
/
ContextMenu.css
File metadata and controls
192 lines (167 loc) · 5.31 KB
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
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
.react-contextmenu {
--internal-shadow-color1: rgb(0 0 0 / 0.1);
--internal-shadow-color2: rgb(0 0 0 / 0.3);
--internal-separator-color: #ddd;
--internal-divider-color: rgb(0 0 0 / 0.15);
--internal-active-foreground-color: #fff;
--internal-active-background-color: var(--blue-60);
--internal-disabled-foreground-color: #888;
--internal-selected-disabled-background-color: var(--blue-50-a30);
--internal-highlight-foreground-color: var(--grey-70);
z-index: var(--z-context-menu);
display: none;
min-width: 160px;
max-width: 600px;
padding: 5px 0;
border-radius: 5px;
margin: 2px 0 0;
background-color: var(--menu-background-color);
box-shadow:
0 0 0 0.5px var(--internal-shadow-color1),
0 10px 12px var(--internal-shadow-color2);
color: var(--menu-foreground-color);
font-size: 12px;
text-align: left;
user-select: none;
}
:root.dark-mode {
.react-contextmenu {
--internal-shadow-color1: rgb(0 0 0 / 0.4);
--internal-shadow-color2: rgb(0 0 0 / 0.6);
--internal-separator-color: var(--base-border-color);
--internal-divider-color: rgb(237 237 240 / 0.15);
--internal-active-foreground-color: var(--grey-20);
--internal-active-background-color: var(--blue-70);
--internal-disabled-foreground-color: var(--grey-50);
--internal-selected-disabled-background-color: var(--blue-60-a30);
--internal-highlight-foreground-color: var(--grey-30);
border: 1px solid var(--grey-60);
}
}
.react-contextmenu-separator {
border-bottom: 1px solid var(--internal-separator-color);
margin: 6px 0;
}
/* max-height for context menus in the panel changed to 90vh for better zoom experience */
.react-contextmenu.react-contextmenu--visible {
display: block;
max-height: 90vh;
}
.react-contextmenu-item:not(.react-contextmenu-submenu) {
display: flex;
overflow: hidden;
align-items: center;
padding: 2px 12px;
cursor: default;
line-height: 1.5;
text-overflow: ellipsis;
white-space: nowrap;
}
.react-contextmenu-item.react-contextmenu-item--active,
.react-contextmenu-item--selected {
border-color: var(--internal-active-background-color);
background-color: var(--internal-active-background-color);
color: var(--internal-active-foreground-color);
text-decoration: none;
}
.react-contextmenu-item.react-contextmenu-item--disabled,
.react-contextmenu-item.react-contextmenu-item--disabled:hover {
background-color: transparent;
color: var(--internal-disabled-foreground-color);
}
.react-contextmenu-item--divider {
padding: 2px 0;
border-bottom: 1px solid var(--internal-divider-color);
margin-bottom: 3px;
}
/* Submenu arrow */
.react-contextmenu-item.react-contextmenu-submenu
> .react-contextmenu-item::after {
position: absolute;
top: 5px;
right: 7px;
width: 0;
height: 0;
border: 6px solid transparent;
border-left-color: var(--base-foreground-color);
content: '';
}
/* Submenu arrow highlighted color */
.react-contextmenu-item:hover.react-contextmenu-submenu
> .react-contextmenu-item::after,
.react-contextmenu-item.react-contextmenu-submenu
> .react-contextmenu-item--active::after {
border-left-color: highlighttext;
}
.react-contextmenu-item.checkable {
position: relative;
padding-right: 21px;
}
.react-contextmenu-item.indented {
padding-left: 35px;
}
.react-contextmenu-item.checked:not(.react-contextmenu-item--disabled)::before {
position: absolute;
top: 6px;
right: 8px;
display: block;
width: 3px;
height: 6px;
border: solid var(--base-foreground-color);
border-width: 0 2px 2px 0;
content: '';
transform: rotate(45deg);
}
.react-contextmenu-item.react-contextmenu-item--active.checked,
.react-contextmenu-item--selected.checked {
border-color: var(--internal-active-foreground-color);
}
.react-contextmenu-item--disabled.react-contextmenu-item--selected {
background-color: var(--internal-selected-disabled-background-color);
}
.react-contextmenu-item--selected.checked:not(
.react-contextmenu-item--disabled
)::before {
/* Invert the colors of the checkmark when selected */
border-color: var(--internal-active-foreground-color);
}
/* Use this wrapper for a content that needs to take the available space or if
* it contains other HTML elements (eg <strong>) */
.react-contextmenu-item-content {
overflow: hidden;
min-width: 0;
flex: 1;
text-overflow: ellipsis;
}
/* Use a span with this class to add an icon to an item. */
.react-contextmenu-icon {
width: 16px;
height: 16px;
flex: none;
background: center no-repeat;
margin-inline-end: 8px;
pointer-events: auto;
}
/* Soften a bit the style of highlighted words */
.react-contextmenu-item > strong {
color: var(--internal-highlight-foreground-color);
}
.react-contextmenu-item--selected > strong {
color: var(--internal-active-foreground-color);
}
@media (forced-colors: active) {
.react-contextmenu {
border: 1px solid CanvasText;
}
.react-contextmenu-item:not(.react-contextmenu-item--disabled):hover {
background-color: SelectedItem;
color: SelectedItemText;
}
.react-contextmenu-item.react-contextmenu-item--disabled,
.react-contextmenu-item.react-contextmenu-item--disabled:hover {
color: GrayText;
}
}