beercss 3.7.7 → 3.7.9

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.
@@ -2,19 +2,13 @@
2
2
  opacity: 0;
3
3
  visibility: hidden;
4
4
  position: fixed;
5
- inset: 0 auto auto 0;
6
- inline-size: 100%;
7
- block-size: 100%;
5
+ inset: 0;
8
6
  color: var(--on-surface);
9
7
  background-color: var(--overlay);
10
8
  z-index: 100;
11
9
  transition: all var(--speed3), 0s background-color;
12
10
  }
13
11
 
14
- nav > .overlay {
15
- z-index: 0;
16
- }
17
-
18
12
  .overlay.active {
19
13
  opacity: 1;
20
14
  visibility: visible;
@@ -1,5 +1,4 @@
1
- .page,
2
- :is(.page, dialog):not(.active) .page.active {
1
+ .page {
3
2
  ---transform: translate(0, 0);
4
3
 
5
4
  opacity: 0;
@@ -1,7 +1,4 @@
1
1
  .snackbar {
2
- ---transform-start: translate(-50%, 1rem);
3
- ---transform-end: translate(-50%, 0);
4
-
5
2
  position: fixed;
6
3
  inset: auto auto 6rem 50%;
7
4
  inline-size: 80%;
@@ -19,7 +16,9 @@
19
16
  align-items: center;
20
17
  border-radius: 0.25rem;
21
18
  gap: 0.5rem;
22
- transform: var(---transform-end);
19
+ transition: all var(--speed2);
20
+ transform: translate(-50%, 1rem);
21
+ opacity: 0;
23
22
  }
24
23
 
25
24
  .snackbar.top {
@@ -28,29 +27,14 @@
28
27
 
29
28
  .snackbar.active {
30
29
  visibility: visible;
31
- animation: var(--speed2) to-snackbar;
32
- }
33
-
34
- .snackbar.active.top {
35
- ---transform-end: translate(-50%, -1rem);
30
+ transform: translate(-50%, 0);
31
+ opacity: 1;
36
32
  }
37
33
 
38
34
  .snackbar > .max {
39
35
  flex: auto;
40
36
  }
41
37
 
42
- @keyframes to-snackbar {
43
- 0% {
44
- opacity: 0;
45
- transform: var(---transform-start);
46
- }
47
-
48
- 100% {
49
- opacity: 1;
50
- transform: var(---transform-end);
51
- }
52
- }
53
-
54
38
  @media only screen and (min-width: 993px) {
55
39
  .snackbar {
56
40
  inline-size: 40%;
@@ -1,3 +1,9 @@
1
+ .transparent {
2
+ background-color: transparent !important;
3
+ box-shadow: none !important;
4
+ color: inherit !important;
5
+ }
6
+
1
7
  .primary {
2
8
  background-color: var(--primary) !important;
3
9
  color: var(--on-primary) !important;
@@ -166,12 +172,6 @@
166
172
  color: #FFF !important;
167
173
  }
168
174
 
169
- .transparent {
170
- background-color: transparent !important;
171
- box-shadow: none !important;
172
- color: inherit !important;
173
- }
174
-
175
175
  .transparent-border {
176
176
  border-color: transparent !important;
177
177
  }
@@ -214,4 +214,5 @@ blockquote > code {
214
214
 
215
215
  pre:has(> code){
216
216
  direction: ltr;
217
+ text-align: start;
217
218
  }
@@ -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.7.7/dist/cdn/material-symbols-outlined.woff2") format("woff2");
9
+ url("https://cdn.jsdelivr.net/npm/beercss@3.7.9/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.7.7/dist/cdn/material-symbols-rounded.woff2") format("woff2");
20
+ url("https://cdn.jsdelivr.net/npm/beercss@3.7.9/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.7.7/dist/cdn/material-symbols-sharp.woff2") format("woff2");
31
+ url("https://cdn.jsdelivr.net/npm/beercss@3.7.9/dist/cdn/material-symbols-sharp.woff2") format("woff2");
32
32
  }
package/src/cdn/utils.ts CHANGED
@@ -1,8 +1,3 @@
1
- import { updateDialog } from "./elements/dialogs";
2
- import { updateMenu } from "./elements/menus";
3
- import { updatePage } from "./elements/pages";
4
- import { updateSnackbar } from "./elements/snackbars";
5
-
6
1
  const _emptyNodeList = [] as unknown as NodeListOf<Element>;
7
2
 
8
3
  export function isTouchable(): boolean {
@@ -118,45 +113,9 @@ export function updateAllClickable(element: Element) {
118
113
 
119
114
  const container = parent(element);
120
115
  if (!hasClass(container, "tabs") && !hasClass(container, "tabbed") && !hasTag(container, "nav")) return;
121
-
116
+
122
117
  const as = queryAll("a", container);
123
118
  for(let i=0; i<as.length; i++) removeClass(as[i], "active");
124
119
  addClass(element, "active");
125
120
  }
126
121
 
127
- export async function run(from: Element, to: Element | null, options?: any, e?: Event): Promise<void> {
128
- if (!to) {
129
- to = query(from.getAttribute("data-ui"));
130
- if (!to) return;
131
- }
132
-
133
- updateAllClickable(from);
134
-
135
- if (hasTag(to, "dialog")) {
136
- await updateDialog(from, to as HTMLDialogElement);
137
- return;
138
- }
139
-
140
- if (hasTag(to, "menu")) {
141
- updateMenu(from, to as HTMLMenuElement, e);
142
- return;
143
- }
144
-
145
- if (hasClass(to, "snackbar")) {
146
- updateSnackbar(to, options as number);
147
- return;
148
- }
149
-
150
- if (hasClass(to, "page")) {
151
- updatePage(to);
152
- return;
153
- }
154
-
155
- if (hasClass(to, "active")) {
156
- removeClass(from, "active");
157
- removeClass(to, "active");
158
- return;
159
- }
160
-
161
- addClass(to, "active");
162
- }