beercss 3.11.1 → 3.11.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 +10 -9
- package/dist/cdn/beer.css +40 -44
- 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 +40 -44
- package/dist/cdn/beer.scoped.min.css +1 -1
- package/package.json +1 -1
- package/src/cdn/customElement.js +2 -2
- package/src/cdn/elements/buttons.css +19 -11
- package/src/cdn/elements/cards.css +5 -0
- package/src/cdn/elements/chips.css +5 -14
- package/src/cdn/elements/media.css +2 -6
- package/src/cdn/helpers/forms.css +1 -1
- package/src/cdn/helpers/responsive.css +6 -12
- package/src/cdn/settings/fonts.css +4 -4
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.
|
|
7
|
+
<a href="https://bundlephobia.com/package/beercss@3.11.3" target="_blank"><img src="https://img.shields.io/bundlephobia/minzip/beercss@3.11.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>
|
|
@@ -35,7 +35,8 @@ Beer CSS is an MIT-licensed open source project with its ongoing development mad
|
|
|
35
35
|
|
|
36
36
|
# Why?
|
|
37
37
|
|
|
38
|
-
- 🥇 The first CSS framework based on Material Design 3
|
|
38
|
+
- 🥇 The first CSS framework based on Material Design 3
|
|
39
|
+
- 👉 Latest "M3 Expressive" already
|
|
39
40
|
- ⬇️ 10x smaller than others CSS frameworks based on Material Design.
|
|
40
41
|
- 🧙♂️ Translates Material Design to HTML semantic standard.
|
|
41
42
|
- 🤓 Ready to use with any JS framework.
|
|
@@ -130,8 +131,8 @@ This project was guided by the **"Germany Beer Purity Law"** or **"Reinheitsgebo
|
|
|
130
131
|
### DEFAULT VERSION
|
|
131
132
|
|
|
132
133
|
```html
|
|
133
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@3.11.
|
|
134
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.
|
|
134
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@3.11.3/dist/cdn/beer.min.css" rel="stylesheet" />
|
|
135
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.3/dist/cdn/beer.min.js"></script>
|
|
135
136
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
136
137
|
```
|
|
137
138
|
|
|
@@ -149,8 +150,8 @@ import "material-dynamic-colors";
|
|
|
149
150
|
Applied on child elements of `<* class="beer">...</*>`.
|
|
150
151
|
|
|
151
152
|
```html
|
|
152
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@3.11.
|
|
153
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.
|
|
153
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@3.11.3/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
|
|
154
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.3/dist/cdn/beer.min.js"></script>
|
|
154
155
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
155
156
|
```
|
|
156
157
|
|
|
@@ -168,7 +169,7 @@ import "material-dynamic-colors";
|
|
|
168
169
|
Applied on child elements of `<beer-css>...</beer-css>`.
|
|
169
170
|
|
|
170
171
|
```html
|
|
171
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.
|
|
172
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.3/dist/cdn/beer.custom-element.min.js"></script>
|
|
172
173
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
173
174
|
```
|
|
174
175
|
|
|
@@ -194,8 +195,8 @@ You can use this html to setup your project. See on [Codepen](https://codepen.io
|
|
|
194
195
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
195
196
|
<meta name="google" content="notranslate">
|
|
196
197
|
<title>Hello world</title>
|
|
197
|
-
<link href="https://cdn.jsdelivr.net/npm/beercss@3.11.
|
|
198
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.
|
|
198
|
+
<link href="https://cdn.jsdelivr.net/npm/beercss@3.11.3/dist/cdn/beer.min.css" rel="stylesheet">
|
|
199
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.11.3/dist/cdn/beer.min.js"></script>
|
|
199
200
|
<script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
|
|
200
201
|
</head>
|
|
201
202
|
<body class="dark">
|
package/dist/cdn/beer.css
CHANGED
|
@@ -101,7 +101,7 @@ body.dark {
|
|
|
101
101
|
font-display: block;
|
|
102
102
|
src:
|
|
103
103
|
url("material-symbols-outlined.woff2") format("woff2"),
|
|
104
|
-
url("https://cdn.jsdelivr.net/npm/beercss@3.11.
|
|
104
|
+
url("https://cdn.jsdelivr.net/npm/beercss@3.11.3/dist/cdn/material-symbols-outlined.woff2") format("woff2");
|
|
105
105
|
}
|
|
106
106
|
/* rounded icons */
|
|
107
107
|
@font-face {
|
|
@@ -111,7 +111,7 @@ body.dark {
|
|
|
111
111
|
font-display: block;
|
|
112
112
|
src:
|
|
113
113
|
url("material-symbols-rounded.woff2") format("woff2"),
|
|
114
|
-
url("https://cdn.jsdelivr.net/npm/beercss@3.11.
|
|
114
|
+
url("https://cdn.jsdelivr.net/npm/beercss@3.11.3/dist/cdn/material-symbols-rounded.woff2") format("woff2");
|
|
115
115
|
}
|
|
116
116
|
/* sharp icons */
|
|
117
117
|
@font-face {
|
|
@@ -121,7 +121,7 @@ body.dark {
|
|
|
121
121
|
font-display: block;
|
|
122
122
|
src:
|
|
123
123
|
url("material-symbols-sharp.woff2") format("woff2"),
|
|
124
|
-
url("https://cdn.jsdelivr.net/npm/beercss@3.11.
|
|
124
|
+
url("https://cdn.jsdelivr.net/npm/beercss@3.11.3/dist/cdn/material-symbols-sharp.woff2") format("woff2");
|
|
125
125
|
}
|
|
126
126
|
/* subset of only required icons */
|
|
127
127
|
@font-face {
|
|
@@ -131,7 +131,7 @@ body.dark {
|
|
|
131
131
|
font-display: block;
|
|
132
132
|
src:
|
|
133
133
|
url("material-symbols-subset.woff2") format("woff2"),
|
|
134
|
-
url("https://cdn.jsdelivr.net/npm/beercss@3.11.
|
|
134
|
+
url("https://cdn.jsdelivr.net/npm/beercss@3.11.3/dist/cdn/material-symbols-subset.woff2") format("woff2");
|
|
135
135
|
}
|
|
136
136
|
* {
|
|
137
137
|
-webkit-tap-highlight-color: transparent;
|
|
@@ -1207,7 +1207,7 @@ body :is(:hover,:focus)::-webkit-scrollbar-thumb {
|
|
|
1207
1207
|
:is(.circle, .square).round {
|
|
1208
1208
|
border-radius: 1rem !important;
|
|
1209
1209
|
}
|
|
1210
|
-
.border:not(table, .field, .list, menu) {
|
|
1210
|
+
.border:not(table, .field, .list, menu, article) {
|
|
1211
1211
|
box-sizing: border-box;
|
|
1212
1212
|
border: 0.0625rem solid var(--outline);
|
|
1213
1213
|
background-color: transparent;
|
|
@@ -1445,24 +1445,18 @@ body :is(:hover,:focus)::-webkit-scrollbar-thumb {
|
|
|
1445
1445
|
inline-size: -moz-available;
|
|
1446
1446
|
}
|
|
1447
1447
|
@media only screen and (max-width: 600px) {
|
|
1448
|
-
.m:not(.s)
|
|
1449
|
-
|
|
1450
|
-
.m.l:not(.s) {
|
|
1451
|
-
display: none;
|
|
1448
|
+
:is(.m, .l):not(.s) {
|
|
1449
|
+
display: none !important;
|
|
1452
1450
|
}
|
|
1453
1451
|
}
|
|
1454
1452
|
@media only screen and (min-width: 601px) and (max-width: 992px) {
|
|
1455
|
-
.s:not(.m)
|
|
1456
|
-
|
|
1457
|
-
.s.l:not(.m) {
|
|
1458
|
-
display: none;
|
|
1453
|
+
:is(.s, .l):not(.m) {
|
|
1454
|
+
display: none !important;
|
|
1459
1455
|
}
|
|
1460
1456
|
}
|
|
1461
1457
|
@media only screen and (min-width: 993px) {
|
|
1462
|
-
.m:not(.l)
|
|
1463
|
-
|
|
1464
|
-
.m.s:not(.l) {
|
|
1465
|
-
display: none;
|
|
1458
|
+
:is(.m, .s):not(.l) {
|
|
1459
|
+
display: none !important;
|
|
1466
1460
|
}
|
|
1467
1461
|
}
|
|
1468
1462
|
html {
|
|
@@ -1813,37 +1807,43 @@ dialog > nav.drawer > header + * {
|
|
|
1813
1807
|
}
|
|
1814
1808
|
.button,
|
|
1815
1809
|
button {
|
|
1810
|
+
--_padding: 1rem;
|
|
1816
1811
|
--_size: 2.5rem;
|
|
1817
1812
|
box-sizing: content-box;
|
|
1818
1813
|
display: inline-flex;
|
|
1819
1814
|
align-items: center;
|
|
1820
1815
|
justify-content: center;
|
|
1821
1816
|
block-size: var(--_size);
|
|
1822
|
-
min-inline-size: var(--_size);
|
|
1823
1817
|
font-size: 0.875rem;
|
|
1824
1818
|
font-weight: 500;
|
|
1825
1819
|
color: var(--on-primary);
|
|
1826
|
-
padding: 0
|
|
1820
|
+
padding: 0 var(--_padding);
|
|
1827
1821
|
background-color: var(--primary);
|
|
1828
1822
|
margin: 0 0.5rem;
|
|
1829
1823
|
border-radius: var(--_size);
|
|
1830
1824
|
transition: transform var(--speed3), border-radius var(--speed2), padding var(--speed3);
|
|
1831
1825
|
user-select: none;
|
|
1832
|
-
gap:
|
|
1826
|
+
gap: 0.5rem;
|
|
1833
1827
|
line-height: normal;
|
|
1834
1828
|
}
|
|
1835
1829
|
:is(button, .button).small {
|
|
1836
1830
|
--_size: 2rem;
|
|
1831
|
+
--_padding: 0.75rem;
|
|
1837
1832
|
}
|
|
1838
1833
|
:is(button, .button).large {
|
|
1839
1834
|
--_size: 3rem;
|
|
1835
|
+
--_padding: 1.25rem;
|
|
1840
1836
|
}
|
|
1841
1837
|
:is(.button, button):is(.extra, .extend) {
|
|
1842
1838
|
--_size: 3.5rem;
|
|
1843
1839
|
font-size: 1rem;
|
|
1840
|
+
--_padding: 1.5rem;
|
|
1841
|
+
}
|
|
1842
|
+
:is(button, .button):is(.square, .circle) {
|
|
1843
|
+
--_padding: 0;
|
|
1844
1844
|
}
|
|
1845
1845
|
:is(button, .button).border {
|
|
1846
|
-
border-color: var(--outline);
|
|
1846
|
+
border-color: var(--outline-variant);
|
|
1847
1847
|
color: var(--primary);
|
|
1848
1848
|
}
|
|
1849
1849
|
:is(button, .button):not(.border, .chip):hover {
|
|
@@ -1854,15 +1854,16 @@ button {
|
|
|
1854
1854
|
}
|
|
1855
1855
|
.extend:is(:hover, .active) {
|
|
1856
1856
|
inline-size: auto;
|
|
1857
|
-
|
|
1857
|
+
--_padding: 1.5rem;
|
|
1858
|
+
padding: 0 var(--_padding);
|
|
1858
1859
|
}
|
|
1859
1860
|
.extend:is(:hover, .active) > i + span {
|
|
1860
1861
|
display: inherit;
|
|
1861
|
-
margin-inline-start:
|
|
1862
|
+
margin-inline-start: var(--_padding);
|
|
1862
1863
|
}
|
|
1863
1864
|
.extend:is(:hover, .active) > :is(img, svg) + span {
|
|
1864
1865
|
display: inherit;
|
|
1865
|
-
margin-inline-start:
|
|
1866
|
+
margin-inline-start: calc(1rem + var(--_padding));
|
|
1866
1867
|
}
|
|
1867
1868
|
:is(.button, button)[disabled] {
|
|
1868
1869
|
opacity: 0.5;
|
|
@@ -1875,19 +1876,19 @@ button {
|
|
|
1875
1876
|
:is(.button, button)[disabled]::after {
|
|
1876
1877
|
display: none;
|
|
1877
1878
|
}
|
|
1878
|
-
:is(.button, button):not(.chip).fill {
|
|
1879
|
+
:is(.button, button):not(.chip, .extend).fill {
|
|
1879
1880
|
background-color: var(--secondary-container) !important;
|
|
1880
1881
|
color: var(--on-secondary-container) !important;
|
|
1881
1882
|
}
|
|
1882
|
-
:is(.button, button):not(.chip).active {
|
|
1883
|
+
:is(.button, button):not(.chip, .extend).active {
|
|
1883
1884
|
background-color: var(--primary-container);
|
|
1884
1885
|
color: var(--on-primary-container);
|
|
1885
1886
|
}
|
|
1886
|
-
:is(.button, button):not(.chip).fill.active {
|
|
1887
|
+
:is(.button, button):not(.chip, .extend).fill.active {
|
|
1887
1888
|
background-color: var(--secondary) !important;
|
|
1888
1889
|
color: var(--on-secondary) !important;
|
|
1889
1890
|
}
|
|
1890
|
-
:is(.button, button):not(.chip).border.active {
|
|
1891
|
+
:is(.button, button):not(.chip, .extend).border.active {
|
|
1891
1892
|
background-color: var(--inverse-surface) !important;
|
|
1892
1893
|
color: var(--inverse-on-surface) !important;
|
|
1893
1894
|
border-color: var(--inverse-surface) !important;
|
|
@@ -1915,7 +1916,12 @@ article.medium {
|
|
|
1915
1916
|
article.large {
|
|
1916
1917
|
block-size: 32rem;
|
|
1917
1918
|
}
|
|
1919
|
+
article.border {
|
|
1920
|
+
box-shadow: none;
|
|
1921
|
+
border: 0.0625rem solid var(--outline-variant);
|
|
1922
|
+
}
|
|
1918
1923
|
.chip {
|
|
1924
|
+
--_padding: 0.75rem;
|
|
1919
1925
|
--_size: 2rem;
|
|
1920
1926
|
box-sizing: border-box;
|
|
1921
1927
|
display: inline-flex;
|
|
@@ -1928,34 +1934,27 @@ article.large {
|
|
|
1928
1934
|
background-color: transparent;
|
|
1929
1935
|
border: 0.0625rem solid var(--outline-variant);
|
|
1930
1936
|
color: var(--on-surface-variant);
|
|
1931
|
-
padding: 0
|
|
1937
|
+
padding: 0 var(--_padding);
|
|
1932
1938
|
margin: 0 0.5rem;
|
|
1933
1939
|
text-transform: none;
|
|
1934
1940
|
border-radius: 0.5rem;
|
|
1935
1941
|
transition: transform var(--speed3), border-radius var(--speed3), padding var(--speed3);
|
|
1936
1942
|
user-select: none;
|
|
1937
|
-
gap:
|
|
1943
|
+
gap: 0.5rem;
|
|
1938
1944
|
line-height: normal;
|
|
1939
1945
|
letter-spacing: normal;
|
|
1940
1946
|
}
|
|
1941
1947
|
.chip.medium {
|
|
1942
1948
|
--_size: 2.5rem;
|
|
1949
|
+
--_padding: 1rem;
|
|
1943
1950
|
}
|
|
1944
1951
|
.chip.large {
|
|
1952
|
+
--_padding: 1.25rem;
|
|
1945
1953
|
--_size: 3rem;
|
|
1946
1954
|
}
|
|
1947
1955
|
.chip.fill {
|
|
1948
1956
|
border: none;
|
|
1949
1957
|
}
|
|
1950
|
-
.chip.round.small {
|
|
1951
|
-
border-radius: 1rem;
|
|
1952
|
-
}
|
|
1953
|
-
.chip.round {
|
|
1954
|
-
border-radius: 1.25rem;
|
|
1955
|
-
}
|
|
1956
|
-
.chip.round.large {
|
|
1957
|
-
border-radius: 1.5rem;
|
|
1958
|
-
}
|
|
1959
1958
|
dialog {
|
|
1960
1959
|
--_padding: 1.5rem;
|
|
1961
1960
|
display: block;
|
|
@@ -2989,14 +2988,11 @@ svg {
|
|
|
2989
2988
|
min-block-size: 1.5rem;
|
|
2990
2989
|
max-block-size: 1.5rem;
|
|
2991
2990
|
}
|
|
2992
|
-
:is(button, .button, .chip) > :is(i, img, svg) {
|
|
2993
|
-
margin: 0 -0.5rem;
|
|
2994
|
-
}
|
|
2995
2991
|
:is(button, .button, .chip) > .responsive:first-child {
|
|
2996
|
-
margin-inline-start: -
|
|
2992
|
+
margin-inline-start: calc(-1 * var(--_padding));
|
|
2997
2993
|
}
|
|
2998
2994
|
:is(button, .button, .chip) > .responsive:not(:first-child) {
|
|
2999
|
-
margin-inline-end: -
|
|
2995
|
+
margin-inline-end: calc(-1 * var(--_padding));
|
|
3000
2996
|
}
|
|
3001
2997
|
:is(.circle, .square, .extend) > .responsive {
|
|
3002
2998
|
--_size: inherit;
|
|
@@ -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.
|
|
15
|
+
return await import("https://cdn.jsdelivr.net/npm/beercss@3.11.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.11.
|
|
26
|
+
element.setAttribute("href", "https://cdn.jsdelivr.net/npm/beercss@3.11.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.11.
|
|
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.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.11.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;
|