beercss 3.11.24 → 3.11.26

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 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.11.24" target="_blank"><img src="https://img.shields.io/bundlephobia/minzip/beercss@3.11.24" alt="minzipped size"></a>
7
+ <a href="https://bundlephobia.com/package/beercss@3.11.26" target="_blank"><img src="https://img.shields.io/bundlephobia/minzip/beercss@3.11.26" 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>
@@ -131,8 +131,8 @@ This project was guided by the **"Germany Beer Purity Law"** or **"Reinheitsgebo
131
131
  ### DEFAULT VERSION
132
132
 
133
133
  ```html
134
- <link href="https://cdn.jsdelivr.net/npm/beercss@3.11.24/dist/cdn/beer.min.css" rel="stylesheet" />
135
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.24/dist/cdn/beer.min.js"></script>
134
+ <link href="https://cdn.jsdelivr.net/npm/beercss@3.11.26/dist/cdn/beer.min.css" rel="stylesheet" />
135
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.26/dist/cdn/beer.min.js"></script>
136
136
  <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
137
137
  ```
138
138
 
@@ -150,8 +150,8 @@ import "material-dynamic-colors";
150
150
  Applied on child elements of `<* class="beer">...</*>`.
151
151
 
152
152
  ```html
153
- <link href="https://cdn.jsdelivr.net/npm/beercss@3.11.24/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
154
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.24/dist/cdn/beer.min.js"></script>
153
+ <link href="https://cdn.jsdelivr.net/npm/beercss@3.11.26/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
154
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.26/dist/cdn/beer.min.js"></script>
155
155
  <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
156
156
  ```
157
157
 
@@ -169,7 +169,7 @@ import "material-dynamic-colors";
169
169
  Applied on child elements of `<beer-css>...</beer-css>`.
170
170
 
171
171
  ```html
172
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.24/dist/cdn/beer.custom-element.min.js"></script>
172
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.26/dist/cdn/beer.custom-element.min.js"></script>
173
173
  <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
174
174
  ```
175
175
 
@@ -185,7 +185,7 @@ import "material-dynamic-colors";
185
185
 
186
186
  ### LOCAL CDN VERSION
187
187
 
188
- Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@3.11.24/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):
188
+ Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@3.11.26/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):
189
189
 
190
190
  ```html
191
191
  <link href="/beercss/beer.min.css" rel="stylesheet" />
@@ -205,8 +205,8 @@ You can use this html to setup your project. See on [Codepen](https://codepen.io
205
205
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
206
206
  <meta name="google" content="notranslate">
207
207
  <title>Hello world</title>
208
- <link href="https://cdn.jsdelivr.net/npm/beercss@3.11.24/dist/cdn/beer.min.css" rel="stylesheet">
209
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.24/dist/cdn/beer.min.js"></script>
208
+ <link href="https://cdn.jsdelivr.net/npm/beercss@3.11.26/dist/cdn/beer.min.css" rel="stylesheet">
209
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.26/dist/cdn/beer.min.js"></script>
210
210
  <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
211
211
  </head>
212
212
  <body class="dark">
package/dist/cdn/beer.css CHANGED
@@ -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.11.24/dist/cdn/material-symbols-outlined.woff2) format("woff2");
102
+ src: url(material-symbols-outlined.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.11.26/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.11.24/dist/cdn/material-symbols-rounded.woff2) format("woff2");
110
+ src: url(material-symbols-rounded.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.11.26/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.11.24/dist/cdn/material-symbols-sharp.woff2) format("woff2");
118
+ src: url(material-symbols-sharp.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.11.26/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.11.24/dist/cdn/material-symbols-subset.woff2) format("woff2");
126
+ src: url(material-symbols-subset.woff2) format("woff2"), url(https://cdn.jsdelivr.net/npm/beercss@3.11.26/dist/cdn/material-symbols-subset.woff2) format("woff2");
127
127
  }
128
128
  * {
129
129
  -webkit-tap-highlight-color: transparent;
@@ -1337,6 +1337,8 @@ body :is(:hover,:focus)::-webkit-scrollbar-thumb {
1337
1337
  }
1338
1338
  .scroll {
1339
1339
  overflow: auto;
1340
+ max-inline-size: calc(100vw - calc(var(--_padding, 0) * 2));
1341
+ margin: auto;
1340
1342
  }
1341
1343
  .no-scroll {
1342
1344
  overflow: hidden;
@@ -2348,10 +2350,10 @@ input[type=number] {
2348
2350
  }
2349
2351
  /* label */
2350
2352
  .field.label > label {
2353
+ --_start: 1rem;
2351
2354
  position: absolute;
2352
- inset: -0.5rem auto auto 1rem;
2355
+ inset: -0.5rem 1rem 0 var(--_start);
2353
2356
  display: flex;
2354
- inline-size: calc(100% - 5rem);
2355
2357
  block-size: calc(var(--_size) + 1rem);
2356
2358
  line-height: calc(var(--_size) + 1rem);
2357
2359
  font-size: 1rem;
@@ -2359,22 +2361,22 @@ input[type=number] {
2359
2361
  gap: 0.25rem;
2360
2362
  white-space: nowrap;
2361
2363
  }
2364
+ .field.label.round > label {
2365
+ inset: -0.5rem 1.75rem 0 var(--_start);
2366
+ }
2362
2367
  .field.label.textarea:not(.min) > label {
2363
2368
  block-size: calc(var(--_size) - 1.5rem);
2364
2369
  line-height: calc(var(--_size) - 1.5rem);
2365
2370
  }
2366
- [dir=rtl] .field.label > label {
2367
- inset: -0.5rem 1rem auto auto;
2368
- }
2369
2371
  .field.label.border.prefix:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
2370
- inset-inline-start: 1rem;
2372
+ --_start: 1rem;
2371
2373
  }
2372
2374
  .field.label.round > label,
2373
2375
  .field.label.border.prefix.round:not(.fill) > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
2374
- inset-inline-start: 1.5rem;
2376
+ --_start: 1.5rem;
2375
2377
  }
2376
2378
  .field.label.prefix > label {
2377
- inset-inline-start: 3rem;
2379
+ --_start: 3rem;
2378
2380
  }
2379
2381
  .field.label > :is(label.active, :focus + label, [placeholder]:not(:placeholder-shown) + label, select + label) {
2380
2382
  block-size: 2.5rem;
@@ -2388,7 +2390,7 @@ input[type=number] {
2388
2390
  .field.label.border:not(.fill) > label::after {
2389
2391
  content: "";
2390
2392
  display: block;
2391
- margin-block-start: 0.5rem;
2393
+ margin: 0.5rem 0 0 0;
2392
2394
  border-block-start: 0.0625rem solid var(--outline);
2393
2395
  block-size: 1rem;
2394
2396
  transition: none;
@@ -2399,19 +2401,19 @@ input[type=number] {
2399
2401
  }
2400
2402
  .field.label.border:not(.fill) > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
2401
2403
  .field.label.border:not(.fill) > select {
2402
- clip-path: polygon(-2% -2%, 0.75rem -2%, 0.75rem 0.5rem, calc(100% - 5rem) 0.5rem, calc(100% - 5rem) -2%, 102% -2%, 102% 102%, -2% 102%);
2404
+ clip-path: polygon(-2% -2%, 0.75rem -2%, 0.75rem 0.5rem, calc(100% - 1rem) 0.5rem, calc(100% - 1rem) -2%, 102% -2%, 102% 102%, -2% 102%);
2403
2405
  }
2404
2406
  [dir=rtl] .field.label.border:not(.fill) > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
2405
2407
  [dir=rtl] .field.label.border:not(.fill) > select {
2406
- clip-path: polygon(-2% -2%, 5rem -2%, 5rem 0.5rem, calc(100% - 0.75rem) 0.5rem, calc(100% - 0.75rem) -2%, 102% -2%, 102% 102%, -2% 102%);
2408
+ clip-path: polygon(-2% -2%, 1rem -2%, 1rem 0.5rem, calc(100% - 0.75rem) 0.5rem, calc(100% - 0.75rem) -2%, 102% -2%, 102% 102%, -2% 102%);
2407
2409
  }
2408
2410
  .field.label.border.round:not(.fill) > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
2409
2411
  .field.label.border.round:not(.fill) > select {
2410
- clip-path: polygon(-2% -2%, 1.25rem -2%, 1.25rem 0.5rem, calc(100% - 5rem) 0.5rem, calc(100% - 5rem) -2%, 102% -2%, 102% 102%, -2% 102%);
2412
+ clip-path: polygon(-2% -2%, 1.25rem -2%, 1.25rem 0.5rem, calc(100% - 1.75rem) 0.5rem, calc(100% - 1.75rem) -2%, 102% -2%, 102% 102%, -2% 102%);
2411
2413
  }
2412
2414
  [dir=rtl] .field.label.border.round:not(.fill) > :is(input, textarea):is(:focus, [placeholder]:not(:placeholder-shown), .active),
2413
2415
  [dir=rtl] .field.label.border.round:not(.fill) > select {
2414
- clip-path: polygon(-2% -2%, 5rem -2%, 5rem 0.5rem, calc(100% - 1.25rem) 0.5rem, calc(100% - 1.25rem) -2%, 102% -2%, 102% 102%, -2% 102%);
2416
+ clip-path: polygon(-2% -2%, 1.75rem -2%, 1.75rem 0.5rem, calc(100% - 1.25rem) 0.5rem, calc(100% - 1.25rem) -2%, 102% -2%, 102% 102%, -2% 102%);
2415
2417
  }
2416
2418
  .field.label > :focus + label {
2417
2419
  color: var(--primary);
@@ -2698,10 +2700,6 @@ i[class*=fa-] {
2698
2700
  .fixed {
2699
2701
  position: fixed;
2700
2702
  }
2701
- .absolute,
2702
- .fixed {
2703
- max-inline-size: none;
2704
- }
2705
2703
  :is(.absolute, .fixed).left.right {
2706
2704
  inline-size: auto;
2707
2705
  }
@@ -2826,9 +2824,6 @@ main {
2826
2824
  padding: var(--_padding);
2827
2825
  overflow: hidden;
2828
2826
  }
2829
- main > * {
2830
- max-inline-size: calc(100vw - calc(var(--_padding) * 2));
2831
- }
2832
2827
  footer {
2833
2828
  grid-area: footer;
2834
2829
  }
@@ -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.11.24/dist/cdn/beer.min.js");
15
+ return await import("https://cdn.jsdelivr.net/npm/beercss@3.11.26/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.11.24/dist/cdn/beer.scoped.min.css");
26
+ element.setAttribute("href", "https://cdn.jsdelivr.net/npm/beercss@3.11.26/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.11.24/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.11.24/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;
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.11.26/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.11.26/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;