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