2.0 KB96 lines
Blame
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8.context-menu-container,
9.context-menu-submenu-navigation,
10.context-menu-tooltip {
11 position: absolute;
12 padding: var(--halfpad);
13 background-color: var(--tooltip-background);
14 color: var(--foreground);
15 border: 1px solid var(--tooltip-border);
16 display: flex;
17 flex-direction: column;
18 z-index: 2000;
19 min-width: 180px;
20 box-sizing: border-box;
21}
22
23.context-menu {
24 overflow-y: auto;
25 position: relative;
26}
27
28.context-menu-divider {
29 border-top: 1px solid var(--tooltip-border);
30 height: 0;
31 margin: var(--halfpad);
32}
33
34.context-menu-item {
35 padding: var(--halfpad);
36 border-radius: var(--halfpad);
37 cursor: pointer;
38}
39.context-menu-submenu {
40 display: flex;
41 flex-direction: row;
42 align-items: center;
43 justify-content: space-between;
44}
45
46.context-menu-item:hover,
47.context-menu-item:focus {
48 background-color: var(--hover-darken);
49}
50
51.context-menu-arrow {
52 --arrow-height: calc(var(--pad) - 4px);
53 --arrow-half-width: calc(var(--arrow-height) / 2);
54 position: absolute;
55}
56
57.context-menu-arrow::after {
58 content: ' ';
59 position: absolute;
60 width: var(--arrow-height);
61 height: var(--arrow-height);
62 background-color: var(--tooltip-background);
63 border-right: 1px solid var(--tooltip-border);
64 border-bottom: 1px solid var(--tooltip-border);
65}
66
67.context-menu-arrow-top::after {
68 transform: rotate(225deg);
69}
70.context-menu-arrow-bottom::after {
71 transform: rotate(45deg);
72}
73
74.context-menu-arrow-top {
75 left: calc(50% - var(--arrow-half-width));
76 top: calc(-1px - var(--arrow-half-width));
77}
78.context-menu-arrow-bottom {
79 left: calc(50% - var(--arrow-half-width));
80 bottom: calc(var(--arrow-half-width));
81}
82
83.context-menu-arrow-left {
84 left: var(--pad);
85}
86
87.context-menu-arrow-right {
88 right: var(--pad);
89 left: unset;
90}
91
92.context-menu-disabled-option {
93 cursor: not-allowed;
94 opacity: 0.8;
95}
96