| 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 |
|