-
Notifications
You must be signed in to change notification settings - Fork 0
/
ctxmenu.css
125 lines (105 loc) · 2.32 KB
/
ctxmenu.css
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
@font-face {
font-family: 'CtxMenuFont';
font-style: normal;
font-weight: 300;
src: local('Segoe UI');
}
/* Background that covers entire page when right clicking, invisible by default */
#ctx-menu-background {
/* background-color: rgba(0, 0, 0, 0.1); Un-comment to tint entire page darker when context menu appears */
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 998;
}
/* - - - - - - -
Context Menu
- - - - - - - - */
.ctx-menu-wrapper {
background-color: rgb(250, 250, 250);
box-shadow: 4px 4px 3px -2px rgba(0, 0, 0, .1);
color: black;
padding: 3px 0 3px 0;
border: 1px solid #b1b1b1;
border-radius: 1px;
font-family: "CtxMenuFont";
font-size: 12px;
/* Make all the elements un-selectable */
-moz-user-select: -moz-none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
/* Do not edit these properties */
position: absolute;
z-index: 999;
white-space: nowrap;
}
/* - - - - - - -
Context Menu Items
- - - - - - - - */
.ctx-menu-item {
padding: 2px 10px 2px 10px;
border-radius: 1px;
cursor: pointer;
transition: background-color 0.1s;
}
.ctx-menu-item:hover {
background-color: rgba(0,0,0,0.13);
}
.ctx-menu-item:active {
transition: background-color 0s;
background-color: rgba(0,0,0,0.2);
}
.ctx-menu-separator {
height: 1px;
margin: 3px 0 3px 0;
background-color: rgba(0, 0, 0, 0.2);
}
/* - - - - - - -
Icons
- - - - - - - - */
.ctx-menu-hasIcon img {
min-width: 16px;
max-width: 16px;
max-height: 16px;
position: relative;
margin-right: 8px;
pointer-events: none;
user-select: none;
}
.ctx-menu-item img[src] {
float: left;
}
.ctx-menu-hasIcon .ctx-menu-item {
vertical-align: middle;
max-height: 20px;
}
/* - - - - - - -
Dark Mode
- - - - - - - - */
@media (prefers-color-scheme: dark){
.ctx-menu-wrapper {
background-color: rgb(36, 39, 40);
color:white;
border-color: #464646;
}
.ctx-menu-item{
transition: background-color 0s;
}
.ctx-menu-item:hover{
background-color: rgb(211, 216, 219);
color: black;
}
.ctx-menu-separator {
background-color: rgba(255, 255, 255, 0.2);
}
.ctx-menu-item .ctx-menu-darkInvert{
filter: invert(1);
}
.ctx-menu-item:hover .ctx-menu-darkInvert{
filter: invert(0);
}
}