@anyblades/blades 3.1.0-beta.4 → 3.1.0-beta.6
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 +20 -10
- package/_includes/.prettierrc.json +12 -0
- package/_includes/package.json +10 -0
- package/css/blades.css +942 -1805
- package/css/blades.min.css +11 -1
- package/css/blades.ninja.css +1124 -2265
- 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 +942 -1805
- 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 +92 -0
- 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 +20 -0
- 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 +10 -0
- 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 +20 -0
- 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 +33 -0
- 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 +31 -0
- package/css/layered/forms/float-label/theme.css +28 -0
- package/css/layered/forms/float-label.css +57 -0
- 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 +10 -0
- 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 +11 -0
- 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 +13 -26
- package/src/blades/_index.css +9 -9
- package/src/blades/{_dropdown-popover.css → components/_dropdown-popover.css} +3 -3
- package/src/blades/forms/float-label/_index.css +2 -0
- 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 +7 -8
- 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/_includes/blades/links.liquid +0 -21
- package/_includes/blades/links.njk +0 -9
- package/_includes/blades/links.twig +0 -18
- package/src/blades/float-label/_index.css +0 -2
- package/src/ninja/_page-anchors.css +0 -10
- /package/src/blades/{_variables.css → _variables-blades.css} +0 -0
- /package/src/blades/{_modal.css → components/_modal-modern.css} +0 -0
- /package/src/blades/{_timeline.css → components/_timeline.css} +0 -0
- /package/src/blades/{_code.css → content/_code-block.css} +0 -0
- /package/src/blades/{_icon.css → content/_icon.css} +0 -0
- /package/src/blades/{float-label → forms/float-label}/_core.css +0 -0
- /package/src/blades/{float-label → forms/float-label}/_theme.css +0 -0
- /package/src/blades/{_columns.css → layout/_columns.css} +0 -0
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,21 +1,29 @@
|
|
|
1
|
-
#
|
|
1
|
+
# blades<sup>✨</sup>
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
![][V] ![][NEXT_V] ![][LIC] [![][X]][X_URL] [![][B]][B_URL] [![][M]][M_URL]
|
|
4
|
+
|
|
5
|
+
[V]: https://img.shields.io/npm/v/@anyblades/blades?label=&color=brightgreen
|
|
6
|
+
[NEXT_V]: https://img.shields.io/github/v/release/anyblades/blades?include_prereleases&label=next&color=blue
|
|
7
|
+
[LIC]: https://img.shields.io/badge/license-MIT-blue
|
|
8
|
+
[X]: https://img.shields.io/badge/78-white?logo=x&style=social
|
|
9
|
+
[X_URL]: https://x.com/BladesCSS
|
|
10
|
+
[B]: https://img.shields.io/bluesky/followers/blades.dev?label=
|
|
11
|
+
[B_URL]: https://bsky.app/profile/blades.dev
|
|
12
|
+
[M]: https://img.shields.io/mastodon/follow/117487235444867518?label=NEW
|
|
13
|
+
[M_URL]: https://mastodon.social/@BladesCSS
|
|
4
14
|
|
|
5
15
|
<!--section:summary-->
|
|
6
16
|
|
|
7
17
|
<h1><span class="mark-brand">Minimal CSS Framework</span> <small>for</small> Semantic HTML</h1>
|
|
8
18
|
|
|
9
|
-
<big>
|
|
19
|
+
<big>Blades CSS is a modern drop‑in successor to [Pico CSS](//picocss.com/docs/maintenance).</big>
|
|
10
20
|
|
|
11
|
-
|
|
21
|
+
Just switch `pico.css` to `blades.css` — and voilà!
|
|
12
22
|
|
|
13
23
|
<nav>
|
|
14
|
-
<a href="//blades.
|
|
15
|
-
<b hidden
|
|
16
|
-
<a href="//blades.
|
|
17
|
-
Standalone <i><i class="fa-brands fa-tailwind-css"></i><i class="fa-brands fa-bootstrap"></i></i>
|
|
18
|
-
</a>
|
|
24
|
+
<a href="//blades.dev/css/" role="button">Get started</a>
|
|
25
|
+
<b hidden> • </b>
|
|
26
|
+
<a href="//blades.dev/css/pico/" role="button" class="outline">Inspired by Pico ✨</a>
|
|
19
27
|
</nav>
|
|
20
28
|
|
|
21
29
|
<!--section:gh-only-->
|
|
@@ -105,6 +113,7 @@ import "@anyblades/blades/layered/forms/basics";
|
|
|
105
113
|
// in the component that renders a <dialog>
|
|
106
114
|
import "@anyblades/blades/layered/components/card";
|
|
107
115
|
import "@anyblades/blades/layered/components/modal";
|
|
116
|
+
import "@anyblades/blades/layered/components/modal-modern"; // optional: open animation without JS
|
|
108
117
|
```
|
|
109
118
|
|
|
110
119
|
```html
|
|
@@ -117,8 +126,9 @@ import "@anyblades/blades/layered/components/modal";
|
|
|
117
126
|
```
|
|
118
127
|
|
|
119
128
|
- 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.
|
|
129
|
+
- Blades' own parts are layered too, mostly in the same folders as Pico's: e.g. `components/modal-modern` adds the CSS-only open animation for `showModal()` on top of `components/modal`, and `components/dropdown-popover` styles `<ul popover>` / `<menu popover>` menus opened by a button. The others are `variables-blades`, `layout/columns`, `content/code-block`, `content/icon`, `forms/float-label`, `components/timeline` and `compact` (import it last, see below).
|
|
120
130
|
- 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.
|
|
121
|
-
- 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`, 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
|
+
- 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/modal-modern` expects `components/modal`, `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.
|
|
122
132
|
- 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.
|
|
123
133
|
- 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.
|
|
124
134
|
|