summaryrefslogtreecommitdiffstats
path: root/src/objects/_action-menu.scss
diff options
context:
space:
mode:
Diffstat (limited to 'src/objects/_action-menu.scss')
-rw-r--r--src/objects/_action-menu.scss122
1 files changed, 0 insertions, 122 deletions
diff --git a/src/objects/_action-menu.scss b/src/objects/_action-menu.scss
deleted file mode 100644
index 12e3b5f..0000000
--- a/src/objects/_action-menu.scss
+++ /dev/null
@@ -1,122 +0,0 @@
1@use 'iro-sass/src/index' as iro;
2@use '../functions' as fn;
3
4@include iro.props-namespace('action-menu') {
5 @include iro.props-store((
6 --dims: (
7 --pad-x: 0,
8 --pad-y: fn.global-dim(--size --85),
9 --separator: fn.global-dim(--size --85),
10 --rounding: 3px,
11 --border: 1px,
12 --item: (
13 --pad-x: fn.global-dim(--size --150),
14 --pad-y: fn.global-dim(--size --85),
15 ),
16 ),
17 ), 'dims');
18
19 @include iro.props-store((
20 --colors: (
21 --shadow: 0 .2em .5em rgba(#000, .1),
22 --border: fn.global-color(--border --stable-lo),
23 --separator: fn.global-color(--obj),
24 --icon: fn.global-color(--fg-hi),
25 --item: (
26 --hover: (
27 --bg: fn.global-color(--obj-hi),
28 --label: fn.global-color(--fg-lo),
29 ),
30 --disabled: (
31 --label: fn.global-color(--fg-hi3),
32 ),
33 --key-focus: (
34 --bg: fn.global-color(--obj-hi),
35 --label: fn.global-color(--fg-lo),
36 --border: fn.global-color(--focus --fill),
37 --shadow: fn.global-color(--focus --shadow),
38 ),
39 ),
40 ),
41 ), 'colors');
42
43 @include iro.props-store((
44 --colors: (
45 --shadow: 0 .2em .5em rgba(#000, .5),
46 ),
47 ), 'colors-dark');
48
49 @include iro.bem-object(iro.props-namespace()) {
50 position: absolute;
51 z-index: 10000;
52 top: 0;
53 left: 0;
54 padding: fn.dim(--pad-y) fn.dim(--pad-x);
55 transform: translate(var(--x), var(--y));
56 border: fn.dim(--border) solid fn.color(--border);
57 border-radius: fn.dim(--rounding);
58 background-clip: padding-box;
59 background-color: fn.global-color(--bg);
60 box-shadow: fn.color(--shadow);
61 color: fn.global-color(--fg);
62
63 @include iro.bem-modifier('up-left') {
64 transform: translate(var(--x), calc(var(--y) - 100%));
65 }
66
67 @include iro.bem-modifier('up-right') {
68 transform: translate(calc(var(--x) - 100%), calc(var(--y) - 100%));
69 }
70
71 @include iro.bem-modifier('down-right') {
72 transform: translate(calc(var(--x) - 100%), var(--y));
73 }
74
75 @include iro.bem-elem('item') {
76 display: block;
77 box-sizing: border-box;
78 width: 100%;
79 padding: calc(fn.dim(--item --pad-y) - 2px) calc(fn.dim(--item --pad-x) - 2px);
80 border: 2px solid transparent;
81 color: fn.color(--item --disabled --label);
82
83 &:link,
84 &:visited,
85 &:enabled {
86 color: currentColor;
87
88 &:hover,
89 &:active {
90 background-color: fn.color(--item --hover --bg);
91 color: fn.color(--item --hover --label);
92 }
93
94 @include iro.bem-at-theme('keyboard') {
95 &:focus {
96 border-radius: calc(fn.dim(--rounding) - 1px);
97 border-color: fn.color(--item --key-focus --border);
98 background-color: fn.color(--item --key-focus --bg);
99 box-shadow: fn.color(--item --key-focus --shadow);
100 color: fn.color(--item --key-focus --label);
101 }
102 }
103 }
104 }
105
106 @include iro.bem-elem('separator') {
107 height: 1px;
108 margin: fn.dim(--separator) 0;
109 background-color: fn.color(--separator);
110 }
111
112 @include iro.bem-elem('slot') {
113 padding: fn.dim(--item --pad-y) fn.dim(--item --pad-x);
114 }
115
116 @include iro.bem-elem('icon-slot') {
117 display: flex;
118 justify-content: center;
119 width: fn.foreign-dim(--icon, --size);
120 }
121 }
122}