beercss 4.0.0 → 4.0.2
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 +24 -22
- package/dist/cdn/arch.svg +1 -3
- package/dist/cdn/arrow.svg +1 -3
- package/dist/cdn/beer.css +11 -9
- package/dist/cdn/beer.custom-element.js +2 -2
- package/dist/cdn/beer.custom-element.min.js +1 -1
- package/dist/cdn/beer.min.css +1 -1
- package/dist/cdn/beer.scoped.css +11 -9
- package/dist/cdn/beer.scoped.min.css +2 -2
- package/dist/cdn/boom.svg +1 -3
- package/dist/cdn/bun.svg +1 -3
- package/dist/cdn/burst.svg +1 -3
- package/dist/cdn/circle.svg +1 -3
- package/dist/cdn/clamshell.svg +1 -3
- package/dist/cdn/diamond.svg +1 -3
- package/dist/cdn/fan.svg +1 -3
- package/dist/cdn/flower.svg +1 -3
- package/dist/cdn/gem.svg +1 -3
- package/dist/cdn/ghost-ish.svg +1 -3
- package/dist/cdn/heart.svg +1 -3
- package/dist/cdn/leaf-clover4.svg +1 -3
- package/dist/cdn/leaf-clover8.svg +1 -3
- package/dist/cdn/loading-indicator.svg +1 -19
- package/dist/cdn/oval.svg +1 -3
- package/dist/cdn/pentagon.svg +1 -3
- package/dist/cdn/pill.svg +1 -3
- package/dist/cdn/pixel-circle.svg +1 -3
- package/dist/cdn/pixel-triangle.svg +1 -3
- package/dist/cdn/puffy-diamond.svg +1 -3
- package/dist/cdn/puffy.svg +1 -3
- package/dist/cdn/semicircle.svg +1 -3
- package/dist/cdn/sided-cookie12.svg +1 -3
- package/dist/cdn/sided-cookie4.svg +1 -3
- package/dist/cdn/sided-cookie6.svg +1 -3
- package/dist/cdn/sided-cookie7.svg +1 -3
- package/dist/cdn/sided-cookie9.svg +1 -3
- package/dist/cdn/slanted.svg +1 -3
- package/dist/cdn/soft-boom.svg +1 -3
- package/dist/cdn/soft-burst.svg +1 -3
- package/dist/cdn/square.svg +1 -3
- package/dist/cdn/sunny.svg +1 -3
- package/dist/cdn/triangle.svg +1 -3
- package/dist/cdn/very-sunny.svg +1 -3
- package/dist/cdn/wavy-circle.svg +1 -4
- package/dist/cdn/wavy.svg +1 -5
- package/package.json +2 -1
- package/src/cdn/customElement.js +2 -2
- package/src/cdn/elements/fields.css +7 -1
- package/src/cdn/helpers/forms.css +0 -4
- package/src/cdn/settings/fonts.css +4 -4
- package/src/cdn/shapes/arch.svg +1 -3
- package/src/cdn/shapes/arrow.svg +1 -3
- package/src/cdn/shapes/boom.svg +1 -3
- package/src/cdn/shapes/bun.svg +1 -3
- package/src/cdn/shapes/burst.svg +1 -3
- package/src/cdn/shapes/circle.svg +1 -3
- package/src/cdn/shapes/clamshell.svg +1 -3
- package/src/cdn/shapes/diamond.svg +1 -3
- package/src/cdn/shapes/fan.svg +1 -3
- package/src/cdn/shapes/flower.svg +1 -3
- package/src/cdn/shapes/gem.svg +1 -3
- package/src/cdn/shapes/ghost-ish.svg +1 -3
- package/src/cdn/shapes/heart.svg +1 -3
- package/src/cdn/shapes/leaf-clover4.svg +1 -3
- package/src/cdn/shapes/leaf-clover8.svg +1 -3
- package/src/cdn/shapes/loading-indicator.svg +1 -19
- package/src/cdn/shapes/oval.svg +1 -3
- package/src/cdn/shapes/pentagon.svg +1 -3
- package/src/cdn/shapes/pill.svg +1 -3
- package/src/cdn/shapes/pixel-circle.svg +1 -3
- package/src/cdn/shapes/pixel-triangle.svg +1 -3
- package/src/cdn/shapes/puffy-diamond.svg +1 -3
- package/src/cdn/shapes/puffy.svg +1 -3
- package/src/cdn/shapes/semicircle.svg +1 -3
- package/src/cdn/shapes/sided-cookie12.svg +1 -3
- package/src/cdn/shapes/sided-cookie4.svg +1 -3
- package/src/cdn/shapes/sided-cookie6.svg +1 -3
- package/src/cdn/shapes/sided-cookie7.svg +1 -3
- package/src/cdn/shapes/sided-cookie9.svg +1 -3
- package/src/cdn/shapes/slanted.svg +1 -3
- package/src/cdn/shapes/soft-boom.svg +1 -3
- package/src/cdn/shapes/soft-burst.svg +1 -3
- package/src/cdn/shapes/square.svg +1 -3
- package/src/cdn/shapes/sunny.svg +1 -3
- package/src/cdn/shapes/triangle.svg +1 -3
- package/src/cdn/shapes/very-sunny.svg +1 -3
- package/src/cdn/shapes/wavy-circle.svg +1 -4
- package/src/cdn/shapes/wavy.svg +1 -5
package/README.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
<a href="https://www.beercss.com" target="_blank" rel="noopener noreferrer"><img src="https://www.beercss.com/logo.png" alt="Beer CSS logo"></a>
|
|
3
3
|
</p>
|
|
4
4
|
<p align="center">
|
|
5
|
-
<a href="https://github.com/beercss/beercss/blob/main/LICENSE"><img src="https://img.shields.io/github/license/beercss/beercss" alt="
|
|
6
|
-
<a href="https://github.com/beercss/beercss"><img src="https://img.shields.io/jsdelivr/npm/hy/beercss" alt="
|
|
7
|
-
<a
|
|
8
|
-
<a href="https://www.npmjs.com/package/beercss"><img src="https://img.shields.io/npm/v/beercss" alt="
|
|
9
|
-
<a href="https://github.com/beercss/beercss/pulls"><img src="https://img.shields.io/github/issues-pr/beercss/beercss" alt="
|
|
10
|
-
<a href="https://github.com/beercss/beercss/issues"><img src="https://img.shields.io/github/issues/beercss/beercss" alt="
|
|
5
|
+
<a href="https://github.com/beercss/beercss/blob/main/LICENSE"><img src="https://img.shields.io/github/license/beercss/beercss" alt="license"></a>
|
|
6
|
+
<a href="https://github.com/beercss/beercss"><img src="https://img.shields.io/jsdelivr/npm/hy/beercss" alt="downloads"></a>
|
|
7
|
+
<a><img src="https://img.shields.io/badge/brotli_size-14.4kb-green" alt="brotli size"></a>
|
|
8
|
+
<a href="https://www.npmjs.com/package/beercss"><img src="https://img.shields.io/npm/v/beercss" alt="version"></a>
|
|
9
|
+
<a href="https://github.com/beercss/beercss/pulls"><img src="https://img.shields.io/github/issues-pr/beercss/beercss" alt="pull Request"></a>
|
|
10
|
+
<a href="https://github.com/beercss/beercss/issues"><img src="https://img.shields.io/github/issues/beercss/beercss" alt="issues"></a>
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
# Beer CSS
|
|
@@ -30,6 +30,7 @@ Beer CSS is an MIT-licensed open source project with its ongoing development mad
|
|
|
30
30
|
|
|
31
31
|
<p align="center">
|
|
32
32
|
<a href="https://github.com/sponsors/beercss">Github Sponsors</a><br /><br />
|
|
33
|
+
<img src="https://images.weserv.nl/?url=/avatars.githubusercontent.com/u/96993393?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
|
|
33
34
|
<img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/15235526?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
|
|
34
35
|
<img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/12303444?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
|
|
35
36
|
<img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/40445940?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
|
|
@@ -50,8 +51,8 @@ Beer CSS is an MIT-licensed open source project with its ongoing development mad
|
|
|
50
51
|
- 🎯 Highly focused on DX.
|
|
51
52
|
- 🚫 No build steps, configurations or dependencies.
|
|
52
53
|
- ✨ Build modern interfaces without any custom CSS.
|
|
53
|
-
- ✅
|
|
54
|
-
- 💯 Google Lighthouse friendly
|
|
54
|
+
- ✅ Compliance with web standards.
|
|
55
|
+
- 💯 Google Lighthouse friendly.
|
|
55
56
|
|
|
56
57
|
# A lightweight beer
|
|
57
58
|
|
|
@@ -83,8 +84,8 @@ This project was guided by the **"Germany Beer Purity Law"** or **"Reinheitsgebo
|
|
|
83
84
|
### DEFAULT VERSION
|
|
84
85
|
|
|
85
86
|
```html
|
|
86
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
87
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
87
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/beer.min.css" rel="stylesheet" />
|
|
88
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/beer.min.js"></script>
|
|
88
89
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.4/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
89
90
|
```
|
|
90
91
|
|
|
@@ -102,8 +103,8 @@ import "material-dynamic-colors";
|
|
|
102
103
|
Applied on child elements of `<* class="beer">...</*>`.
|
|
103
104
|
|
|
104
105
|
```html
|
|
105
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
106
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
106
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
|
|
107
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/beer.min.js"></script>
|
|
107
108
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.4/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
108
109
|
```
|
|
109
110
|
|
|
@@ -121,7 +122,7 @@ import "material-dynamic-colors";
|
|
|
121
122
|
Applied on child elements of `<beer-css>...</beer-css>`.
|
|
122
123
|
|
|
123
124
|
```html
|
|
124
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
125
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/beer.custom-element.min.js"></script>
|
|
125
126
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.4/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
126
127
|
```
|
|
127
128
|
|
|
@@ -137,7 +138,7 @@ import "material-dynamic-colors";
|
|
|
137
138
|
|
|
138
139
|
### LOCAL CDN VERSION
|
|
139
140
|
|
|
140
|
-
Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
141
|
+
Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/ and https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.4/dist/cdn/. Now put the files inside a new folder in your project (like `/beercss` for example):
|
|
141
142
|
|
|
142
143
|
```html
|
|
143
144
|
<link href="/beercss/beer.min.css" rel="stylesheet" />
|
|
@@ -150,22 +151,23 @@ Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@4.0.0/dist/cdn/
|
|
|
150
151
|
You can use this html to setup your project. See on [Codepen](https://codepen.io/leo-bnu/pen/yLKLPxj). More about in [Main layout](docs/MAIN_LAYOUT.md).
|
|
151
152
|
|
|
152
153
|
```html
|
|
153
|
-
|
|
154
|
+
<!DOCTYPE html>
|
|
155
|
+
<html lang="en">
|
|
154
156
|
<head>
|
|
155
157
|
<meta charset="UTF-8">
|
|
156
158
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
157
159
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
158
160
|
<meta name="google" content="notranslate">
|
|
159
161
|
<title>Hello world</title>
|
|
160
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
161
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
162
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/beer.min.css" rel="stylesheet">
|
|
163
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/beer.min.js"></script>
|
|
162
164
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.4/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
163
165
|
</head>
|
|
164
166
|
<body class="dark">
|
|
165
167
|
<nav class="left max l">
|
|
166
168
|
<header>
|
|
167
169
|
<nav>
|
|
168
|
-
<img src="https://www.beercss.com/favicon.png" class="circle extra">
|
|
170
|
+
<img alt="logo" src="https://www.beercss.com/favicon.png" class="circle extra">
|
|
169
171
|
<h6>Cheers</h6>
|
|
170
172
|
</nav>
|
|
171
173
|
</header>
|
|
@@ -202,7 +204,7 @@ You can use this html to setup your project. See on [Codepen](https://codepen.io
|
|
|
202
204
|
|
|
203
205
|
<nav class="left m">
|
|
204
206
|
<header>
|
|
205
|
-
<img src="https://www.beercss.com/favicon.png" class="circle extra">
|
|
207
|
+
<img alt="logo" src="https://www.beercss.com/favicon.png" class="circle extra">
|
|
206
208
|
</header>
|
|
207
209
|
<a>
|
|
208
210
|
<i>home</i>
|
|
@@ -238,15 +240,15 @@ You can use this html to setup your project. See on [Codepen](https://codepen.io
|
|
|
238
240
|
</nav>
|
|
239
241
|
|
|
240
242
|
<main class="responsive">
|
|
241
|
-
<img src="https://www.beercss.com/beer-and-woman.svg" class="responsive round medium-height">
|
|
243
|
+
<img alt="beer and woman" src="https://www.beercss.com/beer-and-woman.svg" class="responsive round medium-height">
|
|
242
244
|
<h3>Welcome</h3>
|
|
243
|
-
<
|
|
245
|
+
<h4>The beer is ready!</h4>
|
|
244
246
|
</main>
|
|
245
247
|
</body>
|
|
246
248
|
</html>
|
|
247
249
|
```
|
|
248
250
|
|
|
249
|
-
**
|
|
251
|
+
**The `beer.min.js` and `material-dynamic-colors.min.js` are optional, but could be required for some use cases.**
|
|
250
252
|
|
|
251
253
|
### ✅ DO:
|
|
252
254
|
|
package/dist/cdn/arch.svg
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
<svg width="304" height="304" viewBox="0 0 304 304" fill="
|
|
2
|
-
<path d="M304 253.72C304 259.83 304 262.89 303.69 265.46C301.31 285.51 285.51 301.31 265.46 303.69C262.89 304 259.83 304 253.72 304H50.281C44.169 304 41.113 304 38.544 303.69C18.495 301.31 2.68799 285.51 0.304993 265.46C-7.33137e-06 262.89 0 259.83 0 253.72V152C0 68.05 68.053 0 152 0C235.95 0 304 68.05 304 152V253.72Z" fill="#D0BCFF"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="304" height="304" fill="none" viewBox="0 0 304 304"><path fill="#d0bcff" d="M304 253.72c0 6.11 0 9.17-.31 11.74-2.38 20.05-18.18 35.85-38.23 38.23-2.57.31-5.63.31-11.74.31H50.281c-6.112 0-9.168 0-11.737-.31-20.049-2.38-35.856-18.18-38.239-38.23C0 262.89 0 259.83 0 253.72V152C0 68.05 68.053 0 152 0c83.95 0 152 68.05 152 152z"/></svg>
|
package/dist/cdn/arrow.svg
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
<svg width="316" height="278" viewBox="0 0 316 278" fill="
|
|
2
|
-
<path d="M271.57 122.2C257.552 100.62 243.535 79.01 229.517 57.43C220.423 43.42 211.167 29.2202 198.872 18.0902C186.576 6.94018 170.648 -0.939823 154.316 0.0901773C139.976 1.01018 126.684 8.72013 116.191 18.7901C105.698 28.8601 97.546 41.2601 89.528 53.5401C67.842 86.7201 46.13 119.9 24.444 153.1C14.139 168.86 3.56499 185.31 0.712987 204.09C-2.73101 226.78 6.55198 249.89 23.018 264.98C40.237 280.76 68.138 279.48 89.098 275.16C112.075 270.41 134.541 261.48 157.975 261.51C178.047 261.51 197.446 268.11 216.979 272.91C236.485 277.68 257.445 280.62 276.279 273.52C299.659 264.73 316.448 239.73 315.991 214.07C315.56 190.66 302.457 169.75 289.839 150.27C283.758 140.92 277.678 131.55 271.597 122.2H271.57Z" fill="#D0BCFF"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="316" height="278" fill="none" viewBox="0 0 316 278"><path fill="#d0bcff" d="M271.57 122.2c-14.018-21.58-28.035-43.19-42.053-64.77-9.094-14.01-18.35-28.21-30.645-39.34-12.296-11.15-28.224-19.03-44.556-18-14.34.92-27.632 8.63-38.125 18.7S97.546 41.26 89.528 53.54C67.842 86.72 46.13 119.9 24.444 153.1 14.139 168.86 3.565 185.31.713 204.09c-3.444 22.69 5.839 45.8 22.305 60.89 17.219 15.78 45.12 14.5 66.08 10.18 22.977-4.75 45.443-13.68 68.877-13.65 20.072 0 39.471 6.6 59.004 11.4 19.506 4.77 40.466 7.71 59.3.61 23.38-8.79 40.169-33.79 39.712-59.45-.431-23.41-13.534-44.32-26.152-63.8-6.081-9.35-12.161-18.72-18.242-28.07z"/></svg>
|
package/dist/cdn/beer.css
CHANGED
|
@@ -140,7 +140,7 @@ body.dark {
|
|
|
140
140
|
font-style: normal;
|
|
141
141
|
font-weight: 400;
|
|
142
142
|
font-display: swap;
|
|
143
|
-
src: url(material-symbols-outlined.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
143
|
+
src: url(material-symbols-outlined.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/material-symbols-outlined.woff2) format("woff2");
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
/* rounded icons */
|
|
@@ -150,7 +150,7 @@ body.dark {
|
|
|
150
150
|
font-style: normal;
|
|
151
151
|
font-weight: 400;
|
|
152
152
|
font-display: swap;
|
|
153
|
-
src: url(material-symbols-rounded.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
153
|
+
src: url(material-symbols-rounded.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/material-symbols-rounded.woff2) format("woff2");
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
/* sharp icons */
|
|
@@ -160,7 +160,7 @@ body.dark {
|
|
|
160
160
|
font-style: normal;
|
|
161
161
|
font-weight: 400;
|
|
162
162
|
font-display: swap;
|
|
163
|
-
src: url(material-symbols-sharp.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
163
|
+
src: url(material-symbols-sharp.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/material-symbols-sharp.woff2) format("woff2");
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
/* subset of only required icons */
|
|
@@ -170,7 +170,7 @@ body.dark {
|
|
|
170
170
|
font-style: normal;
|
|
171
171
|
font-weight: 400;
|
|
172
172
|
font-display: swap;
|
|
173
|
-
src: url(material-symbols-subset.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
173
|
+
src: url(material-symbols-subset.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/material-symbols-subset.woff2) format("woff2");
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
/* begin scoped */
|
|
@@ -1541,10 +1541,6 @@ div:is(:not([class]), [class=active]):has(> :not(.responsive) ~ :is(menu, .toolt
|
|
|
1541
1541
|
border-color: transparent !important;
|
|
1542
1542
|
}
|
|
1543
1543
|
|
|
1544
|
-
.border:not(.extend, .circle, .square, .badge) {
|
|
1545
|
-
box-sizing: content-box;
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
1544
|
.margin,
|
|
1549
1545
|
[class*=-margin]:not(.left-margin, .right-margin, .top-margin, .bottom-margin, .horizontal-margin, .vertical-margin) {
|
|
1550
1546
|
margin: var(--_margin) !important;
|
|
@@ -3131,10 +3127,16 @@ input[type=number] {
|
|
|
3131
3127
|
padding: 0.25rem 1.5rem;
|
|
3132
3128
|
}
|
|
3133
3129
|
|
|
3134
|
-
.field.invalid > output:not(.invalid)
|
|
3130
|
+
.field.invalid > output:not(.invalid),
|
|
3131
|
+
.field:not(.invalid) > output.invalid {
|
|
3135
3132
|
display: none;
|
|
3136
3133
|
}
|
|
3137
3134
|
|
|
3135
|
+
.field.invalid > output.invalid ~ menu,
|
|
3136
|
+
.field:not(.invalid) > output:not(.invalid) ~ menu {
|
|
3137
|
+
inset: auto auto 1.75rem 0;
|
|
3138
|
+
}
|
|
3139
|
+
|
|
3138
3140
|
table td > .field {
|
|
3139
3141
|
margin: 0;
|
|
3140
3142
|
}
|
|
@@ -12,7 +12,7 @@ class BeerCssCustomElement extends HTMLElement {
|
|
|
12
12
|
BeerCssCustomElement.isJsLoaded = true;
|
|
13
13
|
|
|
14
14
|
if (window.ui) return;
|
|
15
|
-
return await import("https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
15
|
+
return await import("https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/beer.min.js");
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
async addCss() {
|
|
@@ -23,7 +23,7 @@ class BeerCssCustomElement extends HTMLElement {
|
|
|
23
23
|
|
|
24
24
|
const head = document.querySelector("head");
|
|
25
25
|
const element = document.createElement("link");
|
|
26
|
-
element.setAttribute("href", "https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
26
|
+
element.setAttribute("href", "https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/beer.scoped.min.css");
|
|
27
27
|
element.setAttribute("rel", "stylesheet");
|
|
28
28
|
head.appendChild(element);
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
class BeerCssCustomElement extends HTMLElement {static isCssLoaded = false;static isJsLoaded = false;constructor() {super();this.run();}async addJs() {if (BeerCssCustomElement.isJsLoaded) return;BeerCssCustomElement.isJsLoaded = true;if (window.ui) return;return await import("https://cdn.jsdelivr.net/npm/beercss@4.0.
|
|
1
|
+
class BeerCssCustomElement extends HTMLElement {static isCssLoaded = false;static isJsLoaded = false;constructor() {super();this.run();}async addJs() {if (BeerCssCustomElement.isJsLoaded) return;BeerCssCustomElement.isJsLoaded = true;if (window.ui) return;return await import("https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/beer.min.js");}async addCss() {if (BeerCssCustomElement.isCssLoaded) return;BeerCssCustomElement.isCssLoaded = true;const isScoped = !!getComputedStyle(document.documentElement).getPropertyValue("--scoped");if (isScoped) return;const head = document.querySelector("head");const element = document.createElement("link");element.setAttribute("href", "https://cdn.jsdelivr.net/npm/beercss@4.0.2/dist/cdn/beer.scoped.min.css");element.setAttribute("rel", "stylesheet");head.appendChild(element);}async run() {await Promise.all([this.addJs(), this.addCss()]);ui();}}customElements.define("beer-css", BeerCssCustomElement);export default BeerCssCustomElement;
|