@anyblades/blades 3.1.0-beta.5 → 3.1.0-beta.7
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/.prettierrc.json +0 -7
- package/README.md +27 -50
- package/_includes/.prettierrc.json +12 -0
- package/_includes/package.json +10 -0
- package/css/blades.css +941 -1804
- package/css/blades.min.css +11 -1
- package/css/blades.ninja.css +1123 -2264
- package/css/blades.ninja.min.css +16 -1
- package/css/float-label.css +34 -187
- package/css/float-label.min.css +1 -1
- package/css/layered/blades.layered.css +941 -1804
- package/css/layered/blades.layered.min.css +11 -1
- package/css/layered/compact.css +10 -31
- package/css/layered/components/accordion.css +32 -21
- package/css/layered/components/card.css +8 -16
- package/css/layered/components/dropdown-popover.css +44 -59
- package/css/layered/components/dropdown.css +61 -61
- package/css/layered/components/group.css +40 -156
- package/css/layered/components/loading.css +28 -35
- package/css/layered/components/modal-modern.css +7 -15
- package/css/layered/components/modal.css +54 -65
- package/css/layered/components/nav.css +36 -36
- package/css/layered/components/progress.css +18 -23
- package/css/layered/components/timeline.css +5 -19
- package/css/layered/components/tooltip.css +88 -103
- package/css/layered/components.css +371 -517
- package/css/layered/content/button.css +37 -117
- package/css/layered/content/code-block.css +11 -23
- package/css/layered/content/code.css +11 -26
- package/css/layered/content/embedded-content.css +5 -10
- package/css/layered/content/figure.css +3 -5
- package/css/layered/content/icon.css +20 -47
- package/css/layered/content/link.css +18 -40
- package/css/layered/content/misc.css +1 -5
- package/css/layered/content/table.css +4 -10
- package/css/layered/content/typography.css +22 -41
- package/css/layered/content.css +102 -254
- package/css/layered/forms/basics.css +64 -142
- package/css/layered/forms/checkbox-radio-switch.css +46 -75
- package/css/layered/forms/float-label/core.css +13 -85
- package/css/layered/forms/float-label/theme.css +22 -104
- package/css/layered/forms/float-label.css +34 -187
- package/css/layered/forms/input-color.css +5 -5
- package/css/layered/forms/input-datetime.css +9 -26
- package/css/layered/forms/input-file.css +7 -8
- package/css/layered/forms/input-range.css +43 -50
- package/css/layered/forms/input-search.css +16 -47
- package/css/layered/forms.css +197 -355
- package/css/layered/layout/columns.css +4 -24
- package/css/layered/layout/container.css +13 -13
- package/css/layered/layout/document.css +4 -12
- package/css/layered/layout/grid.css +6 -8
- package/css/layered/layout/landmarks.css +1 -7
- package/css/layered/layout/overflow-auto.css +0 -3
- package/css/layered/layout/section.css +0 -3
- package/css/layered/layout.css +26 -39
- package/css/layered/utilities.css +6 -15
- package/css/layered/variables-blades.css +4 -16
- package/css/layered/variables.css +77 -181
- package/css/pico.conditional.css +785 -1368
- package/css/pico.conditional.min.css +1 -1
- package/css/pico.css +785 -1368
- package/css/pico.min.css +1 -1
- package/package.json +43 -31
- package/src/blades/_index.css +9 -9
- package/src/blades/components/_dropdown-popover.css +2 -0
- package/src/blades/components/_modal-modern.css +2 -0
- package/src/blades/forms/float-label/_index.css +2 -2
- package/src/blades.css +2 -2
- package/src/blades.ninja.css +3 -3
- package/src/float-label.css +1 -1
- package/src/ninja/_index.css +8 -9
- package/src/ninja/_table-helpers.css +4 -4
- package/src/ninja/_table-responsive.css +5 -5
- package/src/ninja/_utilities.css +1 -1
- package/src/pico/_index.css +6 -6
- package/src/pico/components/_index.css +9 -9
- package/src/pico/content/_index.css +8 -8
- package/src/pico/forms/_index.css +7 -7
- package/src/pico/layout/_index.css +5 -5
- package/src/pico.css +2 -2
- package/src/ninja/_scroll-to.css +0 -10
package/.prettierrc.json
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"printWidth": 120,
|
|
3
|
-
"plugins": ["prettier-plugin-jinja-template"],
|
|
4
3
|
"overrides": [
|
|
5
4
|
{
|
|
6
5
|
"files": "*.css",
|
|
7
6
|
"options": {
|
|
8
7
|
"printWidth": 100
|
|
9
8
|
}
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"files": ["*.njk", "*.html"],
|
|
13
|
-
"options": {
|
|
14
|
-
"parser": "jinja-template"
|
|
15
|
-
}
|
|
16
9
|
}
|
|
17
10
|
]
|
|
18
11
|
}
|
package/README.md
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
# blades<sup>✨</sup>
|
|
2
2
|
|
|
3
|
-
![][V] ![][NEXT_V] ![][LIC] [![][X]][X_URL] [![][B]][B_URL] [![][M]][M_URL]
|
|
3
|
+
![][V] ![][NEXT_V] ![][LIC] [![][X]][X_URL] [![][B]][B_URL] [![][M]][M_URL] [![][D]][D_URL]
|
|
4
4
|
|
|
5
5
|
[V]: https://img.shields.io/npm/v/@anyblades/blades?label=&color=brightgreen
|
|
6
6
|
[NEXT_V]: https://img.shields.io/github/v/release/anyblades/blades?include_prereleases&label=next&color=blue
|
|
7
7
|
[LIC]: https://img.shields.io/badge/license-MIT-blue
|
|
8
|
-
[X]:
|
|
8
|
+
[X]: https://img.shields.io/badge/82-white?logo=x&style=social
|
|
9
9
|
[X_URL]: https://x.com/BladesCSS
|
|
10
10
|
[B]: https://img.shields.io/bluesky/followers/blades.dev?label=
|
|
11
11
|
[B_URL]: https://bsky.app/profile/blades.dev
|
|
12
12
|
[M]: https://img.shields.io/mastodon/follow/117487235444867518?label=NEW
|
|
13
13
|
[M_URL]: https://mastodon.social/@BladesCSS
|
|
14
|
+
[D]: https://img.shields.io/badge/%23blades-white?logo=discord&style=social
|
|
15
|
+
[D_URL]: https://discord.gg/mg8f26C
|
|
14
16
|
|
|
15
17
|
<!--section:summary-->
|
|
16
18
|
|
|
@@ -18,7 +20,7 @@
|
|
|
18
20
|
|
|
19
21
|
<big>Blades CSS is a modern drop‑in successor to [Pico CSS](//picocss.com/docs/maintenance).</big>
|
|
20
22
|
|
|
21
|
-
Just switch `pico.css` to `blades.css
|
|
23
|
+
Just switch `pico.css` to `blades.css`— and voilà!
|
|
22
24
|
|
|
23
25
|
<nav>
|
|
24
26
|
<a href="//blades.dev/css/" role="button">Get started</a>
|
|
@@ -57,7 +59,7 @@ Live example: https://github.com/pallets/website/blob/main/src/pallets/templates
|
|
|
57
59
|
|
|
58
60
|
Full list of CSS files available on CDN: https://cdn.jsdelivr.net/npm/@anyblades/blades@3/css/
|
|
59
61
|
|
|
60
|
-
`blades.layered.min.css` is Blades wrapped in `@layer blades { }
|
|
62
|
+
`layered/blades.layered.min.css` is Blades wrapped in `@layer blades { }`. See [Layered modules](//blades.dev/css/layered/).
|
|
61
63
|
|
|
62
64
|
### <mark>C.</mark> Install with NPM
|
|
63
65
|
|
|
@@ -65,7 +67,7 @@ Full list of CSS files available on CDN: https://cdn.jsdelivr.net/npm/@anyblades
|
|
|
65
67
|
npm install @anyblades/blades
|
|
66
68
|
```
|
|
67
69
|
|
|
68
|
-
Then, `@import`
|
|
70
|
+
Then, `@import` the built `css/blades.css` into your CSS file:
|
|
69
71
|
|
|
70
72
|
```css
|
|
71
73
|
@import "@anyblades/blades";
|
|
@@ -83,53 +85,21 @@ Live example using <i class="fa-brands fa-tailwind-css"></i> Tailwind: https://g
|
|
|
83
85
|
|
|
84
86
|
<div><hr></div>
|
|
85
87
|
|
|
86
|
-
Or import only the
|
|
88
|
+
Or import only the parts you need, e.g. per page or per component. They come wrapped in `@layer blades`, so your unlayered styles win over them:
|
|
87
89
|
|
|
88
90
|
```css
|
|
89
|
-
@import "@anyblades/blades/
|
|
90
|
-
@import "@anyblades/blades/
|
|
91
|
-
@import "@anyblades/blades/
|
|
92
|
-
@import "@anyblades/blades/
|
|
93
|
-
@import "@anyblades/blades/
|
|
91
|
+
@import "@anyblades/blades/variables";
|
|
92
|
+
@import "@anyblades/blades/layout/document";
|
|
93
|
+
@import "@anyblades/blades/content/typography";
|
|
94
|
+
@import "@anyblades/blades/components/card";
|
|
95
|
+
@import "@anyblades/blades/components/modal";
|
|
94
96
|
```
|
|
95
97
|
|
|
96
98
|
- `variables` and `layout/document` are the minimum; keep the same order as [`src/pico/_index.css`](https://github.com/anyblades/blades/blob/main/src/pico/_index.css) (variables → layout → content → forms → components → utilities).
|
|
97
99
|
- `layout` doesn't pad `body > header/main/footer`. Add `layout/landmarks` for Pico's behaviour.
|
|
98
100
|
- Some parts build on others, e.g. `components/modal` expects `components/card`, and `components/group` and `components/dropdown` expect `forms/basics` and `content/button`.
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
#### With bundlers and component frameworks (SvelteKit, Next.js, Nuxt, Astro, …)
|
|
102
|
-
|
|
103
|
-
Import the parts from JavaScript, i.e. the root layout and the components that use them, rather than with `@import` inside a component's `<style>` block. Use the layered parts, `@anyblades/blades/layered/*`: they are the same parts wrapped in `@layer blades`, which a JS `import` can't add by itself.
|
|
104
|
-
|
|
105
|
-
```js
|
|
106
|
-
// root layout, once: the base and every part that others build on
|
|
107
|
-
import "@anyblades/blades/layered/variables";
|
|
108
|
-
import "@anyblades/blades/layered/layout/document";
|
|
109
|
-
import "@anyblades/blades/layered/content/typography";
|
|
110
|
-
import "@anyblades/blades/layered/content/button";
|
|
111
|
-
import "@anyblades/blades/layered/forms/basics";
|
|
112
|
-
|
|
113
|
-
// in the component that renders a <dialog>
|
|
114
|
-
import "@anyblades/blades/layered/components/card";
|
|
115
|
-
import "@anyblades/blades/layered/components/modal";
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
```html
|
|
119
|
-
<style>
|
|
120
|
-
/* unlayered, so it wins over Blades whatever the specificity (except Blades' !important) */
|
|
121
|
-
article {
|
|
122
|
-
max-width: 40rem;
|
|
123
|
-
}
|
|
124
|
-
</style>
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
- Bundlers dedupe JS-side CSS imports and split them per route, so each part is downloaded and cached once and only where it's used.
|
|
128
|
-
- Two layered `components/*` parts also carry Blades' own additions, as in `blades.css`: `components/modal` includes the CSS-only open animation for `showModal()`, and `components/dropdown-popover` styles `<ul popover>` / `<menu popover>` menus opened by a button.
|
|
129
|
-
- Override in your component's `<style>` or `app.css`, or set `--pico-*` variables on `:root` or on an element. Unlayered CSS always wins over `@layer blades`. The usual layer caveats apply: Blades' own `!important` declarations beat yours, and if you use other layered CSS, declare the order once, before anything else is loaded. For Tailwind v4 that is `@layer theme, base, blades, components, utilities;` at the top of the CSS file you import first (before `@import "tailwindcss"`), and that file has to be imported before any `layered/*` part, because the first `@layer` the browser sees fixes the order.
|
|
130
|
-
- Parts don't `@import` the parts they build on (e.g. `components/modal` expects `components/card`, `components/group` and `components/dropdown` expect `content/button` and `forms/basics`, `components/dropdown-popover` expects `components/dropdown`, and the `forms/*` extras expect `forms/basics`). If they did, every route chunk would carry its own copy. Import those shared parts once, at the root or next to the part that needs them; bundlers dedupe the imports.
|
|
131
|
-
- An `@import` inside a scoped `<style>` (Svelte, Astro, Vue `scoped`) is processed as that component's own styles. The rules get scoped to the component's markup (Svelte also prunes the unused ones) and are duplicated in every component that imports them.
|
|
132
|
-
- Landmark padding: `pico.css` and `blades.ninja.css` pad `body > header`, `body > main` and `body > footer` like Pico, which doesn't match when the framework wraps the page in an element (SvelteKit's `<div style="display: contents">`, Next.js pages router `#__next`, Nuxt `#__nuxt`, a SPA's `#root` / `#app`). `blades.css` doesn't pad them; with per-part imports, add `layout/landmarks` (or `layered/layout/landmarks`) for Pico's `body >` padding.
|
|
101
|
+
- See [Layered modules](//blades.dev/css/layered/) for the available parts, and for importing them from JavaScript in bundlers and component frameworks (SvelteKit, Next.js, Nuxt, Astro, …).
|
|
102
|
+
- The same parts without the layer are under `@anyblades/blades/src/…`, e.g. `@anyblades/blades/src/components/card`, to put them in a layer of your own (`@import "@anyblades/blades/src/components/card" layer(ui);`) or to run your own build. `@anyblades/blades/src` on its own is the source of the whole `blades.css`.
|
|
133
103
|
|
|
134
104
|
### <mark>D.</mark> Official starters
|
|
135
105
|
|
|
@@ -195,8 +165,8 @@ Add `<html data-compact>` for the whole page, or put the attribute on a single e
|
|
|
195
165
|
- **Where it ships:**
|
|
196
166
|
- included in `blades.css`
|
|
197
167
|
- also in `blades.layered.css`
|
|
198
|
-
- with per-part imports, add `@
|
|
199
|
-
- with `pico.conditional.css`, add `@anyblades/blades/compact` after it
|
|
168
|
+
- with per-part imports, add `@anyblades/blades/compact` after the other parts
|
|
169
|
+
- with `pico.conditional.css`, add `@anyblades/blades/src/compact` after it
|
|
200
170
|
- **What changes:**
|
|
201
171
|
- smaller control padding and 1.5rem block spacing
|
|
202
172
|
- a 0.5rem radius and a 3px focus ring
|
|
@@ -210,6 +180,8 @@ Add `<html data-compact>` for the whole page, or put the attribute on a single e
|
|
|
210
180
|
|
|
211
181
|
## Documentation
|
|
212
182
|
|
|
183
|
+
Blades CSS is a lightweight, minimal CSS framework for semantic HTML designed as a modern, drop-in successor to Pico CSS.
|
|
184
|
+
|
|
213
185
|
<!-- ToC as is from https://blades.ninja/#docs -->
|
|
214
186
|
<ul class="columns">
|
|
215
187
|
|
|
@@ -218,6 +190,7 @@ Add `<html data-compact>` for the whole page, or put the attribute on a single e
|
|
|
218
190
|
<ul><li><a href="//blades.ninja/css/">Quick start</a></li>
|
|
219
191
|
<li><a href="//blades.ninja/css/color-schemes/">Dark scheme</a></li>
|
|
220
192
|
<li><a href="//blades.ninja/css/variables/">CSS variables</a></li>
|
|
193
|
+
<li><a href="//blades.ninja/css/layered/">Layered modules <mark>NEW</mark></a></li>
|
|
221
194
|
<li><a href="//blades.ninja/css/conditional/">Conditional styling <mark>NEW</mark></a></li>
|
|
222
195
|
<li><a href="//blades.ninja/css/standalone/">Standalone version <mark>NEW</mark></a></li></ul>
|
|
223
196
|
</li>
|
|
@@ -287,18 +260,21 @@ Add `<html data-compact>` for the whole page, or put the attribute on a single e
|
|
|
287
260
|
|
|
288
261
|
---
|
|
289
262
|
|
|
263
|
+
<!--section:info-->
|
|
264
|
+
|
|
290
265
|
## <sup style>Trusted by</sup>
|
|
291
266
|
|
|
292
267
|
- 🐍 [Flask & Jinja](https://palletsprojects.com/) community website
|
|
293
|
-
- 🪐 [Grav CMS v2](https://getgrav.org/migrate-to-2#:~:text=blades) default theme
|
|
268
|
+
- 🪐 [Grav CMS v2](https://getgrav.org/migrate-to-2#:~:text=blades) default theme
|
|
294
269
|
|
|
295
270
|
<!--https://pulsar-wildlife.club/-->
|
|
296
271
|
|
|
297
|
-
|
|
272
|
+
## <sup style>Also used by</sup>
|
|
273
|
+
|
|
274
|
+
- https://www.followthatcar.com/
|
|
298
275
|
|
|
299
276
|
## <sup style>Featured by</sup> <!-- [1] big projects [2] awesome [3] smaller projects [4] blogs/social -->
|
|
300
277
|
|
|
301
|
-
- [getgrav.org](https://getgrav.org/migrate-to-2#:~:text=blades)
|
|
302
278
|
- https://usehadron.dev/
|
|
303
279
|
- [@11ty/buildawesome](https://bsky.app/profile/11ty.dev/post/3mp75r53ccv2b) [↗](https://mastodon.social/@11ty@neighborhood.11ty.dev/116816881367741413)
|
|
304
280
|
- [<i class="fa-brands fa-build-awesome mark-brand"></i> buildawesome.one](https://buildawesome.one/#:~:text=blades)
|
|
@@ -307,6 +283,7 @@ Add `<html data-compact>` for the whole page, or put the attribute on a single e
|
|
|
307
283
|
- [/gabrielizalo/awesome-css-frameworks](https://github.com/gabrielizalo/awesome-css-frameworks-and-ui-libraries/tree/master/Lightweight)
|
|
308
284
|
- https://github.com/eggplantpasta/greenroom
|
|
309
285
|
- [/adamdjbrett/11ty-wisp](https://github.com/adamdjbrett/11ty-wisp#features:~:text=blades) [↗](https://github.com/adamdjbrett/000000076#:~:text=blades)
|
|
286
|
+
- https://knives.ajitpanigrahi.com/
|
|
310
287
|
- [doany.io](https://doany.io/en/posts/svelte-bun-sqlite/#on-biome-and-css:~:text=anyblades)
|
|
311
288
|
- [@box464](https://mastodon.social/@box464/117442493473921346)
|
|
312
289
|
- [@draupnerdata](https://www.youtube.com/watch?v=yDjArj9HSjs&t=180s)
|