beercss 3.13.1 → 3.13.3
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 +15 -9
- package/custom-element/index.d.ts +2 -2
- package/dist/cdn/beer.css +11 -8
- package/dist/cdn/beer.custom-element.js +2 -2
- package/dist/cdn/beer.custom-element.min.js +1 -1
- package/dist/cdn/beer.js +2 -2
- package/dist/cdn/beer.min.css +1 -1
- package/dist/cdn/beer.min.js +1 -1
- package/dist/cdn/beer.scoped.css +11 -8
- package/dist/cdn/beer.scoped.min.css +1 -1
- package/index.d.ts +2 -2
- package/package.json +2 -2
- package/scoped/index.d.ts +2 -2
- package/src/cdn/beer.ts +1 -1
- package/src/cdn/customElement.js +2 -2
- package/src/cdn/elements/bars.css +1 -1
- package/src/cdn/elements/fields.ts +3 -2
- package/src/cdn/elements/navigations.css +3 -1
- package/src/cdn/helpers/reset.css +2 -1
- package/src/cdn/helpers/theme.ts +1 -1
- package/src/cdn/settings/fonts.css +4 -4
- package/src/cdn/settings/globals.css +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<p align="center">
|
|
5
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
6
|
<a href="https://github.com/beercss/beercss"><img src="https://img.shields.io/jsdelivr/npm/hy/beercss" alt="Downloads"></a>
|
|
7
|
-
<a href="https://bundlephobia.com/package/beercss@3.13.
|
|
7
|
+
<a href="https://bundlephobia.com/package/beercss@3.13.3" target="_blank"><img src="https://img.shields.io/bundlephobia/minzip/beercss@3.13.3" alt="minzipped size"></a>
|
|
8
8
|
<a href="https://www.npmjs.com/package/beercss"><img src="https://img.shields.io/npm/v/beercss" alt="Version"></a>
|
|
9
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
10
|
<a href="https://github.com/beercss/beercss/issues"><img src="https://img.shields.io/github/issues/beercss/beercss" alt="Issues"></a>
|
|
@@ -23,8 +23,14 @@ Cheers, www.beercss.com
|
|
|
23
23
|
Beer CSS is an MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome sponsors and backers. If you'd like to join them, please consider sponsoring Beer CSS's development.
|
|
24
24
|
|
|
25
25
|
<p align="center">
|
|
26
|
+
<a href="https://opencollective.com/beercss">Open Collective</a><br /><br />
|
|
26
27
|
<img src="https://opencollective.com/beercss/sponsors.svg?avatarHeight=56&button=false" alt="Sponsors">
|
|
27
28
|
<img src="https://opencollective.com/beercss/backers.svg?avatarHeight=56&button=false" alt="Sponsors">
|
|
29
|
+
</p>
|
|
30
|
+
|
|
31
|
+
<p align="center">
|
|
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/12303444?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
|
|
28
34
|
<img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/40445940?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
|
|
29
35
|
<img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/74856856?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
|
|
30
36
|
<img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/419690?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
|
|
@@ -132,8 +138,8 @@ This project was guided by the **"Germany Beer Purity Law"** or **"Reinheitsgebo
|
|
|
132
138
|
### DEFAULT VERSION
|
|
133
139
|
|
|
134
140
|
```html
|
|
135
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
136
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
141
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@3.13.3/dist/cdn/beer.min.css" rel="stylesheet" />
|
|
142
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.3/dist/cdn/beer.min.js"></script>
|
|
137
143
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
138
144
|
```
|
|
139
145
|
|
|
@@ -151,8 +157,8 @@ import "material-dynamic-colors";
|
|
|
151
157
|
Applied on child elements of `<* class="beer">...</*>`.
|
|
152
158
|
|
|
153
159
|
```html
|
|
154
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
155
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
160
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@3.13.3/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
|
|
161
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.3/dist/cdn/beer.min.js"></script>
|
|
156
162
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
157
163
|
```
|
|
158
164
|
|
|
@@ -170,7 +176,7 @@ import "material-dynamic-colors";
|
|
|
170
176
|
Applied on child elements of `<beer-css>...</beer-css>`.
|
|
171
177
|
|
|
172
178
|
```html
|
|
173
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
179
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.3/dist/cdn/beer.custom-element.min.js"></script>
|
|
174
180
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
175
181
|
```
|
|
176
182
|
|
|
@@ -186,7 +192,7 @@ import "material-dynamic-colors";
|
|
|
186
192
|
|
|
187
193
|
### LOCAL CDN VERSION
|
|
188
194
|
|
|
189
|
-
Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
195
|
+
Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@3.13.3/dist/cdn/ and https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/. Now put the files inside a new folder in your project (like `/beercss` for example):
|
|
190
196
|
|
|
191
197
|
```html
|
|
192
198
|
<link href="/beercss/beer.min.css" rel="stylesheet" />
|
|
@@ -206,8 +212,8 @@ You can use this html to setup your project. See on [Codepen](https://codepen.io
|
|
|
206
212
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
207
213
|
<meta name="google" content="notranslate">
|
|
208
214
|
<title>Hello world</title>
|
|
209
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
210
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
215
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@3.13.3/dist/cdn/beer.min.css" rel="stylesheet">
|
|
216
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.3/dist/cdn/beer.min.js"></script>
|
|
211
217
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
212
218
|
</head>
|
|
213
219
|
<body class="dark">
|
|
@@ -4,7 +4,7 @@ declare global {
|
|
|
4
4
|
light: string,
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
function ui(selector?: string | Element, options?: string | number | IBeerCssTheme): string |
|
|
7
|
+
function ui(selector?: string | Element, options?: string | number | IBeerCssTheme): string | undefined | Promise<IBeerCssTheme>;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
declare module "ui";
|
|
@@ -14,6 +14,6 @@ export interface IBeerCssTheme {
|
|
|
14
14
|
light: string,
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export function ui(selector?: string | Element, options?: string | number | IBeerCssTheme): string |
|
|
17
|
+
export function ui(selector?: string | Element, options?: string | number | IBeerCssTheme): string | undefined | Promise<IBeerCssTheme>;
|
|
18
18
|
|
|
19
19
|
export default ui;
|
package/dist/cdn/beer.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--size: 1rem;
|
|
3
|
-
--font: Inter, Roboto, "Helvetica Neue", "Arial Nova", "Nimbus Sans", Noto Sans, Arial, sans-serif;
|
|
3
|
+
--font: Inter, Roboto, "Helvetica Neue", "Arial Nova", "Nimbus Sans", "Noto Sans", Arial, sans-serif;
|
|
4
4
|
--font-icon: "Material Symbols Outlined";
|
|
5
5
|
--speed1: 0.1s;
|
|
6
6
|
--speed2: 0.2s;
|
|
@@ -99,7 +99,7 @@ body.dark {
|
|
|
99
99
|
font-style: normal;
|
|
100
100
|
font-weight: 400;
|
|
101
101
|
font-display: block;
|
|
102
|
-
src: url(material-symbols-outlined.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
102
|
+
src: url(material-symbols-outlined.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.3/dist/cdn/material-symbols-outlined.woff2) format("woff2");
|
|
103
103
|
}
|
|
104
104
|
/* rounded icons */
|
|
105
105
|
@font-face {
|
|
@@ -107,7 +107,7 @@ body.dark {
|
|
|
107
107
|
font-style: normal;
|
|
108
108
|
font-weight: 400;
|
|
109
109
|
font-display: block;
|
|
110
|
-
src: url(material-symbols-rounded.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
110
|
+
src: url(material-symbols-rounded.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.3/dist/cdn/material-symbols-rounded.woff2) format("woff2");
|
|
111
111
|
}
|
|
112
112
|
/* sharp icons */
|
|
113
113
|
@font-face {
|
|
@@ -115,7 +115,7 @@ body.dark {
|
|
|
115
115
|
font-style: normal;
|
|
116
116
|
font-weight: 400;
|
|
117
117
|
font-display: block;
|
|
118
|
-
src: url(material-symbols-sharp.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
118
|
+
src: url(material-symbols-sharp.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.3/dist/cdn/material-symbols-sharp.woff2) format("woff2");
|
|
119
119
|
}
|
|
120
120
|
/* subset of only required icons */
|
|
121
121
|
@font-face {
|
|
@@ -123,7 +123,7 @@ body.dark {
|
|
|
123
123
|
font-style: normal;
|
|
124
124
|
font-weight: 400;
|
|
125
125
|
font-display: block;
|
|
126
|
-
src: url(material-symbols-subset.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
126
|
+
src: url(material-symbols-subset.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.13.3/dist/cdn/material-symbols-subset.woff2) format("woff2");
|
|
127
127
|
}
|
|
128
128
|
* {
|
|
129
129
|
-webkit-tap-highlight-color: transparent;
|
|
@@ -169,9 +169,10 @@ button,
|
|
|
169
169
|
outline: inherit;
|
|
170
170
|
justify-content: center;
|
|
171
171
|
}
|
|
172
|
-
a,
|
|
172
|
+
:is(nav, .tabs, .field) > a,
|
|
173
173
|
button,
|
|
174
174
|
.button,
|
|
175
|
+
.chip,
|
|
175
176
|
i,
|
|
176
177
|
label {
|
|
177
178
|
user-select: none;
|
|
@@ -1806,7 +1807,7 @@ nav.bottom ~ footer {
|
|
|
1806
1807
|
padding-block: 0;
|
|
1807
1808
|
}
|
|
1808
1809
|
nav.top ~ header.fixed {
|
|
1809
|
-
inset-block: calc(var(--top)
|
|
1810
|
+
inset-block: calc(var(--top) + 4.5rem) 0;
|
|
1810
1811
|
}
|
|
1811
1812
|
nav.bottom ~ footer.fixed {
|
|
1812
1813
|
inset-block: 0 calc(var(--bottom) + 4.5rem);
|
|
@@ -3220,7 +3221,9 @@ nav.row {
|
|
|
3220
3221
|
margin: 0;
|
|
3221
3222
|
}
|
|
3222
3223
|
:is(nav, .row, .max) > :only-child,
|
|
3223
|
-
|
|
3224
|
+
:is(nav, .row, .max) > span > *,
|
|
3225
|
+
nav > :is(ol, ul) > li > :only-child,
|
|
3226
|
+
nav > :is(ol, ul) > li > span > * {
|
|
3224
3227
|
margin: 0;
|
|
3225
3228
|
}
|
|
3226
3229
|
:is(nav, .row) > :not(ul, ol, header, footer) {
|
|
@@ -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@3.13.
|
|
15
|
+
return await import("https://cdn.jsdelivr.net/npm/beercss@3.13.3/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@3.13.
|
|
26
|
+
element.setAttribute("href", "https://cdn.jsdelivr.net/npm/beercss@3.13.3/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@3.13.
|
|
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@3.13.3/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@3.13.3/dist/cdn/beer.scoped.min.css");element.setAttribute("rel", "stylesheet");head.appendChild(element);}async run() {this.classList.add("beer");await Promise.all([this.addJs(), this.addCss()]);ui();}}customElements.define("beer-css", BeerCssCustomElement);export default BeerCssCustomElement;
|
package/dist/cdn/beer.js
CHANGED
|
@@ -193,11 +193,11 @@ function updateAllColors() {
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
function updateAllTextareas() {
|
|
196
|
-
if (isChrome && !isMac && !isIOS) return;
|
|
197
196
|
const textareas = queryAll(".field > textarea");
|
|
198
197
|
for (let i = 0; i < textareas.length; i++) {
|
|
199
198
|
onWeak(textareas[i], "focus", onFocusInput);
|
|
200
199
|
onWeak(textareas[i], "blur", onBlurInput);
|
|
200
|
+
if (isChrome && !isMac && !isIOS) continue;
|
|
201
201
|
onWeak(textareas[i], "input", onInputTextarea);
|
|
202
202
|
updateTextarea(textareas[i]);
|
|
203
203
|
}
|
|
@@ -344,7 +344,7 @@ function lastTheme() {
|
|
|
344
344
|
body.removeChild(dark);
|
|
345
345
|
return _lastTheme;
|
|
346
346
|
}
|
|
347
|
-
function updateTheme(source) {
|
|
347
|
+
async function updateTheme(source) {
|
|
348
348
|
const context = globalThis;
|
|
349
349
|
const body = document.body;
|
|
350
350
|
if (!source || !context.materialDynamicColors) return lastTheme();
|