PluginProbe
Code Snippets / 3.10.2
Code Snippets v3.10.2
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / css / common / _kebab-menu.scss

_kebab-menu.scss in Code Snippets 3.10.2, at css/common/_kebab-menu.scss

107 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @use 'theme';
2
3 // Generic kebab ("more actions") menu: a square accent-outlined trigger
4 // button that opens a small popover of actions anchored to its
5 // bottom-end corner, flipping above the trigger near the viewport edge.
6 .kebab-menu {
7 position: relative;
8 display: inline-flex;
9 }
10
11 .kebab-menu-trigger {
12 display: flex;
13 align-items: center;
14 justify-content: center;
15 inline-size: 38px;
16 block-size: 38px;
17 box-sizing: border-box;
18 padding: 0;
19 background: #fff;
20 color: theme.$accent;
21 border: 1px solid theme.$accent;
22 border-radius: 5px;
23 cursor: pointer;
24
25 svg {
26 display: block;
27 }
28
29 &:hover,
30 &:focus {
31 background: #f0f6fc;
32 }
33 }
34
35 .kebab-menu-popover {
36 position: absolute;
37 inset-block-start: calc(100% + 4px);
38 inset-inline-end: 0;
39 z-index: 1000;
40 inline-size: 224px;
41 box-sizing: border-box;
42 margin: 0;
43 padding: 6px 0;
44 list-style: none;
45 background: #fff;
46 border: 1px solid #e2e2e4;
47 border-radius: 5px;
48 overflow: hidden;
49 box-shadow: 0 3px 16px rgb(0 0 0 / 15%);
50
51 &.kebab-menu-popover-top {
52 inset-block: auto calc(100% + 4px);
53 }
54
55 li {
56 margin: 0;
57 }
58 }
59
60 .kebab-menu-item {
61 display: block;
62 inline-size: 100%;
63 box-sizing: border-box;
64 padding-block: 10px;
65 padding-inline: 14px;
66 background: none;
67 border: none;
68 font-family: inherit;
69 font-size: 14px;
70 line-height: 1.4;
71 color: #2c3337;
72 text-align: start;
73 cursor: pointer;
74
75 &:hover,
76 &:focus {
77 background: #f0f0f1;
78 }
79
80 &:disabled {
81 color: #a7aaad;
82 cursor: default;
83 background: none;
84 }
85
86 &.kebab-menu-item-destructive {
87 color: #d63638;
88 }
89 }
90
91 .kebab-menu-divider {
92 margin-block: 6px;
93 border-block-start: 1px solid #e2e2e4;
94 }
95
96 .kebab-menu-row {
97 display: flex;
98 align-items: center;
99 gap: 8px;
100 box-sizing: border-box;
101 padding-block: 10px;
102 padding-inline: 14px;
103 font-size: 14px;
104 line-height: 1.4;
105 color: #2c3337;
106 }
107