beercss 3.8.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/cdn/beer.css +175 -83
- package/dist/cdn/beer.js +10 -2
- package/dist/cdn/beer.min.css +1 -1
- package/dist/cdn/beer.min.js +1 -1
- package/package.json +1 -1
- package/src/cdn/beer.css +1 -0
- package/src/cdn/elements/dialogs.css +2 -6
- package/src/cdn/elements/expansions.css +5 -10
- package/src/cdn/elements/fields.ts +1 -1
- package/src/cdn/elements/icons.css +1 -1
- package/src/cdn/elements/lists.css +71 -0
- package/src/cdn/elements/media.css +1 -1
- package/src/cdn/elements/menus.css +53 -42
- package/src/cdn/elements/navigations.css +1 -1
- package/src/cdn/elements/overlays.css +14 -2
- package/src/cdn/elements/selections.css +32 -14
- package/src/cdn/elements/sliders.ts +8 -1
- package/src/cdn/elements/snackbars.css +1 -2
- package/src/cdn/helpers/forms.css +1 -1
- package/src/cdn/helpers/spaces.css +4 -4
- package/src/cdn/settings/fonts.css +3 -3
- package/src/cdn/settings/globals.css +1 -1
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
menu > li {
|
|
2
|
-
all: unset;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
menu {
|
|
6
2
|
opacity: 0;
|
|
7
3
|
visibility: hidden;
|
|
@@ -38,8 +34,8 @@ menu.no-wrap {
|
|
|
38
34
|
menu.active,
|
|
39
35
|
menu:not([data-ui]):active,
|
|
40
36
|
:not(menu, [data-ui]):focus-within > menu,
|
|
41
|
-
menu >
|
|
42
|
-
menu > menu:hover {
|
|
37
|
+
menu > li:hover > menu,
|
|
38
|
+
menu > li > menu:hover {
|
|
43
39
|
opacity: 1;
|
|
44
40
|
visibility: visible;
|
|
45
41
|
transform: scale(1) translateY(100%);
|
|
@@ -49,27 +45,43 @@ menu * {
|
|
|
49
45
|
white-space: inherit !important;
|
|
50
46
|
}
|
|
51
47
|
|
|
52
|
-
menu >
|
|
53
|
-
|
|
48
|
+
menu > li,
|
|
49
|
+
menu > li > a:only-child {
|
|
50
|
+
all: unset;
|
|
51
|
+
box-sizing: border-box;
|
|
52
|
+
position: relative;
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
align-self: normal;
|
|
56
|
+
text-align: start;
|
|
57
|
+
justify-content: flex-start;
|
|
58
|
+
white-space: nowrap;
|
|
59
|
+
gap: 1rem;
|
|
60
|
+
padding: 0 1rem;
|
|
54
61
|
min-block-size: 3rem;
|
|
55
62
|
flex: 1;
|
|
56
63
|
margin: 0 !important;
|
|
64
|
+
cursor: pointer;
|
|
57
65
|
}
|
|
58
66
|
|
|
59
|
-
menu > :is(
|
|
60
|
-
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: flex-start;
|
|
67
|
+
menu > li:is(:hover, :focus, .active) {
|
|
68
|
+
background-color: var(--active);
|
|
63
69
|
}
|
|
64
70
|
|
|
65
|
-
menu >
|
|
66
|
-
|
|
71
|
+
menu > li > :is(.max, a:only-child, .field:only-child),
|
|
72
|
+
menu > li > a:only-child > .max,
|
|
73
|
+
menu > li:has(.field) {
|
|
74
|
+
flex: 1;
|
|
75
|
+
padding: 0;
|
|
76
|
+
margin: 0;
|
|
67
77
|
}
|
|
68
78
|
|
|
69
79
|
menu.min {
|
|
70
80
|
inset: 0 0 auto 0;
|
|
71
81
|
transform: none !important;
|
|
72
82
|
border-radius: inherit;
|
|
83
|
+
background-color: var(--surface-variant) !important;
|
|
84
|
+
color: var(--on-surface-variant) !important;
|
|
73
85
|
}
|
|
74
86
|
|
|
75
87
|
[dir=rtl] menu.min.right,
|
|
@@ -90,6 +102,8 @@ menu.max {
|
|
|
90
102
|
min-block-size: auto;
|
|
91
103
|
z-index: 100;
|
|
92
104
|
transform: none !important;
|
|
105
|
+
background-color: var(--surface-variant) !important;
|
|
106
|
+
color: var(--on-surface-variant) !important;
|
|
93
107
|
}
|
|
94
108
|
|
|
95
109
|
menu.no-wrap:is(.min, .max) {
|
|
@@ -106,8 +120,7 @@ menu.right {
|
|
|
106
120
|
inset: auto auto 0 0;
|
|
107
121
|
}
|
|
108
122
|
|
|
109
|
-
menu:has(
|
|
110
|
-
menu > menu {
|
|
123
|
+
menu:has(menu) {
|
|
111
124
|
---child: 1;
|
|
112
125
|
---type: 0;
|
|
113
126
|
|
|
@@ -118,94 +131,92 @@ menu > menu {
|
|
|
118
131
|
max-block-size: none;
|
|
119
132
|
}
|
|
120
133
|
|
|
121
|
-
menu > menu,
|
|
122
|
-
menu > menu.
|
|
123
|
-
[dir=rtl] menu > menu.left {
|
|
134
|
+
menu > li > :is(menu, menu.right),
|
|
135
|
+
[dir=rtl] menu > li > menu.left {
|
|
124
136
|
inset: auto auto calc(3rem * (var(---child) - var(---type))) 100%;
|
|
125
137
|
}
|
|
126
138
|
|
|
127
|
-
[dir=rtl] menu > menu,
|
|
128
|
-
|
|
129
|
-
menu > menu.left {
|
|
139
|
+
[dir=rtl] menu > li > :is(menu, menu.right),
|
|
140
|
+
menu > li > menu.left {
|
|
130
141
|
inset: auto 100% calc(3rem * (var(---child) - var(---type))) auto;
|
|
131
142
|
}
|
|
132
143
|
|
|
133
|
-
menu > :nth-last-child(2) {
|
|
144
|
+
menu > li:nth-last-child(2) {
|
|
134
145
|
---child: 2;
|
|
135
146
|
}
|
|
136
147
|
|
|
137
|
-
menu > :nth-last-child(3) {
|
|
148
|
+
menu > li:nth-last-child(3) {
|
|
138
149
|
---child: 3;
|
|
139
150
|
}
|
|
140
151
|
|
|
141
|
-
menu > :nth-last-child(4) {
|
|
152
|
+
menu > li:nth-last-child(4) {
|
|
142
153
|
---child: 4;
|
|
143
154
|
}
|
|
144
155
|
|
|
145
|
-
menu > :nth-last-child(5) {
|
|
156
|
+
menu > li:nth-last-child(5) {
|
|
146
157
|
---child: 5;
|
|
147
158
|
}
|
|
148
159
|
|
|
149
|
-
menu > :nth-last-child(6) {
|
|
160
|
+
menu > li:nth-last-child(6) {
|
|
150
161
|
---child: 6;
|
|
151
162
|
}
|
|
152
163
|
|
|
153
|
-
menu > :nth-last-child(7) {
|
|
164
|
+
menu > li:nth-last-child(7) {
|
|
154
165
|
---child: 7;
|
|
155
166
|
}
|
|
156
167
|
|
|
157
|
-
menu > :nth-last-child(8) {
|
|
168
|
+
menu > li:nth-last-child(8) {
|
|
158
169
|
---child: 8;
|
|
159
170
|
}
|
|
160
171
|
|
|
161
|
-
menu > :nth-last-child(9) {
|
|
172
|
+
menu > li:nth-last-child(9) {
|
|
162
173
|
---child: 9;
|
|
163
174
|
}
|
|
164
175
|
|
|
165
|
-
menu > :nth-last-child(10) {
|
|
176
|
+
menu > li:nth-last-child(10) {
|
|
166
177
|
---child: 10;
|
|
167
178
|
}
|
|
168
179
|
|
|
169
|
-
menu > :nth-last-child(11) {
|
|
180
|
+
menu > li:nth-last-child(11) {
|
|
170
181
|
---child: 11;
|
|
171
182
|
}
|
|
172
183
|
|
|
173
|
-
menu > :nth-last-of-type(2) {
|
|
184
|
+
menu > li:nth-last-of-type(2) {
|
|
174
185
|
---type: 1;
|
|
175
186
|
}
|
|
176
187
|
|
|
177
|
-
menu > :nth-last-of-type(3) {
|
|
188
|
+
menu > li:nth-last-of-type(3) {
|
|
178
189
|
---type: 2;
|
|
179
190
|
}
|
|
180
191
|
|
|
181
|
-
menu > :nth-last-of-type(4) {
|
|
192
|
+
menu > li:nth-last-of-type(4) {
|
|
182
193
|
---type: 3;
|
|
183
194
|
}
|
|
184
195
|
|
|
185
|
-
menu > :nth-last-of-type(5) {
|
|
196
|
+
menu > li:nth-last-of-type(5) {
|
|
186
197
|
---type: 4;
|
|
187
198
|
}
|
|
188
199
|
|
|
189
|
-
menu > :nth-last-of-type(6) {
|
|
200
|
+
menu > li:nth-last-of-type(6) {
|
|
190
201
|
---type: 5;
|
|
191
202
|
}
|
|
192
203
|
|
|
193
|
-
menu > :nth-last-of-type(7) {
|
|
204
|
+
menu > li:nth-last-of-type(7) {
|
|
194
205
|
---type: 6;
|
|
195
206
|
}
|
|
196
207
|
|
|
197
|
-
menu > :nth-last-of-type(8) {
|
|
208
|
+
menu > li:nth-last-of-type(8) {
|
|
198
209
|
---type: 7;
|
|
199
210
|
}
|
|
200
211
|
|
|
201
|
-
menu > :nth-last-of-type(9) {
|
|
212
|
+
menu > li:nth-last-of-type(9) {
|
|
202
213
|
---type: 8;
|
|
203
214
|
}
|
|
204
215
|
|
|
205
|
-
menu > :nth-last-of-type(10) {
|
|
216
|
+
menu > li:nth-last-of-type(10) {
|
|
206
217
|
---type: 9;
|
|
207
218
|
}
|
|
208
219
|
|
|
209
|
-
menu > :nth-last-of-type(11) {
|
|
220
|
+
menu > li:nth-last-of-type(11) {
|
|
210
221
|
---type: 10;
|
|
211
222
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
.overlay
|
|
1
|
+
.overlay,
|
|
2
|
+
dialog::backdrop {
|
|
3
|
+
display: block !important;
|
|
2
4
|
opacity: 0;
|
|
3
5
|
visibility: hidden;
|
|
4
6
|
position: fixed;
|
|
@@ -9,7 +11,17 @@
|
|
|
9
11
|
transition: all var(--speed3), 0s background-color;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
.overlay.active
|
|
14
|
+
.overlay.active,
|
|
15
|
+
dialog:popover-open::backdrop {
|
|
13
16
|
opacity: 1;
|
|
14
17
|
visibility: visible;
|
|
15
18
|
}
|
|
19
|
+
|
|
20
|
+
.overlay + dialog::backdrop,
|
|
21
|
+
.snackbar::backdrop {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[popover] {
|
|
26
|
+
border: 0;
|
|
27
|
+
}
|
|
@@ -10,11 +10,24 @@
|
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
display: inline-flex;
|
|
12
12
|
align-items: center;
|
|
13
|
+
---size: 1.5rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:is(.checkbox, .radio, .switch).small {
|
|
17
|
+
---size: 1rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:is(.checkbox, .radio, .switch).large {
|
|
21
|
+
---size: 2rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:is(.checkbox, .radio, .switch).extra {
|
|
25
|
+
---size: 2.5rem;
|
|
13
26
|
}
|
|
14
27
|
|
|
15
28
|
:is(.checkbox, .radio) > input {
|
|
16
|
-
inline-size:
|
|
17
|
-
block-size:
|
|
29
|
+
inline-size: var(---size);
|
|
30
|
+
block-size: var(---size);
|
|
18
31
|
opacity: 0;
|
|
19
32
|
}
|
|
20
33
|
|
|
@@ -36,17 +49,18 @@
|
|
|
36
49
|
}
|
|
37
50
|
|
|
38
51
|
:is(.checkbox, .radio, .switch) > span::before,
|
|
39
|
-
.
|
|
52
|
+
:is(.checkbox, .radio, .switch) > span > i,
|
|
40
53
|
:is(.checkbox, .radio) > span::after {
|
|
54
|
+
---size: inherit;
|
|
41
55
|
content: '';
|
|
42
|
-
inline-size:
|
|
43
|
-
block-size:
|
|
56
|
+
inline-size: var(---size);
|
|
57
|
+
block-size: var(---size);
|
|
44
58
|
box-sizing: border-box;
|
|
45
59
|
margin: 0 auto;
|
|
46
60
|
outline: none;
|
|
47
61
|
color: var(--primary);
|
|
48
62
|
position: absolute;
|
|
49
|
-
inset: auto auto auto -1
|
|
63
|
+
inset: auto auto auto calc(var(---size) * -1);
|
|
50
64
|
border-radius: 50%;
|
|
51
65
|
user-select: none;
|
|
52
66
|
z-index: 1;
|
|
@@ -61,9 +75,10 @@
|
|
|
61
75
|
justify-content: center;
|
|
62
76
|
border-radius: 50%;
|
|
63
77
|
transition: all var(--speed2);
|
|
64
|
-
font-size:
|
|
78
|
+
font-size: calc(var(---size) - 0.5rem);
|
|
65
79
|
user-select: none;
|
|
66
|
-
min-inline-size:
|
|
80
|
+
min-inline-size: var(---size);
|
|
81
|
+
min-block-size: var(---size);
|
|
67
82
|
content: "";
|
|
68
83
|
color: var(--surface-variant);
|
|
69
84
|
background-color: var(--outline);
|
|
@@ -147,11 +162,17 @@
|
|
|
147
162
|
content: "check";
|
|
148
163
|
color: var(--primary);
|
|
149
164
|
background-color: var(--on-primary);
|
|
165
|
+
transform: translate(-1.75rem, -50%) scale(1);
|
|
150
166
|
}
|
|
151
167
|
|
|
152
|
-
.switch > input:
|
|
153
|
-
.switch.icon > input:
|
|
154
|
-
transform: translate(-
|
|
168
|
+
.switch > input:active:not(:disabled) + span::before,
|
|
169
|
+
.switch.icon > input:active:not(:disabled) + span > i {
|
|
170
|
+
transform: translate(-3rem, -50%) scale(1.2);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.switch > input:active:checked:not(:disabled) + span::before,
|
|
174
|
+
.switch.icon > input:active:checked:not(:disabled) + span > i {
|
|
175
|
+
transform: translate(-1.75rem, -50%) scale(1.2);
|
|
155
176
|
}
|
|
156
177
|
|
|
157
178
|
:is(.checkbox, .radio, .switch) > input:disabled + span {
|
|
@@ -169,9 +190,6 @@
|
|
|
169
190
|
inline-size: 3.25rem;
|
|
170
191
|
block-size: 2rem;
|
|
171
192
|
border-radius: 2rem;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.switch > span::after {
|
|
175
193
|
transform: translate(-3.25rem, -50%);
|
|
176
194
|
}
|
|
177
195
|
|
|
@@ -36,6 +36,13 @@ function updateAllRanges() {
|
|
|
36
36
|
for(let i=0; i<ranges.length; i++) updateRange(ranges[i]);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
function rootSizeInPixels(): number {
|
|
40
|
+
const size = getComputedStyle(document.documentElement).getPropertyValue("--size") || "16px";
|
|
41
|
+
if (size.indexOf("%") != -1) return (parseInt(size) * 16) / 100;
|
|
42
|
+
if (size.indexOf("em") != -1) return parseInt(size) * 16;
|
|
43
|
+
return parseInt(size);
|
|
44
|
+
}
|
|
45
|
+
|
|
39
46
|
function updateRange(input: HTMLInputElement) {
|
|
40
47
|
on(input, "focus", onFocusRange);
|
|
41
48
|
on(input, "blur", onBlurRange);
|
|
@@ -45,7 +52,7 @@ function updateRange(input: HTMLInputElement) {
|
|
|
45
52
|
const inputs = queryAll("input", label) as NodeListOf<HTMLInputElement>;
|
|
46
53
|
if (!inputs.length || !bar) return;
|
|
47
54
|
|
|
48
|
-
const rootSize =
|
|
55
|
+
const rootSize = rootSizeInPixels();
|
|
49
56
|
const thumb = hasClass(label, "max") ? 0 : 0.25 * rootSize * 100 / inputs[0].offsetWidth;
|
|
50
57
|
const percents: Array<number> = [];
|
|
51
58
|
const values: Array<number> = [];
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
color: var(--inverse-on-surface);
|
|
11
11
|
background-color: var(--inverse-surface);
|
|
12
12
|
padding: 1rem;
|
|
13
|
-
opacity: 1;
|
|
14
13
|
cursor: pointer;
|
|
15
14
|
text-align: start;
|
|
16
15
|
align-items: center;
|
|
@@ -25,7 +24,7 @@
|
|
|
25
24
|
inset: 6rem auto auto 50%;
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
.snackbar.active {
|
|
27
|
+
.snackbar:is(.active, :popover-open) {
|
|
29
28
|
visibility: visible;
|
|
30
29
|
transform: translate(-50%, 0);
|
|
31
30
|
opacity: 1;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
.tiny-space:not(nav, ol, ul, .row, .grid, table, .tooltip) {
|
|
1
|
+
.tiny-space:not(nav, ol, ul, .row, .grid, table, .tooltip, .list) {
|
|
2
2
|
block-size: 0.5rem;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
:is(.space, .small-space):not(nav, ol, ul, .row, .grid, table, .tooltip) {
|
|
5
|
+
:is(.space, .small-space):not(nav, ol, ul, .row, .grid, table, .tooltip, .list) {
|
|
6
6
|
block-size: 1rem;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.medium-space:not(nav, ol, ul, .row, .grid, table, .tooltip) {
|
|
9
|
+
.medium-space:not(nav, ol, ul, .row, .grid, table, .tooltip, .list) {
|
|
10
10
|
block-size: 2rem;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.large-space:not(nav, ol, ul, .row, .grid, table, .tooltip) {
|
|
13
|
+
.large-space:not(nav, ol, ul, .row, .grid, table, .tooltip, .list) {
|
|
14
14
|
block-size: 3rem;
|
|
15
15
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
font-display: block;
|
|
7
7
|
src:
|
|
8
8
|
url("../material-symbols-outlined.woff2") format("woff2"),
|
|
9
|
-
url("https://cdn.jsdelivr.net/npm/beercss@3.
|
|
9
|
+
url("https://cdn.jsdelivr.net/npm/beercss@3.9.0/dist/cdn/material-symbols-outlined.woff2") format("woff2");
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
/* rounded icons */
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
font-display: block;
|
|
18
18
|
src:
|
|
19
19
|
url("../material-symbols-rounded.woff2") format("woff2"),
|
|
20
|
-
url("https://cdn.jsdelivr.net/npm/beercss@3.
|
|
20
|
+
url("https://cdn.jsdelivr.net/npm/beercss@3.9.0/dist/cdn/material-symbols-rounded.woff2") format("woff2");
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/* sharp icons */
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
font-display: block;
|
|
29
29
|
src:
|
|
30
30
|
url("../material-symbols-sharp.woff2") format("woff2"),
|
|
31
|
-
url("https://cdn.jsdelivr.net/npm/beercss@3.
|
|
31
|
+
url("https://cdn.jsdelivr.net/npm/beercss@3.9.0/dist/cdn/material-symbols-sharp.woff2") format("woff2");
|
|
32
32
|
}
|