@finstack-com-public/design 0.5.0 → 0.6.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.
- package/CHANGELOG.md +69 -0
- package/dist/css/blocks.css +47 -0
- package/dist/css/blocks.md +18 -0
- package/dist/css/card.css +18 -4
- package/dist/css/card.md +2 -1
- package/dist/css/glass.css +30 -0
- package/dist/css/glass.md +18 -0
- package/dist/css/sweep.css +55 -0
- package/dist/css/sweep.md +20 -0
- package/dist/css/tokens.css +85 -50
- package/dist/css/wave.css +36 -0
- package/dist/css/wave.md +39 -0
- package/dist/css-text/blocks.d.ts +2 -0
- package/dist/css-text/blocks.js +1 -0
- package/dist/css-text/card.js +1 -1
- package/dist/css-text/glass.d.ts +2 -0
- package/dist/css-text/glass.js +1 -0
- package/dist/css-text/kit.js +5574 -1
- package/dist/css-text/sweep.d.ts +2 -0
- package/dist/css-text/sweep.js +1 -0
- package/dist/css-text/tokens.js +1 -1
- package/dist/css-text/wave.d.ts +2 -0
- package/dist/css-text/wave.js +37 -0
- package/dist/dom/dialog.js +13 -2
- package/dist/kit.css +275 -54
- package/dist/motifs/wave.webp +0 -0
- package/dist/react/util.d.ts +5 -1
- package/dist/react/util.js +10 -2
- package/dist/tokens/color.d.ts +5 -0
- package/dist/tokens/color.js +9 -0
- package/dist/tokens/contrast-pairs.js +20 -0
- package/dist/tokens/contrast.js +2 -0
- package/dist/tokens/grid.js +18 -17
- package/dist/tokens/index.d.ts +5 -4
- package/dist/tokens/scale.d.ts +3 -2
- package/dist/tokens/scale.js +6 -5
- package/dist/tokens.json +29 -18
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,63 @@
|
|
|
3
3
|
Written by hand for each release. Token names, class names, file paths and exports are the
|
|
4
4
|
public API. While the kit is 0.x, a minor version may break them, and its entry says so.
|
|
5
5
|
|
|
6
|
+
## 0.6.0 — 2026-11-06
|
|
7
|
+
|
|
8
|
+
Additive (kit T49, T50, T55, D2, D31, D33): the new look's decorative motifs, as four CSS blocks and one
|
|
9
|
+
generated image file. One existing token changes its look (the brand gradient's direction); nothing
|
|
10
|
+
that shipped in 0.5.0 was renamed or removed. Re-date this entry if the release slips.
|
|
11
|
+
|
|
12
|
+
- **New blocks** (one usage note per block in `css/`). Wave, sweep and blocks are decoration only:
|
|
13
|
+
`aria-hidden="true"`, no animation, hidden in forced colours and in print. Glass is not: it is a
|
|
14
|
+
surface that holds text, stays visible and uses system colours in forced colours.
|
|
15
|
+
- `.fs-glass`, a modifier on `.fs-panel`, `.fs-card` and `.fs-widget` that makes the surface a
|
|
16
|
+
translucent, blurred glass with a `--fs-glass-line` edge (`css/glass.md`).
|
|
17
|
+
- `.fs-wave`, a 3D dotted mesh in perspective at the foot of a section, cyan at the left to blue;
|
|
18
|
+
`--fs-wave-height` sets its height, `--fs-wave-image` points it at a self-hosted copy of the image
|
|
19
|
+
(`css/wave.md`).
|
|
20
|
+
- `.fs-sweep`, two soft curved bands behind a section: a thin crescent off the top left and a
|
|
21
|
+
large band off the bottom right (`css/sweep.md`).
|
|
22
|
+
- `.fs-blocks` with `.fs-blocks__block` and `.fs-blocks--loose`, the four-block abstract motif;
|
|
23
|
+
`--fs-blocks-size` sets the block size. It is not the logo's arrangement (`css/blocks.md`).
|
|
24
|
+
- **New file: `motifs/wave.webp`** (export `./motifs/*`, D31, D33). The wave is now an image file, not
|
|
25
|
+
CSS-drawn dots: the owner's ChatGPT image (licence cleared by the owner), converted by
|
|
26
|
+
`npm run motifs` (`scripts/make-wave.py`, from `art/wave-ai-source.png`, which is not in the package) to
|
|
27
|
+
a white-on-transparent WebP of 2172 x 380 (about 64 KB), used by `.fs-wave` as a mask. An earlier,
|
|
28
|
+
script-generated `wave-mesh.svg` was never released, so its removal is not a break.
|
|
29
|
+
`css/wave.css` reaches the file as `../motifs/wave.webp` and `kit.css` as `./motifs/wave.webp`.
|
|
30
|
+
**Products that copy kit files by name** (the calculation engine's embed) must copy `motifs/` too,
|
|
31
|
+
beside `css/` and `kit.css` (the file is `wave.webp`), or set `--fs-wave-image` to an absolute URL; a
|
|
32
|
+
mask from another origin needs CORS. `css-text/kit.js` and `css-text/wave.js` carry the image as
|
|
33
|
+
`new URL('../motifs/wave.webp', import.meta.url)`, so an adopted stylesheet in a shadow root
|
|
34
|
+
finds it and a bundler copies it.
|
|
35
|
+
- **Changed: `--fs-gradient-brand` and `--fs-gradient-brand-soft` now run cyan (top left) to blue**
|
|
36
|
+
(`linear-gradient(135deg, var(--fs-brand-end), var(--fs-brand-start))`), as the concepts do. The stop
|
|
37
|
+
roles keep their names; `.fs-blocks` keeps its own order (blue first).
|
|
38
|
+
- **New tokens:** the colour roles `--fs-glass-bg`, `--fs-glass-line`, `--fs-sweep-1`,
|
|
39
|
+
`--fs-sweep-2` and `--fs-wave-glow` (light and dark); and `--fs-glass-blur`. The patterns
|
|
40
|
+
`--fs-motif-dots`, `--fs-motif-dots-sm`, `--fs-motif-wave` and `--fs-motif-wave-back`, added during
|
|
41
|
+
T49 for the CSS-drawn wave, are removed again (T50) and never shipped.
|
|
42
|
+
- **Fixed:** the `.fs-appbar` dark island now re-declares every pattern and gradient built from
|
|
43
|
+
colour variables (`--fs-gradient-brand`, `--fs-gradient-brand-soft`, `--fs-gap-hatch`,
|
|
44
|
+
`--fs-gap-hatch-sm`), so inside the app bar they resolve to the island's colours, not the page's.
|
|
45
|
+
- **Changed: card hover is a lift, not a blue border** (kit T56, asked by the owner). `.fs-card:hover`
|
|
46
|
+
takes `--fs-shadow-2`, rises 2 px (no rise under reduced motion) and its edge turns the neutral
|
|
47
|
+
`--fs-line-strong` (never the accent), with no fill change;
|
|
48
|
+
press settles back with the faint tint. This includes glass cards, which no longer get an accent
|
|
49
|
+
edge on hover.
|
|
50
|
+
- **Fixed: two React-wrapper bugs** (kit T52, T53, reported by bi-app, which can drop its workarounds).
|
|
51
|
+
- T52: under `<StrictMode>` a reopened `Dialog` or `Sheet` was closed again, because the native
|
|
52
|
+
`close` event of the destroyed first instance arrived after the remount. `createDialog().destroy()`
|
|
53
|
+
now swallows that one event, so it never reaches the next instance on the same element.
|
|
54
|
+
- T53: `fs-open`/`fs-close` (and any `fs-*` event) from a nested block, such as a `Loader` or a
|
|
55
|
+
`Popover` inside a `Popover` or `Dialog`, bubbled into the outer wrapper's listener and closed it.
|
|
56
|
+
The wrappers' shared `useFsEvent` now reacts only to events whose `target` is the wrapper's own
|
|
57
|
+
root. The plain-DOM helpers add no `fs-*` listeners of their own, so they were not affected.
|
|
58
|
+
- **Gallery:** a new `motifs` page; the tokens page gets a "Motif layers" group.
|
|
59
|
+
- **Visual baselines** (`e2e/visual-baselines/`) are regenerated: the `motifs` page is new, and the
|
|
60
|
+
tokens and index pages changed (T50: every page that shows the brand gradient or the motifs). No
|
|
61
|
+
app-bar page changed.
|
|
62
|
+
|
|
6
63
|
## 0.5.0 — 2026-11-05
|
|
7
64
|
|
|
8
65
|
**Breaking (kit T48, D29):** the default look is new. The purple and orange brand is replaced by a
|
|
@@ -48,6 +105,18 @@ updates. **Nothing public was renamed or removed:** every token, class and expor
|
|
|
48
105
|
series order or ramps; logo slots are unaffected.
|
|
49
106
|
- grizzbi-core and grizzbi-verify: hard-coded purple, custom shadows, and the heading font (it is
|
|
50
107
|
now Plus Jakarta Sans). Screenshot baselines will change.
|
|
108
|
+
- **Dark BI grid (D32, T51):** the `--fs-grid-*` dark values move from warm greys and browns to the
|
|
109
|
+
kit's navy neutrals; light is unchanged. BI App: check any dark grid value you override or copy.
|
|
110
|
+
Old to new: `line` `#3a3936` to `#22356a`; `header-bg` `#2a2926` to `#152a5a`; `label-bg` `#2a2926`
|
|
111
|
+
to `#13244f`; `row-hover` `rgba(165,165,255,0.06)` to `rgba(232,238,252,0.06)`; `subtotal-bg`
|
|
112
|
+
`#263040` to `#182f68`; `input-bg` `#3a3520` (amber) to `#10394a` (teal-tinted, cooler);
|
|
113
|
+
`locked-ink` `#a3a29c` to `#93a1c2`; `locked-bg` `#2c2c2a` to `#050d26`; `error-bg` and
|
|
114
|
+
`lock-other-bg` `#3d1f1d` to `#3d1a26`; `lock-mine-bg` `#1c2e20` to `#13382b`; `stale-ink`
|
|
115
|
+
`#a3a29c` to `#93a1c2`; `editing-bg` `#2e2e52` to `#223a7e`; `nodata-bg`
|
|
116
|
+
`rgba(255,255,255,0.03)` to `rgba(232,238,252,0.04)`; `chevron` `#7d7c76` to `#6f81ad`;
|
|
117
|
+
`tree-guide` `#3a3936` to `#22356a`. Unchanged: the red inks, `dirty-ink`, `selected`,
|
|
118
|
+
`stale-dot` (amber), `selected-invalid-bg`. New contrast pairs: selected outline on the input and
|
|
119
|
+
editing fills, dirty ink on editing, chevron on subtotal.
|
|
51
120
|
- **Visual baselines** (`e2e/visual-baselines/`) are regenerated for the new look.
|
|
52
121
|
|
|
53
122
|
## 0.4.0 — 2026-11-04
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* Blocks (spec 02 I). Usage: blocks.md. */
|
|
2
|
+
@layer fs.components {
|
|
3
|
+
/* An empty-looking aria-hidden square of four rounded squares in a regular 2x2 grid, coloured
|
|
4
|
+
along the brand gradient from the first block to the fourth. */
|
|
5
|
+
.fs-blocks {
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-columns: 1fr 1fr;
|
|
8
|
+
grid-template-rows: 1fr 1fr;
|
|
9
|
+
gap: 10%;
|
|
10
|
+
width: var(--fs-blocks-size, 48px);
|
|
11
|
+
height: var(--fs-blocks-size, 48px);
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
flex: none;
|
|
14
|
+
}
|
|
15
|
+
.fs-blocks__block {
|
|
16
|
+
display: block;
|
|
17
|
+
border-radius: 28%;
|
|
18
|
+
background: var(--fs-brand-start);
|
|
19
|
+
}
|
|
20
|
+
.fs-blocks__block:nth-child(2) {
|
|
21
|
+
background: color-mix(in oklab, var(--fs-brand-start) 66%, var(--fs-brand-end));
|
|
22
|
+
}
|
|
23
|
+
.fs-blocks__block:nth-child(3) {
|
|
24
|
+
background: color-mix(in oklab, var(--fs-brand-start) 33%, var(--fs-brand-end));
|
|
25
|
+
}
|
|
26
|
+
.fs-blocks__block:nth-child(4) {
|
|
27
|
+
background: var(--fs-brand-end);
|
|
28
|
+
}
|
|
29
|
+
/* Hero decoration: the cluster tilts and the last block steps outward. Still a square grid. */
|
|
30
|
+
.fs-blocks--loose {
|
|
31
|
+
rotate: -12deg;
|
|
32
|
+
}
|
|
33
|
+
.fs-blocks--loose .fs-blocks__block:nth-child(4) {
|
|
34
|
+
translate: 15% 15%;
|
|
35
|
+
}
|
|
36
|
+
/* Decoration: nothing to show in forced colours, nothing to print. */
|
|
37
|
+
@media (forced-colors: active) {
|
|
38
|
+
.fs-blocks {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
@media print {
|
|
43
|
+
.fs-blocks {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Blocks — `.fs-blocks`
|
|
2
|
+
|
|
3
|
+
Spec 02 I. CSS: `css/blocks.css`. Gallery: `motifs.html`.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<span class="fs-blocks" aria-hidden="true">
|
|
7
|
+
<span class="fs-blocks__block"></span><span class="fs-blocks__block"></span>
|
|
8
|
+
<span class="fs-blocks__block"></span><span class="fs-blocks__block"></span>
|
|
9
|
+
</span>
|
|
10
|
+
<span class="fs-blocks fs-blocks--loose" aria-hidden="true" style="--fs-blocks-size: 160px">...</span>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- Four rounded squares in a regular 2x2 grid, coloured along the brand gradient: the first `--fs-brand-start`,
|
|
14
|
+
the fourth `--fs-brand-end`, the two between mixes of them. An abstract motif, never the logo's arrangement.
|
|
15
|
+
- Size: `--fs-blocks-size` (default 48 px).
|
|
16
|
+
- `--loose`: for hero decoration. The cluster tilts 12 degrees and the fourth block steps outward by 15%.
|
|
17
|
+
- Decoration only: always `aria-hidden="true"`, never carries information. Hidden in forced colours and in
|
|
18
|
+
print. Not animated.
|
package/dist/css/card.css
CHANGED
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
border-radius: var(--fs-radius-xl);
|
|
17
17
|
box-shadow: var(--fs-shadow-1);
|
|
18
18
|
cursor: pointer;
|
|
19
|
-
transition:
|
|
19
|
+
transition:
|
|
20
|
+
border-color var(--fs-dur) var(--fs-ease),
|
|
21
|
+
box-shadow var(--fs-dur) var(--fs-ease),
|
|
22
|
+
translate var(--fs-dur) var(--fs-ease);
|
|
20
23
|
}
|
|
21
24
|
.fs-card__kicker {
|
|
22
25
|
display: block;
|
|
@@ -49,14 +52,25 @@
|
|
|
49
52
|
color: var(--fs-ink-muted);
|
|
50
53
|
}
|
|
51
54
|
|
|
52
|
-
/*
|
|
55
|
+
/* Hover is a soft lift: the stronger shadow, a 2 px rise and a neutral stronger edge (never the accent), no fill (T56).
|
|
56
|
+
Press settles back with a faint tint over the surface as an image, so the card never turns
|
|
57
|
+
see-through. */
|
|
53
58
|
@media (hover: hover) {
|
|
54
59
|
.fs-card:hover {
|
|
55
|
-
border-color: var(--fs-
|
|
56
|
-
|
|
60
|
+
border-color: var(--fs-line-strong);
|
|
61
|
+
box-shadow: var(--fs-shadow-2);
|
|
62
|
+
translate: 0 -2px;
|
|
63
|
+
}
|
|
64
|
+
/* Reduced motion: the shadow still changes, but the card does not move. */
|
|
65
|
+
@media (prefers-reduced-motion: reduce) {
|
|
66
|
+
.fs-card:hover {
|
|
67
|
+
translate: none;
|
|
68
|
+
}
|
|
57
69
|
}
|
|
58
70
|
}
|
|
59
71
|
.fs-card:active {
|
|
72
|
+
box-shadow: var(--fs-shadow-1);
|
|
73
|
+
translate: none;
|
|
60
74
|
background-image: linear-gradient(var(--fs-bg-active), var(--fs-bg-active));
|
|
61
75
|
}
|
|
62
76
|
|
package/dist/css/card.md
CHANGED
|
@@ -13,5 +13,6 @@ Spec 02 D. CSS: `css/card.css`. Gallery: `overlays.html`.
|
|
|
13
13
|
|
|
14
14
|
- The whole card is one link or one button: put no other control inside it. Use spans, since
|
|
15
15
|
a link can't hold block elements.
|
|
16
|
-
- Hover:
|
|
16
|
+
- Hover: a soft lift (the stronger shadow `--fs-shadow-2`, a 2 px rise and the neutral `--fs-line-strong` edge, never the
|
|
17
|
+
accent; no fill; under reduced motion no rise); press: back down with a faint tint; focus: the ring. The calculation engine's
|
|
17
18
|
calculator cards, Grizzbi's recent projects and sample report.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* Glass (spec 02 I). Usage: glass.md. */
|
|
2
|
+
@layer fs.components {
|
|
3
|
+
/* A modifier on a container block. It is doubled so it beats the block's own surface, whichever
|
|
4
|
+
file comes later in kit.css (the files load alphabetically: card, glass, panel, widget). */
|
|
5
|
+
.fs-glass.fs-glass {
|
|
6
|
+
background-color: var(--fs-glass-bg);
|
|
7
|
+
border-color: var(--fs-glass-line);
|
|
8
|
+
-webkit-backdrop-filter: blur(var(--fs-glass-blur)) saturate(140%);
|
|
9
|
+
backdrop-filter: blur(var(--fs-glass-blur)) saturate(140%);
|
|
10
|
+
}
|
|
11
|
+
/* The doubled rule above would beat the card's hover edge (same specificity, later file). */
|
|
12
|
+
@media (hover: hover) {
|
|
13
|
+
.fs-glass.fs-card:hover {
|
|
14
|
+
border-color: var(--fs-line-strong);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/* Without backdrop-filter the fill would let the ground show through unblurred. */
|
|
18
|
+
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
19
|
+
.fs-glass.fs-glass {
|
|
20
|
+
background-color: var(--fs-bg-surface);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/* Not decoration: a surface that holds text. Forced colours use the system colours. */
|
|
24
|
+
@media (forced-colors: active) {
|
|
25
|
+
.fs-glass.fs-glass {
|
|
26
|
+
background-color: Canvas;
|
|
27
|
+
border-color: CanvasText;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Glass — `.fs-glass`
|
|
2
|
+
|
|
3
|
+
Spec 02 I. CSS: `css/glass.css`. Gallery: `motifs.html`.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<article class="fs-panel fs-glass">…</article>
|
|
7
|
+
<a class="fs-card fs-glass" href="…">…</a>
|
|
8
|
+
<div class="fs-widget fs-glass">…</div>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- A modifier for `.fs-panel`, `.fs-card` and `.fs-widget`: a translucent fill (`--fs-glass-bg`), a light edge
|
|
12
|
+
(`--fs-glass-line`) and a 16 px backdrop blur (`--fs-glass-blur`). A glass card's hover lift and press tint still work.
|
|
13
|
+
- Use it over something worth blurring: a sweep, a gradient wash or a photo. On a plain `bg-surface` it adds
|
|
14
|
+
nothing, so leave it off.
|
|
15
|
+
- Text on glass is contrast-tested only over the kit's grounds (the page, and both ends of the brand wash). Over a
|
|
16
|
+
photo or any other ground, check the contrast yourself.
|
|
17
|
+
- Not decoration: it is not `aria-hidden` and stays in forced colours (the system colours apply) and in print.
|
|
18
|
+
- Without `backdrop-filter` support the fill falls back to `--fs-bg-surface`.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* Sweep (spec 02 I). Usage: sweep.md. */
|
|
2
|
+
@layer fs.components {
|
|
3
|
+
/* A section or page wrapper that carries two soft curved bands behind its content, like the
|
|
4
|
+
concept backgrounds: a thin crescent off the top-left corner and a large band off the
|
|
5
|
+
bottom-right. The band is an ellipse with a soft fill and a brighter rim (the border is drawn
|
|
6
|
+
over the same translucent fill, so it reads as a thin brighter edge). The crescent is an
|
|
7
|
+
ellipse with no fill and only a bottom border, which tapers to nothing at both ends, turned so
|
|
8
|
+
its thick middle faces the content. The host isolates its stacking so the bands sit behind the
|
|
9
|
+
content but above the host's own background. */
|
|
10
|
+
.fs-sweep {
|
|
11
|
+
position: relative;
|
|
12
|
+
isolation: isolate;
|
|
13
|
+
overflow: clip;
|
|
14
|
+
}
|
|
15
|
+
.fs-sweep::before,
|
|
16
|
+
.fs-sweep::after {
|
|
17
|
+
content: '';
|
|
18
|
+
position: absolute;
|
|
19
|
+
z-index: -1;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
width: 140%;
|
|
22
|
+
height: 90%;
|
|
23
|
+
border: 2px solid var(--fs-sweep-1);
|
|
24
|
+
border-radius: 50%;
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
}
|
|
27
|
+
.fs-sweep::before {
|
|
28
|
+
top: -48%;
|
|
29
|
+
left: -22%;
|
|
30
|
+
width: 50%;
|
|
31
|
+
height: 80%;
|
|
32
|
+
border: 0 solid var(--fs-sweep-1);
|
|
33
|
+
border-bottom-width: 18px;
|
|
34
|
+
rotate: -55deg;
|
|
35
|
+
}
|
|
36
|
+
.fs-sweep::after {
|
|
37
|
+
bottom: -52%;
|
|
38
|
+
right: -58%;
|
|
39
|
+
background: var(--fs-sweep-2);
|
|
40
|
+
border-color: var(--fs-sweep-2);
|
|
41
|
+
}
|
|
42
|
+
/* Decoration: nothing to show in forced colours, nothing to print. */
|
|
43
|
+
@media (forced-colors: active) {
|
|
44
|
+
.fs-sweep::before,
|
|
45
|
+
.fs-sweep::after {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
@media print {
|
|
50
|
+
.fs-sweep::before,
|
|
51
|
+
.fs-sweep::after {
|
|
52
|
+
display: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Sweep — `.fs-sweep`
|
|
2
|
+
|
|
3
|
+
Spec 02 I. CSS: `css/sweep.css`. Gallery: `motifs.html`.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<section class="fs-sweep">
|
|
7
|
+
<h2>Heading</h2>
|
|
8
|
+
<p>Content keeps its own stacking.</p>
|
|
9
|
+
</section>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
- Goes on a section or page wrapper. Two soft curved bands behind the content: a thin crescent off the
|
|
13
|
+
top-left (`::before`, `--fs-sweep-1`, an unfilled ellipse whose 18 px bottom rim tapers to nothing at both
|
|
14
|
+
ends), and a very large soft ellipse off the bottom-right (`::after`, `--fs-sweep-2`) with a thin brighter rim
|
|
15
|
+
of the same role. The wrapper gets `position: relative; isolation: isolate; overflow: clip`, so the
|
|
16
|
+
bands sit above its own background and below everything inside.
|
|
17
|
+
- The sweep isolates stacking (`isolation: isolate`) and clips (`overflow: clip`, so `position: sticky` inside still works). Put it on a section, not on a page wrapper that holds sticky bars or fallback-positioned dropdowns/overlays: the kit's `--fs-z-*` layers cannot rise above siblings outside it.
|
|
18
|
+
- Pairs with `.fs-glass` blocks: put glass cards on a sweep, not on plain `bg-surface`.
|
|
19
|
+
- No markup of its own, so nothing to hide from assistive technology. Pointer-transparent. Hidden in forced
|
|
20
|
+
colours and in print. Not animated. No variants.
|
package/dist/css/tokens.css
CHANGED
|
@@ -52,6 +52,11 @@
|
|
|
52
52
|
--fs-brand-wash-start: #e8f0fe;
|
|
53
53
|
--fs-brand-wash-end: #e3f8fb;
|
|
54
54
|
--fs-ring-halo: #ffffff;
|
|
55
|
+
--fs-glass-bg: rgba(255,255,255,0.72);
|
|
56
|
+
--fs-glass-line: rgba(255,255,255,0.85);
|
|
57
|
+
--fs-sweep-1: rgba(43,124,246,0.10);
|
|
58
|
+
--fs-sweep-2: rgba(20,212,224,0.16);
|
|
59
|
+
--fs-wave-glow: transparent;
|
|
55
60
|
--fs-neutral-ink: #3b4a6b;
|
|
56
61
|
--fs-neutral-wash: #eef3fa;
|
|
57
62
|
--fs-neutral-edge: #7a88a6;
|
|
@@ -249,6 +254,7 @@
|
|
|
249
254
|
--fs-size-content-sm: 736px;
|
|
250
255
|
--fs-size-touch: 24px;
|
|
251
256
|
--fs-size-input-sm: 10em;
|
|
257
|
+
--fs-glass-blur: 16px;
|
|
252
258
|
--fs-line-width: 1px;
|
|
253
259
|
--fs-ring-width: 2px;
|
|
254
260
|
--fs-ring-halo-width: 2px;
|
|
@@ -266,8 +272,8 @@
|
|
|
266
272
|
--fs-z-toast: 400;
|
|
267
273
|
--fs-gap-hatch: repeating-linear-gradient(135deg, var(--fs-gap-hatch-tint) 0 6px, transparent 6px 14px);
|
|
268
274
|
--fs-gap-hatch-sm: repeating-linear-gradient(135deg, var(--fs-gap-hatch-tint) 0 5px, transparent 5px 11px);
|
|
269
|
-
--fs-gradient-brand: linear-gradient(135deg, var(--fs-brand-
|
|
270
|
-
--fs-gradient-brand-soft: linear-gradient(135deg, var(--fs-brand-wash-
|
|
275
|
+
--fs-gradient-brand: linear-gradient(135deg, var(--fs-brand-end), var(--fs-brand-start));
|
|
276
|
+
--fs-gradient-brand-soft: linear-gradient(135deg, var(--fs-brand-wash-end), var(--fs-brand-wash-start));
|
|
271
277
|
--fs-chart-area-alpha: 0.18;
|
|
272
278
|
--fs-text-body-size: 13px;
|
|
273
279
|
--fs-text-body-line: 20px;
|
|
@@ -315,6 +321,11 @@
|
|
|
315
321
|
--fs-brand-wash-start: #13244f;
|
|
316
322
|
--fs-brand-wash-end: #0f3358;
|
|
317
323
|
--fs-ring-halo: var(--fs-p-navy-950);
|
|
324
|
+
--fs-glass-bg: rgba(14,29,69,0.72);
|
|
325
|
+
--fs-glass-line: rgba(141,184,255,0.18);
|
|
326
|
+
--fs-sweep-1: rgba(43,124,246,0.20);
|
|
327
|
+
--fs-sweep-2: rgba(20,212,224,0.14);
|
|
328
|
+
--fs-wave-glow: rgba(20,212,224,0.55);
|
|
318
329
|
--fs-neutral-ink: #b9c6e2;
|
|
319
330
|
--fs-neutral-wash: #152a5a;
|
|
320
331
|
--fs-neutral-edge: #6f81ad;
|
|
@@ -363,31 +374,31 @@
|
|
|
363
374
|
--fs-shadow-1: 0 1px 2px rgba(2,6,20,0.10), 0 8px 28px rgba(2,6,20,0.16);
|
|
364
375
|
--fs-shadow-2: 0 4px 20px rgba(2,6,20,0.24);
|
|
365
376
|
--fs-shadow-3: 0 24px 64px rgba(2,6,20,0.44);
|
|
366
|
-
--fs-grid-line: #
|
|
367
|
-
--fs-grid-header-bg: #
|
|
368
|
-
--fs-grid-label-bg: #
|
|
369
|
-
--fs-grid-row-hover: rgba(
|
|
370
|
-
--fs-grid-subtotal-bg: #
|
|
371
|
-
--fs-grid-input-bg: #
|
|
372
|
-
--fs-grid-locked-ink: #
|
|
373
|
-
--fs-grid-locked-bg: #
|
|
377
|
+
--fs-grid-line: #22356a;
|
|
378
|
+
--fs-grid-header-bg: #152a5a;
|
|
379
|
+
--fs-grid-label-bg: #13244f;
|
|
380
|
+
--fs-grid-row-hover: rgba(232,238,252,0.06);
|
|
381
|
+
--fs-grid-subtotal-bg: #182f68;
|
|
382
|
+
--fs-grid-input-bg: #10394a;
|
|
383
|
+
--fs-grid-locked-ink: #93a1c2;
|
|
384
|
+
--fs-grid-locked-bg: #050d26;
|
|
374
385
|
--fs-grid-error-ink: #ff8a80;
|
|
375
|
-
--fs-grid-error-bg: #
|
|
386
|
+
--fs-grid-error-bg: #3d1a26;
|
|
376
387
|
--fs-grid-negative-ink: #ff8a80;
|
|
377
|
-
--fs-grid-stale-ink: #
|
|
388
|
+
--fs-grid-stale-ink: #93a1c2;
|
|
378
389
|
--fs-grid-stale-dot: #f9a825;
|
|
379
390
|
--fs-grid-dirty-ink: #a5a5ff;
|
|
380
391
|
--fs-grid-invalid-ink: #ff8a80;
|
|
381
392
|
--fs-grid-selected: #8c8cff;
|
|
382
393
|
--fs-grid-selected-invalid-bg: rgba(255,138,128,0.08);
|
|
383
|
-
--fs-grid-editing-bg: #
|
|
384
|
-
--fs-grid-nodata-bg: rgba(
|
|
385
|
-
--fs-grid-chevron: #
|
|
386
|
-
--fs-grid-tree-guide: #
|
|
394
|
+
--fs-grid-editing-bg: #223a7e;
|
|
395
|
+
--fs-grid-nodata-bg: rgba(232,238,252,0.04);
|
|
396
|
+
--fs-grid-chevron: #6f81ad;
|
|
397
|
+
--fs-grid-tree-guide: #22356a;
|
|
387
398
|
--fs-grid-lock-mine-ink: #7fc98a;
|
|
388
|
-
--fs-grid-lock-mine-bg: #
|
|
399
|
+
--fs-grid-lock-mine-bg: #13382b;
|
|
389
400
|
--fs-grid-lock-other-ink: #ff8a80;
|
|
390
|
-
--fs-grid-lock-other-bg: #
|
|
401
|
+
--fs-grid-lock-other-bg: #3d1a26;
|
|
391
402
|
--fs-syntax-keyword: #e3a3de;
|
|
392
403
|
--fs-syntax-operator: #b9c6e2;
|
|
393
404
|
--fs-syntax-function: #8ab8f0;
|
|
@@ -445,6 +456,11 @@
|
|
|
445
456
|
--fs-brand-wash-start: #13244f;
|
|
446
457
|
--fs-brand-wash-end: #0f3358;
|
|
447
458
|
--fs-ring-halo: var(--fs-p-navy-950);
|
|
459
|
+
--fs-glass-bg: rgba(14,29,69,0.72);
|
|
460
|
+
--fs-glass-line: rgba(141,184,255,0.18);
|
|
461
|
+
--fs-sweep-1: rgba(43,124,246,0.20);
|
|
462
|
+
--fs-sweep-2: rgba(20,212,224,0.14);
|
|
463
|
+
--fs-wave-glow: rgba(20,212,224,0.55);
|
|
448
464
|
--fs-neutral-ink: #b9c6e2;
|
|
449
465
|
--fs-neutral-wash: #152a5a;
|
|
450
466
|
--fs-neutral-edge: #6f81ad;
|
|
@@ -493,31 +509,31 @@
|
|
|
493
509
|
--fs-shadow-1: 0 1px 2px rgba(2,6,20,0.10), 0 8px 28px rgba(2,6,20,0.16);
|
|
494
510
|
--fs-shadow-2: 0 4px 20px rgba(2,6,20,0.24);
|
|
495
511
|
--fs-shadow-3: 0 24px 64px rgba(2,6,20,0.44);
|
|
496
|
-
--fs-grid-line: #
|
|
497
|
-
--fs-grid-header-bg: #
|
|
498
|
-
--fs-grid-label-bg: #
|
|
499
|
-
--fs-grid-row-hover: rgba(
|
|
500
|
-
--fs-grid-subtotal-bg: #
|
|
501
|
-
--fs-grid-input-bg: #
|
|
502
|
-
--fs-grid-locked-ink: #
|
|
503
|
-
--fs-grid-locked-bg: #
|
|
512
|
+
--fs-grid-line: #22356a;
|
|
513
|
+
--fs-grid-header-bg: #152a5a;
|
|
514
|
+
--fs-grid-label-bg: #13244f;
|
|
515
|
+
--fs-grid-row-hover: rgba(232,238,252,0.06);
|
|
516
|
+
--fs-grid-subtotal-bg: #182f68;
|
|
517
|
+
--fs-grid-input-bg: #10394a;
|
|
518
|
+
--fs-grid-locked-ink: #93a1c2;
|
|
519
|
+
--fs-grid-locked-bg: #050d26;
|
|
504
520
|
--fs-grid-error-ink: #ff8a80;
|
|
505
|
-
--fs-grid-error-bg: #
|
|
521
|
+
--fs-grid-error-bg: #3d1a26;
|
|
506
522
|
--fs-grid-negative-ink: #ff8a80;
|
|
507
|
-
--fs-grid-stale-ink: #
|
|
523
|
+
--fs-grid-stale-ink: #93a1c2;
|
|
508
524
|
--fs-grid-stale-dot: #f9a825;
|
|
509
525
|
--fs-grid-dirty-ink: #a5a5ff;
|
|
510
526
|
--fs-grid-invalid-ink: #ff8a80;
|
|
511
527
|
--fs-grid-selected: #8c8cff;
|
|
512
528
|
--fs-grid-selected-invalid-bg: rgba(255,138,128,0.08);
|
|
513
|
-
--fs-grid-editing-bg: #
|
|
514
|
-
--fs-grid-nodata-bg: rgba(
|
|
515
|
-
--fs-grid-chevron: #
|
|
516
|
-
--fs-grid-tree-guide: #
|
|
529
|
+
--fs-grid-editing-bg: #223a7e;
|
|
530
|
+
--fs-grid-nodata-bg: rgba(232,238,252,0.04);
|
|
531
|
+
--fs-grid-chevron: #6f81ad;
|
|
532
|
+
--fs-grid-tree-guide: #22356a;
|
|
517
533
|
--fs-grid-lock-mine-ink: #7fc98a;
|
|
518
|
-
--fs-grid-lock-mine-bg: #
|
|
534
|
+
--fs-grid-lock-mine-bg: #13382b;
|
|
519
535
|
--fs-grid-lock-other-ink: #ff8a80;
|
|
520
|
-
--fs-grid-lock-other-bg: #
|
|
536
|
+
--fs-grid-lock-other-bg: #3d1a26;
|
|
521
537
|
--fs-syntax-keyword: #e3a3de;
|
|
522
538
|
--fs-syntax-operator: #b9c6e2;
|
|
523
539
|
--fs-syntax-function: #8ab8f0;
|
|
@@ -575,6 +591,11 @@
|
|
|
575
591
|
--fs-brand-wash-start: #e8f0fe;
|
|
576
592
|
--fs-brand-wash-end: #e3f8fb;
|
|
577
593
|
--fs-ring-halo: #ffffff;
|
|
594
|
+
--fs-glass-bg: rgba(255,255,255,0.72);
|
|
595
|
+
--fs-glass-line: rgba(255,255,255,0.85);
|
|
596
|
+
--fs-sweep-1: rgba(43,124,246,0.10);
|
|
597
|
+
--fs-sweep-2: rgba(20,212,224,0.16);
|
|
598
|
+
--fs-wave-glow: transparent;
|
|
578
599
|
--fs-neutral-ink: #3b4a6b;
|
|
579
600
|
--fs-neutral-wash: #eef3fa;
|
|
580
601
|
--fs-neutral-edge: #7a88a6;
|
|
@@ -707,6 +728,11 @@
|
|
|
707
728
|
--fs-brand-wash-start: #13244f;
|
|
708
729
|
--fs-brand-wash-end: #0f3358;
|
|
709
730
|
--fs-ring-halo: var(--fs-p-navy-950);
|
|
731
|
+
--fs-glass-bg: rgba(14,29,69,0.72);
|
|
732
|
+
--fs-glass-line: rgba(141,184,255,0.18);
|
|
733
|
+
--fs-sweep-1: rgba(43,124,246,0.20);
|
|
734
|
+
--fs-sweep-2: rgba(20,212,224,0.14);
|
|
735
|
+
--fs-wave-glow: rgba(20,212,224,0.55);
|
|
710
736
|
--fs-neutral-ink: #b9c6e2;
|
|
711
737
|
--fs-neutral-wash: #152a5a;
|
|
712
738
|
--fs-neutral-edge: #6f81ad;
|
|
@@ -789,31 +815,31 @@
|
|
|
789
815
|
--fs-shadow-1: 0 1px 2px rgba(2,6,20,0.10), 0 8px 28px rgba(2,6,20,0.16);
|
|
790
816
|
--fs-shadow-2: 0 4px 20px rgba(2,6,20,0.24);
|
|
791
817
|
--fs-shadow-3: 0 24px 64px rgba(2,6,20,0.44);
|
|
792
|
-
--fs-grid-line: #
|
|
793
|
-
--fs-grid-header-bg: #
|
|
794
|
-
--fs-grid-label-bg: #
|
|
795
|
-
--fs-grid-row-hover: rgba(
|
|
796
|
-
--fs-grid-subtotal-bg: #
|
|
797
|
-
--fs-grid-input-bg: #
|
|
798
|
-
--fs-grid-locked-ink: #
|
|
799
|
-
--fs-grid-locked-bg: #
|
|
818
|
+
--fs-grid-line: #22356a;
|
|
819
|
+
--fs-grid-header-bg: #152a5a;
|
|
820
|
+
--fs-grid-label-bg: #13244f;
|
|
821
|
+
--fs-grid-row-hover: rgba(232,238,252,0.06);
|
|
822
|
+
--fs-grid-subtotal-bg: #182f68;
|
|
823
|
+
--fs-grid-input-bg: #10394a;
|
|
824
|
+
--fs-grid-locked-ink: #93a1c2;
|
|
825
|
+
--fs-grid-locked-bg: #050d26;
|
|
800
826
|
--fs-grid-error-ink: #ff8a80;
|
|
801
|
-
--fs-grid-error-bg: #
|
|
827
|
+
--fs-grid-error-bg: #3d1a26;
|
|
802
828
|
--fs-grid-negative-ink: #ff8a80;
|
|
803
|
-
--fs-grid-stale-ink: #
|
|
829
|
+
--fs-grid-stale-ink: #93a1c2;
|
|
804
830
|
--fs-grid-stale-dot: #f9a825;
|
|
805
831
|
--fs-grid-dirty-ink: #a5a5ff;
|
|
806
832
|
--fs-grid-invalid-ink: #ff8a80;
|
|
807
833
|
--fs-grid-selected: #8c8cff;
|
|
808
834
|
--fs-grid-selected-invalid-bg: rgba(255,138,128,0.08);
|
|
809
|
-
--fs-grid-editing-bg: #
|
|
810
|
-
--fs-grid-nodata-bg: rgba(
|
|
811
|
-
--fs-grid-chevron: #
|
|
812
|
-
--fs-grid-tree-guide: #
|
|
835
|
+
--fs-grid-editing-bg: #223a7e;
|
|
836
|
+
--fs-grid-nodata-bg: rgba(232,238,252,0.04);
|
|
837
|
+
--fs-grid-chevron: #6f81ad;
|
|
838
|
+
--fs-grid-tree-guide: #22356a;
|
|
813
839
|
--fs-grid-lock-mine-ink: #7fc98a;
|
|
814
|
-
--fs-grid-lock-mine-bg: #
|
|
840
|
+
--fs-grid-lock-mine-bg: #13382b;
|
|
815
841
|
--fs-grid-lock-other-ink: #ff8a80;
|
|
816
|
-
--fs-grid-lock-other-bg: #
|
|
842
|
+
--fs-grid-lock-other-bg: #3d1a26;
|
|
817
843
|
--fs-syntax-keyword: #e3a3de;
|
|
818
844
|
--fs-syntax-operator: #b9c6e2;
|
|
819
845
|
--fs-syntax-function: #8ab8f0;
|
|
@@ -835,6 +861,10 @@
|
|
|
835
861
|
--fs-syntax-meta: #93a1c2;
|
|
836
862
|
--fs-syntax-invalid: #ff8a80;
|
|
837
863
|
--fs-bg-surface: var(--fs-p-navy-900);
|
|
864
|
+
--fs-gap-hatch: repeating-linear-gradient(135deg, var(--fs-gap-hatch-tint) 0 6px, transparent 6px 14px);
|
|
865
|
+
--fs-gap-hatch-sm: repeating-linear-gradient(135deg, var(--fs-gap-hatch-tint) 0 5px, transparent 5px 11px);
|
|
866
|
+
--fs-gradient-brand: linear-gradient(135deg, var(--fs-brand-end), var(--fs-brand-start));
|
|
867
|
+
--fs-gradient-brand-soft: linear-gradient(135deg, var(--fs-brand-wash-end), var(--fs-brand-wash-start));
|
|
838
868
|
}
|
|
839
869
|
|
|
840
870
|
/* Density classes work on any element (spec 01 §5). */
|
|
@@ -915,6 +945,11 @@
|
|
|
915
945
|
--fs-brand-wash-start: #e8f0fe;
|
|
916
946
|
--fs-brand-wash-end: #e3f8fb;
|
|
917
947
|
--fs-ring-halo: #ffffff;
|
|
948
|
+
--fs-glass-bg: rgba(255,255,255,0.72);
|
|
949
|
+
--fs-glass-line: rgba(255,255,255,0.85);
|
|
950
|
+
--fs-sweep-1: rgba(43,124,246,0.10);
|
|
951
|
+
--fs-sweep-2: rgba(20,212,224,0.16);
|
|
952
|
+
--fs-wave-glow: transparent;
|
|
918
953
|
--fs-neutral-ink: #3b4a6b;
|
|
919
954
|
--fs-neutral-wash: #eef3fa;
|
|
920
955
|
--fs-neutral-edge: #7a88a6;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* Wave (spec 02 I). Usage: wave.md. */
|
|
2
|
+
@layer fs.components {
|
|
3
|
+
/* An empty, aria-hidden band: a wave of dots, cyan at the left to blue at the right. The
|
|
4
|
+
wave is an image (motifs/wave.webp, D33): the owner's ChatGPT image as white on transparent,
|
|
5
|
+
used as a mask over the brand colours, so its colour comes from the roles. It covers the band
|
|
6
|
+
from the bottom up: a band shorter than the image loses the far rows at the top, a narrow one
|
|
7
|
+
the sides. `--fs-wave-image` points it at a self-hosted copy. */
|
|
8
|
+
.fs-wave {
|
|
9
|
+
display: block;
|
|
10
|
+
height: var(--fs-wave-height, 160px);
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
/* The dark scheme's glow. A filter is drawn before the element's own mask, so on the layer
|
|
13
|
+
itself the mask would cut the glow away; on the host it glows around what the mask leaves.
|
|
14
|
+
In light the glow role is transparent, so the same rule draws nothing. */
|
|
15
|
+
filter: drop-shadow(0 0 3px var(--fs-wave-glow));
|
|
16
|
+
}
|
|
17
|
+
.fs-wave::before {
|
|
18
|
+
content: '';
|
|
19
|
+
display: block;
|
|
20
|
+
height: 100%;
|
|
21
|
+
background: linear-gradient(90deg, var(--fs-brand-end), var(--fs-brand-start) 65%);
|
|
22
|
+
-webkit-mask: var(--fs-wave-image, url('../motifs/wave.webp')) center bottom / cover no-repeat;
|
|
23
|
+
mask: var(--fs-wave-image, url('../motifs/wave.webp')) center bottom / cover no-repeat;
|
|
24
|
+
}
|
|
25
|
+
/* Decoration: nothing to show in forced colours, nothing to print. */
|
|
26
|
+
@media (forced-colors: active) {
|
|
27
|
+
.fs-wave {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
@media print {
|
|
32
|
+
.fs-wave {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
package/dist/css/wave.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Wave — `.fs-wave`
|
|
2
|
+
|
|
3
|
+
Spec 02 I. CSS: `css/wave.css`. Image: `motifs/wave.webp`. Gallery: `motifs.html`.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<div class="fs-wave" aria-hidden="true"></div>
|
|
7
|
+
<div class="fs-wave" aria-hidden="true" style="--fs-wave-height: 200px"></div>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
- A wave of dots in perspective, cyan at the left to blue at the right (the owner's ChatGPT image, D33). In dark the dots glow (`--fs-wave-glow`; transparent
|
|
11
|
+
in light).
|
|
12
|
+
- The wave is an image file, `motifs/wave.webp` (D31, D33; 2172 x 380): white on transparent, used as a CSS
|
|
13
|
+
mask over the brand colours, so light, dark and re-tinted islands need no second file. It is made from
|
|
14
|
+
`art/wave-ai-source.png` by `npm run motifs`. It covers the band from the bottom up (`mask-size: cover`): a
|
|
15
|
+
band shorter than the image's own proportion (2172 x 380) loses the faint far rows at the top, a narrow one
|
|
16
|
+
loses the sides.
|
|
17
|
+
- An empty element: place it full-width, often absolutely along the bottom of a section
|
|
18
|
+
(`position: absolute; inset: auto 0 0`), behind the content. It ignores the pointer. When it sits absolutely
|
|
19
|
+
at the bottom of a section, reserve bottom padding of at least `--fs-wave-height` on that section, so no text
|
|
20
|
+
sits over the dots.
|
|
21
|
+
- Height: `--fs-wave-height` (default 160 px). No variants.
|
|
22
|
+
- Decoration only: always `aria-hidden="true"`, never carries information, and never sits under text. Hidden in
|
|
23
|
+
forced colours and in print. Not animated.
|
|
24
|
+
|
|
25
|
+
## Where the image comes from
|
|
26
|
+
|
|
27
|
+
- `css/wave.css` points at `../motifs/wave.webp` and `kit.css` at `./motifs/wave.webp`: both reach
|
|
28
|
+
`motifs/` in the package, so a bundler or a server that serves the package folder as is finds it. A product
|
|
29
|
+
that copies kit files by name (the calculation engine's embed) must copy `motifs/` too, beside `css/` and
|
|
30
|
+
`kit.css`.
|
|
31
|
+
- In a shadow root, through `css-text/*` and a constructed stylesheet (`replaceSync`), a relative url() would
|
|
32
|
+
resolve against the page. So `css-text/kit.js` and `css-text/wave.js` carry the image as
|
|
33
|
+
`new URL('../motifs/wave.webp', import.meta.url)`: absolute at run time, next to the module, and a
|
|
34
|
+
bundler (Vite, webpack, Rollup) sees it and copies the file, as `registerFonts` does for the fonts.
|
|
35
|
+
- `--fs-wave-image` replaces the image, for a self-hosted copy or CSS inlined into a `<style>`:
|
|
36
|
+
`.fs-wave { --fs-wave-image: url('https://cdn.example.com/kit/motifs/wave.webp'); }`. Always give an
|
|
37
|
+
absolute URL: browsers disagree on what a relative url() inside a custom property resolves against.
|
|
38
|
+
- A mask image from another origin must be served with CORS (`Access-Control-Allow-Origin`), or the browser
|
|
39
|
+
does not draw it and the wave stays empty.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default "/* Blocks (spec 02 I). Usage: blocks.md. */\n@layer fs.components {\n /* An empty-looking aria-hidden square of four rounded squares in a regular 2x2 grid, coloured\n along the brand gradient from the first block to the fourth. */\n .fs-blocks {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: 1fr 1fr;\n gap: 10%;\n width: var(--fs-blocks-size, 48px);\n height: var(--fs-blocks-size, 48px);\n pointer-events: none;\n flex: none;\n }\n .fs-blocks__block {\n display: block;\n border-radius: 28%;\n background: var(--fs-brand-start);\n }\n .fs-blocks__block:nth-child(2) {\n background: color-mix(in oklab, var(--fs-brand-start) 66%, var(--fs-brand-end));\n }\n .fs-blocks__block:nth-child(3) {\n background: color-mix(in oklab, var(--fs-brand-start) 33%, var(--fs-brand-end));\n }\n .fs-blocks__block:nth-child(4) {\n background: var(--fs-brand-end);\n }\n /* Hero decoration: the cluster tilts and the last block steps outward. Still a square grid. */\n .fs-blocks--loose {\n rotate: -12deg;\n }\n .fs-blocks--loose .fs-blocks__block:nth-child(4) {\n translate: 15% 15%;\n }\n /* Decoration: nothing to show in forced colours, nothing to print. */\n @media (forced-colors: active) {\n .fs-blocks {\n display: none;\n }\n }\n @media print {\n .fs-blocks {\n display: none;\n }\n }\n}\n";
|