PluginProbe
Code Snippets / 3.10.0-beta.1
Code Snippets v3.10.0-beta.1
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.0-beta.1, at css/common/_kebab-menu.scss

106 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: 0;
44 list-style: none;
45 background: #fff;
46 border: 1px solid #e2e2e4;
47 border-radius: 5px;
48 box-shadow: 0 3px 16px rgb(0 0 0 / 15%);
49
50 &.kebab-menu-popover-top {
51 inset-block: auto calc(100% + 4px);
52 }
53
54 li {
55 margin: 0;
56 }
57 }
58
59 .kebab-menu-item {
60 display: block;
61 inline-size: 100%;
62 box-sizing: border-box;
63 padding-block: 10px;
64 padding-inline: 14px;
65 background: none;
66 border: none;
67 font-family: inherit;
68 font-size: 14px;
69 line-height: 1.4;
70 color: #2c3337;
71 text-align: start;
72 cursor: pointer;
73
74 &:hover,
75 &:focus {
76 background: #f0f0f1;
77 }
78
79 &:disabled {
80 color: #a7aaad;
81 cursor: default;
82 background: none;
83 }
84
85 &.kebab-menu-item-destructive {
86 color: #d63638;
87 }
88 }
89
90 .kebab-menu-divider {
91 margin-block: 6px;
92 border-block-start: 1px solid #e2e2e4;
93 }
94
95 .kebab-menu-row {
96 display: flex;
97 align-items: center;
98 gap: 8px;
99 box-sizing: border-box;
100 padding-block: 10px;
101 padding-inline: 14px;
102 font-size: 14px;
103 line-height: 1.4;
104 color: #2c3337;
105 }
106