@nxgt/material 3.2.0 → 3.4.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 (73) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +3 -3
  3. package/dist/backgrounds/backgrounds.css +30 -1
  4. package/dist/backgrounds/css/gradient.css +18 -5
  5. package/dist/backgrounds/css-react/blobs.css +65 -0
  6. package/dist/backgrounds/css-react/bubbles.css +41 -0
  7. package/dist/backgrounds/css-react/checker.css +47 -0
  8. package/dist/backgrounds/css-react/chevrons.css +46 -0
  9. package/dist/backgrounds/css-react/circuit.css +111 -0
  10. package/dist/backgrounds/css-react/concrete.css +41 -0
  11. package/dist/backgrounds/css-react/diagonal-checker.css +48 -0
  12. package/dist/backgrounds/css-react/glass.css +99 -0
  13. package/dist/backgrounds/css-react/graph-paper.css +74 -0
  14. package/dist/backgrounds/css-react/halo.css +66 -0
  15. package/dist/backgrounds/css-react/hexagons.css +79 -0
  16. package/dist/backgrounds/css-react/illustrated.css +164 -0
  17. package/dist/backgrounds/css-react/leaves.css +41 -0
  18. package/dist/backgrounds/css-react/linen.css +44 -0
  19. package/dist/backgrounds/css-react/marble.css +55 -0
  20. package/dist/backgrounds/css-react/music.css +2 -0
  21. package/dist/backgrounds/css-react/night-sky.css +41 -0
  22. package/dist/backgrounds/css-react/paper.css +49 -0
  23. package/dist/backgrounds/css-react/plasma.css +53 -0
  24. package/dist/backgrounds/css-react/rays.css +67 -0
  25. package/dist/backgrounds/css-react/ripples.css +68 -0
  26. package/dist/backgrounds/css-react/school.css +2 -0
  27. package/dist/backgrounds/css-react/science.css +2 -0
  28. package/dist/backgrounds/css-react/sport.css +2 -0
  29. package/dist/backgrounds/css-react/travel.css +2 -0
  30. package/dist/backgrounds.js +57 -33
  31. package/dist/lib/backgrounds/background/available.d.ts +3 -3
  32. package/dist/lib/backgrounds/background/background.d.ts +2 -2
  33. package/dist/lib/backgrounds/index.d.ts +1 -1
  34. package/dist/material.css +1 -1
  35. package/docs/components/navigation-and-layout.md +1 -1
  36. package/docs/getting-started.md +1 -1
  37. package/docs/guides/backgrounds.md +114 -15
  38. package/docs/previews/backgrounds-geometry-more.webp +0 -0
  39. package/docs/previews/backgrounds-illustrated-scenes.webp +0 -0
  40. package/docs/previews/backgrounds-light-more.webp +0 -0
  41. package/docs/previews/backgrounds-material-more.webp +0 -0
  42. package/docs/previews/backgrounds-matrix.webp +0 -0
  43. package/docs/previews/backgrounds-motif-shapes.webp +0 -0
  44. package/docs/roadmap.md +16 -4
  45. package/docs/troubleshooting.md +24 -2
  46. package/lib/backgrounds/backgrounds.css +30 -1
  47. package/lib/backgrounds/css/gradient.css +18 -5
  48. package/lib/backgrounds/css-react/blobs.css +65 -0
  49. package/lib/backgrounds/css-react/bubbles.css +41 -0
  50. package/lib/backgrounds/css-react/checker.css +47 -0
  51. package/lib/backgrounds/css-react/chevrons.css +46 -0
  52. package/lib/backgrounds/css-react/circuit.css +111 -0
  53. package/lib/backgrounds/css-react/concrete.css +41 -0
  54. package/lib/backgrounds/css-react/diagonal-checker.css +48 -0
  55. package/lib/backgrounds/css-react/glass.css +99 -0
  56. package/lib/backgrounds/css-react/graph-paper.css +74 -0
  57. package/lib/backgrounds/css-react/halo.css +66 -0
  58. package/lib/backgrounds/css-react/hexagons.css +79 -0
  59. package/lib/backgrounds/css-react/illustrated.css +164 -0
  60. package/lib/backgrounds/css-react/leaves.css +41 -0
  61. package/lib/backgrounds/css-react/linen.css +44 -0
  62. package/lib/backgrounds/css-react/marble.css +55 -0
  63. package/lib/backgrounds/css-react/music.css +2 -0
  64. package/lib/backgrounds/css-react/night-sky.css +41 -0
  65. package/lib/backgrounds/css-react/paper.css +49 -0
  66. package/lib/backgrounds/css-react/plasma.css +53 -0
  67. package/lib/backgrounds/css-react/rays.css +67 -0
  68. package/lib/backgrounds/css-react/ripples.css +68 -0
  69. package/lib/backgrounds/css-react/school.css +2 -0
  70. package/lib/backgrounds/css-react/science.css +2 -0
  71. package/lib/backgrounds/css-react/sport.css +2 -0
  72. package/lib/backgrounds/css-react/travel.css +2 -0
  73. package/package.json +103 -2
@@ -0,0 +1,164 @@
1
+ /* The illustrated scenes' shared parts (`school`, `night-sky`, `bubbles`,
2
+ * `leaves`, `science`, `music`, `travel`, `sport`): a faint colour wash under
3
+ * the scene, and the scene itself, fine line drawings (`il` is the root; every
4
+ * path is stroked in `currentColor`, which a `k1..k3` class sets) kept calm in
5
+ * the middle of the frame by a mask, where the content sits. The scene is the
6
+ * one drawn by core's `buildBackgroundScene`. React only: nothing in the shared
7
+ * `css/` folder. Intensity never goes above the default (`vivid` draws as the default). Each preset's file imports this one. */
8
+ @import "../css/scene.css";
9
+
10
+ @layer components {
11
+ /* `vivid` is capped at the default strength: drawings under body text
12
+ * never get stronger (the wash and the strokes read these variables).
13
+ * Three attributes (0,3,0) beat tones.css's (0,2,0) in any import order. */
14
+ :is(
15
+ [data-background="school"],
16
+ [data-background="night-sky"],
17
+ [data-background="bubbles"],
18
+ [data-background="leaves"],
19
+ [data-background="science"],
20
+ [data-background="music"],
21
+ [data-background="travel"],
22
+ [data-background="sport"]
23
+ )[data-intensity="vivid"][data-intensity] {
24
+ --nxgt-bg-a1: 8%;
25
+ --nxgt-bg-a2: 16%;
26
+ --nxgt-bg-a3: 28%;
27
+ --nxgt-bg-op: 0.72;
28
+ }
29
+
30
+ /* The wash: two soft colour pools under the scene. */
31
+ :is(
32
+ [data-background="school"],
33
+ [data-background="night-sky"],
34
+ [data-background="bubbles"],
35
+ [data-background="leaves"],
36
+ [data-background="science"],
37
+ [data-background="music"],
38
+ [data-background="travel"],
39
+ [data-background="sport"]
40
+ ) > [data-layer="wash"] {
41
+ position: absolute;
42
+ inset: 0;
43
+ background:
44
+ radial-gradient(
45
+ ellipse 70% 60% at 22% 18%,
46
+ color-mix(in oklab, var(--nxgt-bg-c1) var(--nxgt-bg-a1), transparent),
47
+ transparent 72%
48
+ ),
49
+ radial-gradient(
50
+ ellipse 60% 55% at 85% 92%,
51
+ color-mix(in oklab, var(--nxgt-bg-c3) var(--nxgt-bg-a1), transparent),
52
+ transparent 70%
53
+ );
54
+ }
55
+
56
+ :is(
57
+ [data-background="school"],
58
+ [data-background="night-sky"],
59
+ [data-background="bubbles"],
60
+ [data-background="leaves"],
61
+ [data-background="science"],
62
+ [data-background="music"],
63
+ [data-background="travel"],
64
+ [data-background="sport"]
65
+ )
66
+ > [data-scene] {
67
+ overflow: hidden;
68
+ }
69
+
70
+ /* The middle stays calm: the mask is in pixels, not in percent of the
71
+ * frame, so the quiet zone always covers a card of content (a percentage
72
+ * would shrink it on a phone). It passes 7 to 9% of the drawings, which
73
+ * keeps 14 px muted text at 4.5:1 or better over the worst stroke pixel. */
74
+ :is(
75
+ [data-background="school"],
76
+ [data-background="night-sky"],
77
+ [data-background="bubbles"],
78
+ [data-background="leaves"],
79
+ [data-background="science"],
80
+ [data-background="music"],
81
+ [data-background="travel"],
82
+ [data-background="sport"]
83
+ )
84
+ > [data-scene]
85
+ .mo {
86
+ opacity: calc(var(--nxgt-bg-op) + 0.2);
87
+ }
88
+ :is(
89
+ [data-background="school"],
90
+ [data-background="night-sky"],
91
+ [data-background="bubbles"],
92
+ [data-background="leaves"],
93
+ [data-background="science"],
94
+ [data-background="music"],
95
+ [data-background="travel"],
96
+ [data-background="sport"]
97
+ )
98
+ > [data-scene]
99
+ > .il {
100
+ -webkit-mask-image: radial-gradient(
101
+ ellipse 380px 290px at 50% 50%,
102
+ rgb(0 0 0 / 0.07) 0%,
103
+ rgb(0 0 0 / 0.09) 55%,
104
+ rgb(0 0 0 / 0.5) 80%,
105
+ black 100%
106
+ );
107
+ mask-image: radial-gradient(
108
+ ellipse 380px 290px at 50% 50%,
109
+ rgb(0 0 0 / 0.07) 0%,
110
+ rgb(0 0 0 / 0.09) 55%,
111
+ rgb(0 0 0 / 0.5) 80%,
112
+ black 100%
113
+ );
114
+ }
115
+ /* A phone: the card fills the width, so the zone is a band across it. */
116
+ @media (max-width: 640px) {
117
+ :is(
118
+ [data-background="school"],
119
+ [data-background="night-sky"],
120
+ [data-background="bubbles"],
121
+ [data-background="leaves"],
122
+ [data-background="science"],
123
+ [data-background="music"],
124
+ [data-background="travel"],
125
+ [data-background="sport"]
126
+ )
127
+ > [data-scene]
128
+ > .il {
129
+ -webkit-mask-image: radial-gradient(
130
+ ellipse 420px 170px at 50% 50%,
131
+ rgb(0 0 0 / 0.07) 0%,
132
+ rgb(0 0 0 / 0.09) 55%,
133
+ rgb(0 0 0 / 0.5) 80%,
134
+ black 100%
135
+ );
136
+ mask-image: radial-gradient(
137
+ ellipse 420px 170px at 50% 50%,
138
+ rgb(0 0 0 / 0.07) 0%,
139
+ rgb(0 0 0 / 0.09) 55%,
140
+ rgb(0 0 0 / 0.5) 80%,
141
+ black 100%
142
+ );
143
+ }
144
+ }
145
+
146
+ :is(
147
+ [data-background="school"],
148
+ [data-background="night-sky"],
149
+ [data-background="bubbles"],
150
+ [data-background="leaves"],
151
+ [data-background="science"],
152
+ [data-background="music"],
153
+ [data-background="travel"],
154
+ [data-background="sport"]
155
+ )
156
+ > [data-scene]
157
+ > .il
158
+ path {
159
+ fill: none;
160
+ stroke: currentColor;
161
+ stroke-linecap: round;
162
+ stroke-linejoin: round;
163
+ }
164
+ }
@@ -0,0 +1,41 @@
1
+ /* The `leaves` preset: line drawings of one theme (see illustrated.css).
2
+ * Motion (opt-in, `animated`): a leaf sways, 14 to 24 s a leg. The builder sets
3
+ * the pace (`p1..p3`) and the delay (`l1..l4`) as classes, so the markup holds
4
+ * no inline style. */
5
+ @import "./illustrated.css";
6
+
7
+ @media (prefers-reduced-motion: no-preference) {
8
+ @keyframes nxgt-bg-leaves-sw {
9
+ to {
10
+ translate: 16px 8px;
11
+ }
12
+ }
13
+
14
+ @layer components {
15
+ [data-background="leaves"][data-animated] > [data-scene] .sw {
16
+ animation: nxgt-bg-leaves-sw 14s ease-in-out infinite alternate
17
+ var(--nxgt-bg-play, running);
18
+ }
19
+ [data-background="leaves"][data-animated] > [data-scene] .p1 {
20
+ animation-duration: 14s;
21
+ }
22
+ [data-background="leaves"][data-animated] > [data-scene] .p2 {
23
+ animation-duration: 19s;
24
+ }
25
+ [data-background="leaves"][data-animated] > [data-scene] .p3 {
26
+ animation-duration: 24s;
27
+ }
28
+ [data-background="leaves"][data-animated] > [data-scene] .l1 {
29
+ animation-delay: 0s;
30
+ }
31
+ [data-background="leaves"][data-animated] > [data-scene] .l2 {
32
+ animation-delay: -3s;
33
+ }
34
+ [data-background="leaves"][data-animated] > [data-scene] .l3 {
35
+ animation-delay: -7s;
36
+ }
37
+ [data-background="leaves"][data-animated] > [data-scene] .l4 {
38
+ animation-delay: -11s;
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,44 @@
1
+ /* The `linen` preset: a plain weave. A cross-hatch of 1 px threads every 4 px
2
+ * (whole pixels, so crisp at 1x) with faint seeded slubs (a 960 px tile), on a tint of the
3
+ * tone (`wash`). The threads are black in light and white in dark, like the
4
+ * grain overlay. Intensity never goes above the default (`vivid` draws as the default). Static: `animated` does nothing. React only: nothing in the
5
+ * shared `css/` folder. */
6
+ @import "../css/scene.css";
7
+
8
+ @layer components {
9
+ /* `vivid` is capped at the default strength: a texture under body text
10
+ * never gets stronger (the tint and the specks read these two). */
11
+ [data-background="linen"][data-intensity="vivid"][data-intensity] {
12
+ --nxgt-bg-a1: 8%;
13
+ --nxgt-bg-op: 0.72;
14
+ }
15
+ [data-background="linen"] > [data-layer="wash"] {
16
+ position: absolute;
17
+ inset: 0;
18
+ background-image: linear-gradient(
19
+ 180deg,
20
+ color-mix(in oklab, var(--nxgt-bg-c1) var(--nxgt-bg-a1), transparent),
21
+ color-mix(
22
+ in oklab,
23
+ var(--nxgt-bg-c2) calc(var(--nxgt-bg-a1) * 0.6),
24
+ transparent
25
+ )
26
+ );
27
+ }
28
+ [data-background="linen"] > [data-scene] > svg {
29
+ filter: invert(var(--nxgt-bg-grain-invert));
30
+ }
31
+ [data-background="linen"] > [data-scene] .lw-v,
32
+ [data-background="linen"] > [data-scene] .lw-h {
33
+ fill: black;
34
+ fill-opacity: calc(var(--nxgt-bg-op) * 0.1);
35
+ shape-rendering: crispEdges;
36
+ }
37
+ [data-background="linen"] > [data-scene] .lw-b {
38
+ fill-opacity: calc(var(--nxgt-bg-op) * 0.05);
39
+ }
40
+ [data-background="linen"] > [data-scene] .tx1,
41
+ [data-background="linen"] > [data-scene] .tx2 {
42
+ opacity: calc(var(--nxgt-bg-op) * 0.07);
43
+ }
44
+ }
@@ -0,0 +1,55 @@
1
+ /* The `marble` preset: polished marble. A seeded cloudy body and soft veins
2
+ * (an SVG: a cloud of `feTurbulence` on a seamless 960 px tile, and curves
3
+ * blurred soft; black in light, white in dark), very low in contrast, over a pale tint of the tone
4
+ * (`wash`). Intensity never goes above the default (`vivid` draws as the default). Static: `animated` does nothing. React only: nothing in the
5
+ * shared `css/` folder. */
6
+ @import "../css/scene.css";
7
+
8
+ @layer components {
9
+ /* `vivid` is capped at the default strength: a texture under body text
10
+ * never gets stronger (the tint and the specks read these two). */
11
+ [data-background="marble"][data-intensity="vivid"][data-intensity] {
12
+ --nxgt-bg-a1: 8%;
13
+ --nxgt-bg-op: 0.72;
14
+ }
15
+ [data-background="marble"] > [data-layer="wash"] {
16
+ position: absolute;
17
+ inset: 0;
18
+ background-image: linear-gradient(
19
+ 135deg,
20
+ color-mix(in oklab, var(--nxgt-bg-c1) var(--nxgt-bg-a1), transparent),
21
+ color-mix(
22
+ in oklab,
23
+ var(--nxgt-bg-c2) calc(var(--nxgt-bg-a1) * 0.5),
24
+ transparent
25
+ )
26
+ );
27
+ }
28
+ [data-background="marble"] > [data-scene] > svg {
29
+ filter: invert(var(--nxgt-bg-grain-invert));
30
+ }
31
+ [data-background="marble"] > [data-scene] .tx1 {
32
+ opacity: calc(var(--nxgt-bg-op) * 0.08);
33
+ }
34
+ [data-background="marble"] > [data-scene] .mv-p,
35
+ [data-background="marble"] > [data-scene] .mh-p {
36
+ fill: none;
37
+ stroke: black;
38
+ stroke-linecap: round;
39
+ stroke-linejoin: round;
40
+ }
41
+ [data-background="marble"] > [data-scene] .mv {
42
+ opacity: calc(
43
+ var(--nxgt-bg-op) *
44
+ 0.2 *
45
+ (1 - var(--nxgt-bg-grain-invert) * 0.5)
46
+ );
47
+ }
48
+ [data-background="marble"] > [data-scene] .mh {
49
+ opacity: calc(
50
+ var(--nxgt-bg-op) *
51
+ 0.07 *
52
+ (1 - var(--nxgt-bg-grain-invert) * 0.5)
53
+ );
54
+ }
55
+ }
@@ -0,0 +1,2 @@
1
+ /* The `music` preset: line drawings of one theme (see illustrated.css). Still. */
2
+ @import "./illustrated.css";
@@ -0,0 +1,41 @@
1
+ /* The `night-sky` preset: line drawings of one theme (see illustrated.css).
2
+ * Motion (opt-in, `animated`): a star twinkles, 14 to 24 s a leg. The builder sets
3
+ * the pace (`p1..p3`) and the delay (`l1..l4`) as classes, so the markup holds
4
+ * no inline style. */
5
+ @import "./illustrated.css";
6
+
7
+ @media (prefers-reduced-motion: no-preference) {
8
+ @keyframes nxgt-bg-night-sky-tw {
9
+ to {
10
+ opacity: 0.2;
11
+ }
12
+ }
13
+
14
+ @layer components {
15
+ [data-background="night-sky"][data-animated] > [data-scene] .tw {
16
+ animation: nxgt-bg-night-sky-tw 14s ease-in-out infinite alternate
17
+ var(--nxgt-bg-play, running);
18
+ }
19
+ [data-background="night-sky"][data-animated] > [data-scene] .p1 {
20
+ animation-duration: 14s;
21
+ }
22
+ [data-background="night-sky"][data-animated] > [data-scene] .p2 {
23
+ animation-duration: 19s;
24
+ }
25
+ [data-background="night-sky"][data-animated] > [data-scene] .p3 {
26
+ animation-duration: 24s;
27
+ }
28
+ [data-background="night-sky"][data-animated] > [data-scene] .l1 {
29
+ animation-delay: 0s;
30
+ }
31
+ [data-background="night-sky"][data-animated] > [data-scene] .l2 {
32
+ animation-delay: -3s;
33
+ }
34
+ [data-background="night-sky"][data-animated] > [data-scene] .l3 {
35
+ animation-delay: -7s;
36
+ }
37
+ [data-background="night-sky"][data-animated] > [data-scene] .l4 {
38
+ animation-delay: -11s;
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,49 @@
1
+ /* The `paper` preset: a sheet of paper. A seeded fibre grain (an SVG of
2
+ * `feTurbulence` specks on a seamless 400 px tile: black in light, white in
3
+ * dark, like the grain overlay) over a warm tint that the tone cools or warms
4
+ * (`wash`: cream in light, the tone's colour mixed in). Intensity never goes above the default (`vivid` draws as the default). Static: `animated`
5
+ * does nothing. React only: nothing in the shared `css/` folder. */
6
+ @import "../css/scene.css";
7
+
8
+ @layer components {
9
+ /* `vivid` is capped at the default strength: a texture under body text
10
+ * never gets stronger (the tint and the specks read these two). */
11
+ [data-background="paper"][data-intensity="vivid"][data-intensity] {
12
+ --nxgt-bg-a1: 8%;
13
+ --nxgt-bg-op: 0.72;
14
+ }
15
+ [data-background="paper"] > [data-layer="wash"] {
16
+ position: absolute;
17
+ inset: 0;
18
+ background-image: linear-gradient(
19
+ 180deg,
20
+ color-mix(
21
+ in oklab,
22
+ var(--nxgt-bg-c1) calc(var(--nxgt-bg-a1) * 1.6),
23
+ color-mix(
24
+ in oklab,
25
+ rgb(250 233 196) calc(70% * (1 - var(--nxgt-bg-grain-invert))),
26
+ transparent
27
+ )
28
+ ),
29
+ color-mix(
30
+ in oklab,
31
+ var(--nxgt-bg-c2) var(--nxgt-bg-a1),
32
+ color-mix(
33
+ in oklab,
34
+ rgb(250 233 196) calc(42% * (1 - var(--nxgt-bg-grain-invert))),
35
+ transparent
36
+ )
37
+ )
38
+ );
39
+ }
40
+ [data-background="paper"] > [data-scene] > svg {
41
+ filter: invert(var(--nxgt-bg-grain-invert));
42
+ }
43
+ [data-background="paper"] > [data-scene] .tx1 {
44
+ opacity: calc(var(--nxgt-bg-op) * 0.12);
45
+ }
46
+ [data-background="paper"] > [data-scene] .tx2 {
47
+ opacity: calc(var(--nxgt-bg-op) * 0.09);
48
+ }
49
+ }
@@ -0,0 +1,53 @@
1
+ /* The `plasma` preset: a soft colour field. A seeded SVG of soft discs in
2
+ * radial gradients in the tone's three colours, three strengths each (`pm-l1..3`),
3
+ * over a tint (`wash`). Blended with the page: it adds light in dark. Motion
4
+ * (opt-in, `animated`): the field drifts. React only: nothing in the shared
5
+ * `css/` folder. */
6
+ @import "../css/scene.css";
7
+
8
+ @layer components {
9
+ [data-background="plasma"] {
10
+ isolation: isolate;
11
+ }
12
+ [data-background="plasma"] > [data-layer="wash"] {
13
+ position: absolute;
14
+ inset: 0;
15
+ background-image: linear-gradient(
16
+ 160deg,
17
+ color-mix(in oklab, var(--nxgt-bg-c1) var(--nxgt-bg-a1), transparent),
18
+ color-mix(in oklab, var(--nxgt-bg-c3) var(--nxgt-bg-a1), transparent)
19
+ );
20
+ }
21
+ [data-background="plasma"] > [data-scene] > svg {
22
+ mix-blend-mode: var(--nxgt-bg-glow-blend);
23
+ }
24
+ [data-background="plasma"] > [data-scene] .pm-l1 {
25
+ fill-opacity: calc(var(--nxgt-bg-op) * 0.16);
26
+ }
27
+ [data-background="plasma"] > [data-scene] .pm-l2 {
28
+ fill-opacity: calc(var(--nxgt-bg-op) * 0.26);
29
+ }
30
+ [data-background="plasma"] > [data-scene] .pm-l3 {
31
+ fill-opacity: calc(var(--nxgt-bg-op) * 0.38);
32
+ }
33
+ }
34
+
35
+ @media (prefers-reduced-motion: no-preference) {
36
+ @keyframes nxgt-bg-plasma-drift {
37
+ from {
38
+ transform: translate(-3%, -2%) scale(1);
39
+ }
40
+ to {
41
+ transform: translate(3%, 2%) scale(1.06);
42
+ }
43
+ }
44
+
45
+ @layer components {
46
+ [data-background="plasma"][data-animated] > [data-scene] .pm-field {
47
+ animation: nxgt-bg-plasma-drift 28s ease-in-out infinite alternate
48
+ var(--nxgt-bg-play, running);
49
+ transform-box: view-box;
50
+ transform-origin: 50% 50%;
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,67 @@
1
+ /* The `rays` preset: a sunburst. A conic gradient of alternating rays from
2
+ * the top centre of the frame (`rays`, a layer twice the frame's size and
3
+ * centred on that point, faded with distance) over a tint (`wash`). CSS only.
4
+ * Blended with the page: it adds light in dark. Motion (opt-in, `animated`):
5
+ * the burst turns slowly. React only: nothing in the shared `css/` folder. */
6
+ @layer components {
7
+ [data-background="rays"] {
8
+ overflow: clip;
9
+ isolation: isolate;
10
+ }
11
+ [data-background="rays"] > [data-layer="wash"] {
12
+ position: absolute;
13
+ inset: 0;
14
+ background-image: radial-gradient(
15
+ ellipse 70% 60% at 50% 0%,
16
+ color-mix(in oklab, var(--nxgt-bg-c2) var(--nxgt-bg-a2), transparent),
17
+ transparent 75%
18
+ );
19
+ }
20
+ [data-background="rays"] > [data-layer="rays"] {
21
+ position: absolute;
22
+ top: -100%;
23
+ right: -50%;
24
+ bottom: 0;
25
+ left: -50%;
26
+ opacity: var(--nxgt-bg-op);
27
+ mix-blend-mode: var(--nxgt-bg-glow-blend);
28
+ background-image: repeating-conic-gradient(
29
+ from 0deg at 50% 50%,
30
+ color-mix(in oklab, var(--nxgt-bg-c1) 34%, transparent) 0deg 6deg,
31
+ transparent 6deg 9deg,
32
+ color-mix(in oklab, var(--nxgt-bg-c2) 24%, transparent) 9deg 12deg,
33
+ transparent 12deg 18deg,
34
+ color-mix(in oklab, var(--nxgt-bg-c3) 28%, transparent) 18deg 21deg,
35
+ transparent 21deg 30deg
36
+ );
37
+ -webkit-mask-image: radial-gradient(
38
+ closest-side,
39
+ rgb(0 0 0 / 0.5) 0,
40
+ black 14%,
41
+ rgb(0 0 0 / 0.35) 55%,
42
+ transparent
43
+ );
44
+ mask-image: radial-gradient(
45
+ closest-side,
46
+ rgb(0 0 0 / 0.5) 0,
47
+ black 14%,
48
+ rgb(0 0 0 / 0.35) 55%,
49
+ transparent
50
+ );
51
+ }
52
+ }
53
+
54
+ @media (prefers-reduced-motion: no-preference) {
55
+ @keyframes nxgt-bg-rays-turn {
56
+ to {
57
+ transform: rotate(30deg);
58
+ }
59
+ }
60
+
61
+ @layer components {
62
+ [data-background="rays"][data-animated] > [data-layer="rays"] {
63
+ animation: nxgt-bg-rays-turn 90s linear infinite
64
+ var(--nxgt-bg-play, running);
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,68 @@
1
+ /* The `ripples` preset: rings spreading from three seeded centres, one tone
2
+ * colour each (`rp-c1..3`), fading outward, over a tint (`wash`). Blended
3
+ * with the page: it adds light in dark. Motion (opt-in, `animated`): each set
4
+ * of rings breathes at its own pace (`rp-d1..3`). React only: nothing in the
5
+ * shared `css/` folder. */
6
+ @import "../css/scene.css";
7
+
8
+ @layer components {
9
+ [data-background="ripples"] {
10
+ isolation: isolate;
11
+ }
12
+ [data-background="ripples"] > [data-layer="wash"] {
13
+ position: absolute;
14
+ inset: 0;
15
+ background-image: radial-gradient(
16
+ ellipse 90% 80% at 50% 50%,
17
+ color-mix(in oklab, var(--nxgt-bg-c1) var(--nxgt-bg-a1), transparent),
18
+ transparent 80%
19
+ );
20
+ }
21
+ [data-background="ripples"] > [data-scene] > svg {
22
+ mix-blend-mode: var(--nxgt-bg-glow-blend);
23
+ }
24
+ [data-background="ripples"] > [data-scene] circle {
25
+ fill: none;
26
+ stroke-width: 2;
27
+ opacity: var(--nxgt-bg-op);
28
+ }
29
+ [data-background="ripples"] > [data-scene] .rp-c1 {
30
+ stroke: var(--nxgt-bg-c1);
31
+ }
32
+ [data-background="ripples"] > [data-scene] .rp-c2 {
33
+ stroke: var(--nxgt-bg-c2);
34
+ }
35
+ [data-background="ripples"] > [data-scene] .rp-c3 {
36
+ stroke: var(--nxgt-bg-c3);
37
+ }
38
+ }
39
+
40
+ @media (prefers-reduced-motion: no-preference) {
41
+ @keyframes nxgt-bg-ripples-breathe {
42
+ from {
43
+ transform: scale(0.94);
44
+ }
45
+ to {
46
+ transform: scale(1.06);
47
+ }
48
+ }
49
+
50
+ @layer components {
51
+ [data-background="ripples"][data-animated] > [data-scene] [class^="rp-c"] {
52
+ animation: nxgt-bg-ripples-breathe 14s ease-in-out infinite alternate
53
+ var(--nxgt-bg-play, running);
54
+ transform-box: fill-box;
55
+ transform-origin: 50% 50%;
56
+ }
57
+ [data-background="ripples"][data-animated] > [data-scene] .rp-d1 {
58
+ animation-direction: alternate;
59
+ }
60
+ [data-background="ripples"][data-animated] > [data-scene] .rp-d2 {
61
+ animation-duration: 19s;
62
+ animation-direction: alternate-reverse;
63
+ }
64
+ [data-background="ripples"][data-animated] > [data-scene] .rp-d3 {
65
+ animation-duration: 24s;
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,2 @@
1
+ /* The `school` preset: line drawings of one theme (see illustrated.css). Still. */
2
+ @import "./illustrated.css";
@@ -0,0 +1,2 @@
1
+ /* The `science` preset: line drawings of one theme (see illustrated.css). Still. */
2
+ @import "./illustrated.css";
@@ -0,0 +1,2 @@
1
+ /* The `sport` preset: line drawings of one theme (see illustrated.css). Still. */
2
+ @import "./illustrated.css";
@@ -0,0 +1,2 @@
1
+ /* The `travel` preset: line drawings of one theme (see illustrated.css). Still. */
2
+ @import "./illustrated.css";