beercss 3.13.2 → 4.0.0

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.
Files changed (159) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +331 -328
  3. package/custom-element/index.d.ts +18 -18
  4. package/custom-element/index.js +7 -7
  5. package/dist/cdn/arch.svg +3 -3
  6. package/dist/cdn/arrow.svg +3 -3
  7. package/dist/cdn/beer.css +5904 -4792
  8. package/dist/cdn/beer.custom-element.js +37 -38
  9. package/dist/cdn/beer.custom-element.min.js +1 -1
  10. package/dist/cdn/beer.js +636 -635
  11. package/dist/cdn/beer.min.css +1 -1
  12. package/dist/cdn/beer.min.js +1 -1
  13. package/dist/cdn/beer.scoped.css +5909 -4793
  14. package/dist/cdn/beer.scoped.min.css +2 -1
  15. package/dist/cdn/boom.svg +3 -3
  16. package/dist/cdn/bun.svg +3 -3
  17. package/dist/cdn/burst.svg +3 -3
  18. package/dist/cdn/circle.svg +3 -3
  19. package/dist/cdn/clamshell.svg +3 -3
  20. package/dist/cdn/diamond.svg +3 -3
  21. package/dist/cdn/fan.svg +3 -3
  22. package/dist/cdn/flower.svg +3 -3
  23. package/dist/cdn/gem.svg +3 -3
  24. package/dist/cdn/ghost-ish.svg +3 -3
  25. package/dist/cdn/heart.svg +3 -3
  26. package/dist/cdn/leaf-clover4.svg +3 -3
  27. package/dist/cdn/leaf-clover8.svg +3 -3
  28. package/dist/cdn/loading-indicator.svg +18 -18
  29. package/dist/cdn/oval.svg +3 -3
  30. package/dist/cdn/pentagon.svg +3 -3
  31. package/dist/cdn/pill.svg +3 -3
  32. package/dist/cdn/pixel-circle.svg +3 -3
  33. package/dist/cdn/pixel-triangle.svg +3 -3
  34. package/dist/cdn/puffy-diamond.svg +3 -3
  35. package/dist/cdn/puffy.svg +3 -3
  36. package/dist/cdn/semicircle.svg +3 -3
  37. package/dist/cdn/sided-cookie12.svg +3 -3
  38. package/dist/cdn/sided-cookie4.svg +3 -3
  39. package/dist/cdn/sided-cookie6.svg +3 -3
  40. package/dist/cdn/sided-cookie7.svg +3 -3
  41. package/dist/cdn/sided-cookie9.svg +3 -3
  42. package/dist/cdn/slanted.svg +3 -3
  43. package/dist/cdn/soft-boom.svg +3 -3
  44. package/dist/cdn/soft-burst.svg +3 -3
  45. package/dist/cdn/square.svg +3 -3
  46. package/dist/cdn/sunny.svg +3 -3
  47. package/dist/cdn/triangle.svg +3 -3
  48. package/dist/cdn/very-sunny.svg +3 -3
  49. package/dist/cdn/wavy-circle.svg +3 -3
  50. package/dist/cdn/wavy.svg +4 -4
  51. package/index.d.ts +18 -18
  52. package/index.js +6 -6
  53. package/package.json +76 -76
  54. package/scoped/index.d.ts +18 -18
  55. package/scoped/index.js +6 -6
  56. package/src/cdn/beer.css +54 -52
  57. package/src/cdn/beer.ts +120 -120
  58. package/src/cdn/customElement.js +37 -38
  59. package/src/cdn/elements/badges.css +74 -74
  60. package/src/cdn/elements/bars.css +91 -91
  61. package/src/cdn/elements/buttons.css +105 -106
  62. package/src/cdn/elements/cards.css +26 -26
  63. package/src/cdn/elements/chips.css +37 -38
  64. package/src/cdn/elements/dialogs.css +145 -151
  65. package/src/cdn/elements/dialogs.ts +69 -69
  66. package/src/cdn/elements/dividers.css +48 -48
  67. package/src/cdn/elements/expansions.css +17 -10
  68. package/src/cdn/elements/fields.css +438 -439
  69. package/src/cdn/elements/fields.ts +165 -165
  70. package/src/cdn/elements/grids.css +171 -171
  71. package/src/cdn/elements/icons.css +77 -77
  72. package/src/cdn/elements/layouts.css +35 -35
  73. package/src/cdn/elements/lists.css +75 -71
  74. package/src/cdn/elements/mainLayouts.css +57 -57
  75. package/src/cdn/elements/media.css +112 -112
  76. package/src/cdn/elements/menus.css +294 -294
  77. package/src/cdn/elements/menus.ts +40 -40
  78. package/src/cdn/elements/navigations.css +461 -462
  79. package/src/cdn/elements/overlays.css +31 -31
  80. package/src/cdn/elements/pages.css +41 -41
  81. package/src/cdn/elements/pages.ts +6 -6
  82. package/src/cdn/elements/progress.css +207 -207
  83. package/src/cdn/elements/progress.ts +36 -34
  84. package/src/cdn/elements/selections.css +256 -256
  85. package/src/cdn/elements/shapes.css +258 -258
  86. package/src/cdn/elements/sliders.css +353 -357
  87. package/src/cdn/elements/sliders.ts +74 -74
  88. package/src/cdn/elements/snackbars.css +47 -47
  89. package/src/cdn/elements/snackbars.ts +26 -26
  90. package/src/cdn/elements/tables.css +65 -65
  91. package/src/cdn/elements/tabs.css +52 -52
  92. package/src/cdn/elements/tooltips.css +131 -131
  93. package/src/cdn/helpers/alignments.css +29 -29
  94. package/src/cdn/helpers/blurs.css +21 -21
  95. package/src/cdn/helpers/colors.css +930 -930
  96. package/src/cdn/helpers/directions.css +28 -28
  97. package/src/cdn/helpers/elevates.css +16 -16
  98. package/src/cdn/helpers/forms.css +75 -75
  99. package/src/cdn/helpers/margins.css +49 -49
  100. package/src/cdn/helpers/opacities.css +19 -19
  101. package/src/cdn/helpers/paddings.css +45 -45
  102. package/src/cdn/helpers/positions.css +45 -45
  103. package/src/cdn/helpers/responsive.css +22 -22
  104. package/src/cdn/helpers/ripples.css +33 -33
  105. package/src/cdn/helpers/ripples.ts +30 -30
  106. package/src/cdn/helpers/scrolls.css +7 -8
  107. package/src/cdn/helpers/shadows.css +23 -23
  108. package/src/cdn/helpers/sizes.css +45 -45
  109. package/src/cdn/helpers/spaces.css +19 -19
  110. package/src/cdn/helpers/typography.css +226 -225
  111. package/src/cdn/helpers/waves.css +43 -43
  112. package/src/cdn/helpers/zoom.css +19 -19
  113. package/src/cdn/interfaces.ts +3 -3
  114. package/src/cdn/settings/dark.css +38 -38
  115. package/src/cdn/settings/fonts.css +35 -35
  116. package/src/cdn/settings/globals.css +55 -18
  117. package/src/cdn/settings/light.css +39 -39
  118. package/src/cdn/{helpers → settings}/reset.css +76 -94
  119. package/src/cdn/{helpers → settings}/theme.css +186 -186
  120. package/src/cdn/{helpers → settings}/theme.ts +83 -83
  121. package/src/cdn/shapes/arch.svg +3 -3
  122. package/src/cdn/shapes/arrow.svg +3 -3
  123. package/src/cdn/shapes/boom.svg +3 -3
  124. package/src/cdn/shapes/bun.svg +3 -3
  125. package/src/cdn/shapes/burst.svg +3 -3
  126. package/src/cdn/shapes/circle.svg +3 -3
  127. package/src/cdn/shapes/clamshell.svg +3 -3
  128. package/src/cdn/shapes/diamond.svg +3 -3
  129. package/src/cdn/shapes/fan.svg +3 -3
  130. package/src/cdn/shapes/flower.svg +3 -3
  131. package/src/cdn/shapes/gem.svg +3 -3
  132. package/src/cdn/shapes/ghost-ish.svg +3 -3
  133. package/src/cdn/shapes/heart.svg +3 -3
  134. package/src/cdn/shapes/leaf-clover4.svg +3 -3
  135. package/src/cdn/shapes/leaf-clover8.svg +3 -3
  136. package/src/cdn/shapes/loading-indicator.svg +18 -18
  137. package/src/cdn/shapes/oval.svg +3 -3
  138. package/src/cdn/shapes/pentagon.svg +3 -3
  139. package/src/cdn/shapes/pill.svg +3 -3
  140. package/src/cdn/shapes/pixel-circle.svg +3 -3
  141. package/src/cdn/shapes/pixel-triangle.svg +3 -3
  142. package/src/cdn/shapes/puffy-diamond.svg +3 -3
  143. package/src/cdn/shapes/puffy.svg +3 -3
  144. package/src/cdn/shapes/semicircle.svg +3 -3
  145. package/src/cdn/shapes/sided-cookie12.svg +3 -3
  146. package/src/cdn/shapes/sided-cookie4.svg +3 -3
  147. package/src/cdn/shapes/sided-cookie6.svg +3 -3
  148. package/src/cdn/shapes/sided-cookie7.svg +3 -3
  149. package/src/cdn/shapes/sided-cookie9.svg +3 -3
  150. package/src/cdn/shapes/slanted.svg +3 -3
  151. package/src/cdn/shapes/soft-boom.svg +3 -3
  152. package/src/cdn/shapes/soft-burst.svg +3 -3
  153. package/src/cdn/shapes/square.svg +3 -3
  154. package/src/cdn/shapes/sunny.svg +3 -3
  155. package/src/cdn/shapes/triangle.svg +3 -3
  156. package/src/cdn/shapes/very-sunny.svg +3 -3
  157. package/src/cdn/shapes/wavy-circle.svg +3 -3
  158. package/src/cdn/shapes/wavy.svg +4 -4
  159. package/src/cdn/utils.ts +154 -154
package/README.md CHANGED
@@ -1,328 +1,331 @@
1
- <p align="center">
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
- </p>
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="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 href="https://bundlephobia.com/package/beercss@3.13.2" target="_blank"><img src="https://img.shields.io/bundlephobia/minzip/beercss@3.13.2" alt="minzipped 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
- </p>
12
-
13
- # Beer CSS
14
-
15
- Build material design interfaces in record time...
16
-
17
- ...without stress for devs 🍺💛
18
-
19
- Cheers, www.beercss.com
20
-
21
- # Sponsors
22
-
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
-
25
- <p align="center">
26
- <a href="https://opencollective.com/beercss">Open Collective</a><br /><br />
27
- <img src="https://opencollective.com/beercss/sponsors.svg?avatarHeight=56&button=false" alt="Sponsors">
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">
34
- <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/40445940?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
35
- <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/74856856?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
36
- <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/419690?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
37
- <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/181576?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
38
- <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/797439?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
39
- <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/3647943?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
40
- </p>
41
-
42
- # Why?
43
-
44
- - 🥇 The first CSS framework based on Material Design 3
45
- - 👉 Latest "M3 Expressive" already.
46
- - ⬇️ 10x smaller than others CSS frameworks based on Material Design.
47
- - 🧙‍♂️ Translates Material Design to HTML semantic standard.
48
- - 🤓 Ready to use with any JS framework.
49
- - 🎯 Highly focused on DX.
50
- - 🚫 No build steps, configurations or dependencies.
51
- - Build modern interfaces without any custom CSS.
52
-
53
- # A lightweight beer
54
-
55
- Let's be honest, in the ever-evolving world of web development, we're all looking for that sweet spot: powerful functionality without the bloat. We want speed, efficiency, and something that doesn't feel like lugging around a digital elephant. And if you're looking at the chart below, you're probably thinking, "Wow, XYZ is huge!". You're not wrong. But look all the way to the top. See that? That's Beer CSS.
56
-
57
- ![image](https://github.com/user-attachments/assets/23df0121-7716-4114-9751-38b1e519cfcd)
58
-
59
- # The principles
60
-
61
- This project was guided by the **"Germany Beer Purity Law"** or **"Reinheitsgebot"** created in 1516. This law states that beer should only be brewed with the following ingredients: **water**, **barley malt** and **hops**. Only 3 ingredients. Exciting, right? So we thinking about It and our 3 ingredients are: **settings**, **elements** and **helpers**. This sounds weird at first time, because It's not BEM, OOCSS, SMACSS, ITCSS, "Utility first" or any other approach. Our approach doesn't avoid some bad practices, but is lightweight, tasty and pure like a beer. Just try it and feel it! 😁
62
-
63
- ```
64
- | SETTINGS | // The settings affects all document
65
- |---------------|----|
66
- | | |
67
- | ELEMENTS | | // The elements are the components, widgets or tags
68
- | | |
69
- |---------------| |
70
- | | |
71
- | | |
72
- | HELPERS |----| // The common helpers makes the elements more scalable and customizable
73
- | |
74
- | |
75
- |---------------|
76
- ```
77
-
78
- ### ✅ DO:
79
-
80
- ```
81
- // 1 setting to 1 document
82
- <body class="dark|light">...</body>
83
-
84
- // 1 element to N helpers
85
- <element class="helper helper">...</element>
86
- <div class="element helper helper">...</div>
87
-
88
- // nav elements before all others
89
- <body>
90
- <nav class="left|right|top|bottom">...</nav>
91
- ...
92
- </body>
93
-
94
- <div id="app">
95
- <nav class="left|right|top|bottom">...</nav>
96
- ...
97
- </div>
98
-
99
- // write css like this
100
- .element.helper {...}
101
- .element > .element {...}
102
- .element > .helper {...}
103
- ```
104
-
105
- ### 🚫 DON'T:
106
-
107
- ```
108
- // N elements to 1 tag
109
- <div class="element element helper">...</div>
110
- <element class="element helper">...</element>
111
-
112
- // element with dependencies
113
- <div class="element">
114
- <div class="element-header">...</div>
115
- <div class="element-content">...</div>
116
- <div class="element-footer">...</div>
117
- </div>
118
-
119
- // nav elements after all others
120
- <body>
121
- ...
122
- <nav class="left|right|top|bottom">...</nav>
123
- </body>
124
-
125
- <div id="app">
126
- ...
127
- <nav class="left|right|top|bottom">...</nav>
128
- </div>
129
-
130
- // write css like this
131
- .element.element {...}
132
- .element .element {...}
133
- .element .helper {...}
134
- ```
135
-
136
- # Get started
137
-
138
- ### DEFAULT VERSION
139
-
140
- ```html
141
- <link href="https://cdn.jsdelivr.net/npm/beercss@3.13.2/dist/cdn/beer.min.css" rel="stylesheet" />
142
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.2/dist/cdn/beer.min.js"></script>
143
- <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
144
- ```
145
-
146
- ```js
147
- npm i beercss
148
- npm i material-dynamic-colors
149
- ```
150
-
151
- ```js
152
- import "beercss";
153
- import "material-dynamic-colors";
154
- ```
155
-
156
- ### SCOPED VERSION
157
- Applied on child elements of `<* class="beer">...</*>`.
158
-
159
- ```html
160
- <link href="https://cdn.jsdelivr.net/npm/beercss@3.13.2/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
161
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.2/dist/cdn/beer.min.js"></script>
162
- <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
163
- ```
164
-
165
- ```js
166
- npm i beercss
167
- npm i material-dynamic-colors
168
- ```
169
-
170
- ```js
171
- import "beercss/scoped";
172
- import "material-dynamic-colors";
173
- ```
174
-
175
- ### CUSTOM ELEMENT VERSION
176
- Applied on child elements of `<beer-css>...</beer-css>`.
177
-
178
- ```html
179
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.2/dist/cdn/beer.custom-element.min.js"></script>
180
- <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
181
- ```
182
-
183
- ```js
184
- npm i beercss
185
- npm i material-dynamic-colors
186
- ```
187
-
188
- ```js
189
- import "beercss/custom-element";
190
- import "material-dynamic-colors";
191
- ```
192
-
193
- ### LOCAL CDN VERSION
194
-
195
- Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@3.13.2/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):
196
-
197
- ```html
198
- <link href="/beercss/beer.min.css" rel="stylesheet" />
199
- <script type="module" src="/beercss/beer.min.js"></script>
200
- <script type="module" src="/beercss/material-dynamic-colors.min.js"></script>
201
- ```
202
-
203
- ### HTML
204
-
205
- 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).
206
-
207
- ```html
208
- <html>
209
- <head>
210
- <meta charset="UTF-8">
211
- <meta name="viewport" content="width=device-width, initial-scale=1">
212
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
213
- <meta name="google" content="notranslate">
214
- <title>Hello world</title>
215
- <link href="https://cdn.jsdelivr.net/npm/beercss@3.13.2/dist/cdn/beer.min.css" rel="stylesheet">
216
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.13.2/dist/cdn/beer.min.js"></script>
217
- <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
218
- </head>
219
- <body class="dark">
220
- <nav class="left max l">
221
- <header>
222
- <nav>
223
- <img src="https://www.beercss.com/favicon.png" class="circle extra">
224
- <h6>Cheers</h6>
225
- </nav>
226
- </header>
227
- <a>
228
- <i>home</i>
229
- <div>Home</div>
230
- </a>
231
- <a>
232
- <i>search</i>
233
- <div>Search</div>
234
- </a>
235
- <a>
236
- <i>share</i>
237
- <div>Share</div>
238
- </a>
239
- <a>
240
- <i>more_vert</i>
241
- <div>More</div>
242
- </a>
243
- <div class="divider"></div>
244
- <a>
245
- <i>widgets</i>
246
- <div>Widgets</div>
247
- </a>
248
- <a>
249
- <i>chat</i>
250
- <div>Chat</div>
251
- </a>
252
- <a>
253
- <i>help</i>
254
- <div>Help</div>
255
- </a>
256
- </nav>
257
-
258
- <nav class="left m">
259
- <header>
260
- <img src="https://www.beercss.com/favicon.png" class="circle extra">
261
- </header>
262
- <a>
263
- <i>home</i>
264
- <div>Home</div>
265
- </a>
266
- <a>
267
- <i>search</i>
268
- <div>Search</div>
269
- </a>
270
- <a>
271
- <i>share</i>
272
- <div>Share</div>
273
- </a>
274
- <a>
275
- <i>more_vert</i>
276
- <div>More</div>
277
- </a>
278
- </nav>
279
-
280
- <nav class="bottom s">
281
- <a>
282
- <i>home</i>
283
- </a>
284
- <a>
285
- <i>search</i>
286
- </a>
287
- <a>
288
- <i>share</i>
289
- </a>
290
- <a>
291
- <i>more_vert</i>
292
- </a>
293
- </nav>
294
-
295
- <main class="responsive">
296
- <img src="https://www.beercss.com/beer-and-woman.svg" class="responsive round medium-height">
297
- <h3>Welcome</h3>
298
- <h5>The beer is ready!</h5>
299
- </main>
300
- </body>
301
- </html>
302
- ```
303
-
304
- **We recommend using the material-dynamic-colors only when your app needs to change theme at runtime.**
305
-
306
- # Documentation
307
-
308
- Complete documentation and examples available at:
309
-
310
- - **[Documentation](docs/INDEX.md)**
311
- - **[Codepen](https://codepen.io/collection/XydYMB)**
312
- - **[Homepage](https://www.beercss.com)**
313
-
314
- # Contributing guide
315
-
316
- Hi! We are really excited that you are interested in contributing to Beer CSS! Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
317
-
318
- [Beer CSS Contributing Guidelines](CONTRIBUTING.md)
319
-
320
- # License
321
-
322
- [MIT](https://opensource.org/licenses/MIT)
323
-
324
- # Cheers to all stargazers 🍻
325
- [![Stargazers repo roster for @beercss/beercss](https://reporoster.com/stars/notext/beercss/beercss)](https://github.com/beercss/beercss/stargazers)
326
-
327
- ### Stargazers over time
328
- [![Stargazers over time](https://starchart.cc/beercss/beercss.svg?variant=adaptive)](https://starchart.cc/beercss/beercss)
1
+ <p align="center">
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
+ </p>
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="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 href="https://bundlephobia.com/package/beercss@4.0.0" target="_blank"><img src="https://img.shields.io/bundlephobia/minzip/beercss@4.0.0" alt="minzipped 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
+ </p>
12
+
13
+ # Beer CSS
14
+
15
+ Build material design interfaces in record time...
16
+
17
+ ...without stress for devs 🍺💛
18
+
19
+ Cheers, www.beercss.com
20
+
21
+ # Sponsors
22
+
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
+
25
+ <p align="center">
26
+ <a href="https://opencollective.com/beercss">Open Collective</a><br /><br />
27
+ <img src="https://opencollective.com/beercss/sponsors.svg?avatarHeight=56&button=false" alt="Sponsors">
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/15235526?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
34
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/12303444?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
35
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/40445940?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
36
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/74856856?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
37
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/419690?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
38
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/181576?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
39
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/797439?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
40
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/3647943?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
41
+ </p>
42
+
43
+ # Why?
44
+
45
+ - 🥇 The first CSS framework based on Material Design 3
46
+ - 👉 Latest "M3 Expressive" already.
47
+ - ⬇️ 10x smaller than others CSS frameworks based on Material Design.
48
+ - 🧙‍♂️ Translates Material Design to HTML semantic standard.
49
+ - 🤓 Ready to use with any JS framework.
50
+ - 🎯 Highly focused on DX.
51
+ - 🚫 No build steps, configurations or dependencies.
52
+ - ✨ Build modern interfaces without any custom CSS.
53
+ - [HTML compliance](https://validator.w3.org/nu/?doc=https://www.beercss.com)
54
+ - 💯 Google Lighthouse friendly
55
+
56
+ # A lightweight beer
57
+
58
+ Let's be honest, in the ever-evolving world of web development, we're all looking for that sweet spot: powerful functionality without the bloat. We want speed, efficiency, and something that doesn't feel like lugging around a digital elephant. And if you're looking at the chart below, you're probably thinking, "Wow, XYZ is huge!". You're not wrong. But look all the way to the top. See that? That's Beer CSS.
59
+
60
+ ![image](https://github.com/user-attachments/assets/23df0121-7716-4114-9751-38b1e519cfcd)
61
+
62
+ # The principles
63
+
64
+ This project was guided by the **"Germany Beer Purity Law"** or **"Reinheitsgebot"** created in 1516. This law states that beer should only be brewed with the following ingredients: **water**, **barley malt** and **hops**. Only 3 ingredients. Exciting, right? So we thinking about It and our 3 ingredients are: [Settings](docs/SETTINGS.md), [Elements](docs/ELEMENTS.md) and [Helpers](docs/HELPERS.md). This sounds weird at first time, because It's not BEM, OOCSS, SMACSS, ITCSS, "Utility first" or any other approach. Our approach doesn't avoid some bad practices, but is lightweight, tasty and pure like a beer. Just try it and feel it! 😁
65
+
66
+ ```
67
+ | SETTINGS | // The settings affects all document
68
+ |---------------|----|
69
+ | | |
70
+ | ELEMENTS | | // The elements are the components, widgets or tags
71
+ | | |
72
+ |---------------| |
73
+ | | |
74
+ | | |
75
+ | HELPERS |----| // The common helpers makes the elements more scalable and customizable
76
+ | |
77
+ | |
78
+ |---------------|
79
+ ```
80
+
81
+ # Get started
82
+
83
+ ### DEFAULT VERSION
84
+
85
+ ```html
86
+ <link href="https://cdn.jsdelivr.net/npm/beercss@4.0.0/dist/cdn/beer.min.css" rel="stylesheet" />
87
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.0/dist/cdn/beer.min.js"></script>
88
+ <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
+
91
+ ```js
92
+ npm i beercss
93
+ npm i material-dynamic-colors
94
+ ```
95
+
96
+ ```js
97
+ import "beercss";
98
+ import "material-dynamic-colors";
99
+ ```
100
+
101
+ ### SCOPED VERSION
102
+ Applied on child elements of `<* class="beer">...</*>`.
103
+
104
+ ```html
105
+ <link href="https://cdn.jsdelivr.net/npm/beercss@4.0.0/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
106
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.0/dist/cdn/beer.min.js"></script>
107
+ <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
+
110
+ ```js
111
+ npm i beercss
112
+ npm i material-dynamic-colors
113
+ ```
114
+
115
+ ```js
116
+ import "beercss/scoped";
117
+ import "material-dynamic-colors";
118
+ ```
119
+
120
+ ### CUSTOM ELEMENT VERSION
121
+ Applied on child elements of `<beer-css>...</beer-css>`.
122
+
123
+ ```html
124
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.0/dist/cdn/beer.custom-element.min.js"></script>
125
+ <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
+
128
+ ```js
129
+ npm i beercss
130
+ npm i material-dynamic-colors
131
+ ```
132
+
133
+ ```js
134
+ import "beercss/custom-element";
135
+ import "material-dynamic-colors";
136
+ ```
137
+
138
+ ### LOCAL CDN VERSION
139
+
140
+ Download all files from CDN https://cdn.jsdelivr.net/npm/beercss@4.0.0/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
+ ```html
143
+ <link href="/beercss/beer.min.css" rel="stylesheet" />
144
+ <script type="module" src="/beercss/beer.min.js"></script>
145
+ <script type="module" src="/beercss/material-dynamic-colors.min.js"></script>
146
+ ```
147
+
148
+ ### HTML
149
+
150
+ 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
+ ```html
153
+ <html>
154
+ <head>
155
+ <meta charset="UTF-8">
156
+ <meta name="viewport" content="width=device-width, initial-scale=1">
157
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
158
+ <meta name="google" content="notranslate">
159
+ <title>Hello world</title>
160
+ <link href="https://cdn.jsdelivr.net/npm/beercss@4.0.0/dist/cdn/beer.min.css" rel="stylesheet">
161
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@4.0.0/dist/cdn/beer.min.js"></script>
162
+ <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.4/dist/cdn/material-dynamic-colors.min.js"></script>
163
+ </head>
164
+ <body class="dark">
165
+ <nav class="left max l">
166
+ <header>
167
+ <nav>
168
+ <img src="https://www.beercss.com/favicon.png" class="circle extra">
169
+ <h6>Cheers</h6>
170
+ </nav>
171
+ </header>
172
+ <a>
173
+ <i>home</i>
174
+ <span>Home</span>
175
+ </a>
176
+ <a>
177
+ <i>search</i>
178
+ <span>Search</span>
179
+ </a>
180
+ <a>
181
+ <i>share</i>
182
+ <span>Share</span>
183
+ </a>
184
+ <a>
185
+ <i>more_vert</i>
186
+ <span>More</span>
187
+ </a>
188
+ <div class="divider"></div>
189
+ <a>
190
+ <i>widgets</i>
191
+ <span>Widgets</span>
192
+ </a>
193
+ <a>
194
+ <i>chat</i>
195
+ <span>Chat</span>
196
+ </a>
197
+ <a>
198
+ <i>help</i>
199
+ <span>Help</span>
200
+ </a>
201
+ </nav>
202
+
203
+ <nav class="left m">
204
+ <header>
205
+ <img src="https://www.beercss.com/favicon.png" class="circle extra">
206
+ </header>
207
+ <a>
208
+ <i>home</i>
209
+ <span>Home</span>
210
+ </a>
211
+ <a>
212
+ <i>search</i>
213
+ <span>Search</span>
214
+ </a>
215
+ <a>
216
+ <i>share</i>
217
+ <span>Share</span>
218
+ </a>
219
+ <a>
220
+ <i>more_vert</i>
221
+ <span>More</span>
222
+ </a>
223
+ </nav>
224
+
225
+ <nav class="bottom s">
226
+ <a>
227
+ <i>home</i>
228
+ </a>
229
+ <a>
230
+ <i>search</i>
231
+ </a>
232
+ <a>
233
+ <i>share</i>
234
+ </a>
235
+ <a>
236
+ <i>more_vert</i>
237
+ </a>
238
+ </nav>
239
+
240
+ <main class="responsive">
241
+ <img src="https://www.beercss.com/beer-and-woman.svg" class="responsive round medium-height">
242
+ <h3>Welcome</h3>
243
+ <h5>The beer is ready!</h5>
244
+ </main>
245
+ </body>
246
+ </html>
247
+ ```
248
+
249
+ **We recommend using the material-dynamic-colors only when your app needs to change theme at runtime.**
250
+
251
+ ### ✅ DO:
252
+
253
+ ```
254
+ // 1 setting to 1 document
255
+ <body class="dark|light">...</body>
256
+
257
+ // 1 element to N helpers
258
+ <element class="helper helper">...</element>
259
+ <div class="element helper helper">...</div>
260
+
261
+ // 1 main element per document
262
+ <...>
263
+ <main></main>
264
+ </...>
265
+
266
+ // inline/block elements in block elements
267
+ <div>
268
+ <div></div>
269
+ <span></span>
270
+ </div>
271
+
272
+ // write css like this
273
+ .element.helper {...}
274
+ .element > .element {...}
275
+ .element > .helper {...}
276
+ ```
277
+
278
+ ### 🚫 DON'T:
279
+
280
+ ```
281
+ // N elements to 1 tag
282
+ <div class="element element helper">...</div>
283
+ <element class="element helper">...</element>
284
+
285
+ // element with dependencies
286
+ <div class="element">
287
+ <div class="element-header">...</div>
288
+ <div class="element-content">...</div>
289
+ <div class="element-footer">...</div>
290
+ </div>
291
+
292
+ // N main elements per document
293
+ <...>
294
+ <main></main>
295
+ <main></main>
296
+ </...>
297
+
298
+ // block elements in inline elements
299
+ <span>
300
+ <div></div>
301
+ </span>
302
+
303
+ // write css like this
304
+ .element.element {...}
305
+ .element .element {...}
306
+ .element .helper {...}
307
+ ```
308
+
309
+ # Documentation
310
+
311
+ Complete documentation and examples available at:
312
+
313
+ - **[Documentation](docs/INDEX.md)**
314
+ - **[Codepen](https://codepen.io/collection/XydYMB)**
315
+ - **[Homepage](https://www.beercss.com)**
316
+
317
+ # Contributing guide
318
+
319
+ Hi! We are really excited that you are interested in contributing to Beer CSS! Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
320
+
321
+ [Beer CSS Contributing Guidelines](CONTRIBUTING.md)
322
+
323
+ # License
324
+
325
+ [MIT](https://opensource.org/licenses/MIT)
326
+
327
+ # Cheers to all stargazers 🍻
328
+ [![Stargazers repo roster for @beercss/beercss](https://reporoster.com/stars/notext/beercss/beercss)](https://github.com/beercss/beercss/stargazers)
329
+
330
+ ### Stargazers over time
331
+ [![Stargazers over time](https://starchart.cc/beercss/beercss.svg?variant=adaptive)](https://starchart.cc/beercss/beercss)