@duskmoon-dev/css-art 0.1.1 → 0.3.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.
@@ -90,7 +90,7 @@
90
90
  left: calc(var(--art-plasma-ball-size) * 151 / 350);
91
91
  }
92
92
  .glassball {
93
- position: relative;
93
+ position: absolute;
94
94
  overflow: hidden;
95
95
  margin: 0 auto;
96
96
  width: 100%;
@@ -100,7 +100,7 @@
100
100
  top: 0%;
101
101
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2),
102
102
  inset 0px 10px 30px 5px rgba(255, 255, 255, 1);
103
- position: absolute;
103
+ z-index: 1;
104
104
  }
105
105
  .glassball:after {
106
106
  background: radial-gradient(
@@ -0,0 +1,236 @@
1
+ @layer css-art {
2
+ @keyframes art-synthwave-starfield-color {
3
+ 0% {
4
+ filter: hue-rotate(1deg);
5
+ }
6
+ 100% {
7
+ filter: hue-rotate(360deg);
8
+ }
9
+ }
10
+
11
+ @keyframes art-synthwave-starfield-lines-x {
12
+ 0% {
13
+ background-position: calc(var(--art-synthwave-starfield-size) * 0.12) center;
14
+ }
15
+ 100% {
16
+ background-position: 0 center;
17
+ }
18
+ }
19
+
20
+ @keyframes art-synthwave-starfield-lines-y {
21
+ 0% {
22
+ background-position: center calc(var(--art-synthwave-starfield-size) * 0.12);
23
+ }
24
+ 100% {
25
+ background-position: center 0;
26
+ }
27
+ }
28
+
29
+ @keyframes art-synthwave-starfield-stars {
30
+ 0% {
31
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * -0.4));
32
+ opacity: 0;
33
+ }
34
+ 30%,
35
+ 80% {
36
+ opacity: 1;
37
+ }
38
+ 100% {
39
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * 0.5)) rotate(15deg);
40
+ opacity: 0;
41
+ }
42
+ }
43
+
44
+ @keyframes art-synthwave-starfield-stars2 {
45
+ 0% {
46
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * -0.4)) rotate(180deg);
47
+ opacity: 0;
48
+ }
49
+ 30%,
50
+ 80% {
51
+ opacity: 1;
52
+ }
53
+ 100% {
54
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * 0.5)) rotate(195deg);
55
+ opacity: 0;
56
+ }
57
+ }
58
+
59
+ .art-synthwave-starfield {
60
+ --art-synthwave-starfield-size: 600px;
61
+ --art-synthwave-starfield-line-color: #6bd600;
62
+
63
+ position: relative;
64
+ width: var(--art-synthwave-starfield-size);
65
+ height: var(--art-synthwave-starfield-size);
66
+ overflow: hidden;
67
+ perspective: calc(var(--art-synthwave-starfield-size) * 0.5);
68
+ transform-style: preserve-3d;
69
+ background-image: radial-gradient(#0000, #673ab72e),
70
+ linear-gradient(-90deg, #2000587d, #000, #9c27b02b),
71
+ linear-gradient(0deg, #ff98002e, #000, #8bc34a5e);
72
+ background-color: #000;
73
+ box-shadow: 0 0 calc(var(--art-synthwave-starfield-size) * 1.5)
74
+ calc(var(--art-synthwave-starfield-size) * 0.11) #000 inset;
75
+ font-family: "Press Start 2P", system-ui;
76
+ }
77
+
78
+ /* Secondary gradient overlay (replaces body::before) */
79
+ .art-synthwave-starfield::before {
80
+ content: "";
81
+ position: absolute;
82
+ width: 100%;
83
+ height: 100%;
84
+ background: radial-gradient(#0000, #0a123a),
85
+ linear-gradient(180deg, #2000587d, #000, #9c27b02b),
86
+ linear-gradient(0deg, #ff980054, #000, #009688ba);
87
+ opacity: 0.25;
88
+ z-index: 0;
89
+ }
90
+
91
+ /* All descendants: absolute + preserve-3d */
92
+ .art-synthwave-starfield * {
93
+ box-sizing: border-box;
94
+ position: absolute;
95
+ transform-style: preserve-3d;
96
+ }
97
+
98
+ .art-synthwave-starfield *::before,
99
+ .art-synthwave-starfield *::after {
100
+ box-sizing: border-box;
101
+ transform-style: preserve-3d;
102
+ position: absolute;
103
+ content: "";
104
+ }
105
+
106
+ /* Shared grid panel base */
107
+ .art-synthwave-starfield-sides {
108
+ width: 100%;
109
+ height: 100%;
110
+ background: radial-gradient(#0f0015 10%, #000000e0 35%, #fff0 75% 100%);
111
+ }
112
+
113
+ /* Left wall (shared base for both side panels) */
114
+ .art-synthwave-starfield-sides::before,
115
+ .art-synthwave-starfield-sides::after {
116
+ width: 100%;
117
+ height: 100%;
118
+ transform: rotateY(90deg);
119
+ transform-origin: left center;
120
+ background-image: repeating-linear-gradient(
121
+ 90deg,
122
+ #fff0 0,
123
+ #fff0 calc(var(--art-synthwave-starfield-size) * 0.1),
124
+ var(--art-synthwave-starfield-line-color) calc(var(--art-synthwave-starfield-size) * 0.1)
125
+ calc(var(--art-synthwave-starfield-size) * 0.1035),
126
+ #fff0 calc(var(--art-synthwave-starfield-size) * 0.1035)
127
+ ),
128
+ repeating-linear-gradient(
129
+ 180deg,
130
+ #fff0 0,
131
+ #fff0 calc(var(--art-synthwave-starfield-size) * 0.1),
132
+ var(--art-synthwave-starfield-line-color) calc(var(--art-synthwave-starfield-size) * 0.1)
133
+ calc(var(--art-synthwave-starfield-size) * 0.1035),
134
+ #fff0 calc(var(--art-synthwave-starfield-size) * 0.1035)
135
+ );
136
+ background-color: transparent;
137
+ animation: art-synthwave-starfield-lines-x 0.5s linear 0s infinite,
138
+ art-synthwave-starfield-color 5s linear 0s infinite;
139
+ background-repeat: repeat;
140
+ background-position: center center;
141
+ background-size: calc(var(--art-synthwave-starfield-size) * 0.12)
142
+ calc(var(--art-synthwave-starfield-size) * 0.12);
143
+ box-shadow: 0 0 calc(var(--art-synthwave-starfield-size) * 0.08)
144
+ calc(var(--art-synthwave-starfield-size) * 0.1) #000 inset;
145
+ }
146
+
147
+ /* Right wall */
148
+ .art-synthwave-starfield-lefrig::after {
149
+ transform: rotateY(-90deg);
150
+ transform-origin: right center;
151
+ animation: art-synthwave-starfield-lines-x 0.5s linear 0s infinite reverse,
152
+ art-synthwave-starfield-color 5s linear 2s infinite;
153
+ z-index: -1;
154
+ }
155
+
156
+ /* Floor */
157
+ .art-synthwave-starfield-topbot::before {
158
+ height: 100%;
159
+ transform: rotateX(90deg);
160
+ transform-origin: center bottom;
161
+ bottom: 0;
162
+ animation: art-synthwave-starfield-lines-y 0.5s linear 0s infinite reverse,
163
+ art-synthwave-starfield-color 5s linear 1s infinite;
164
+ }
165
+
166
+ /* Ceiling */
167
+ .art-synthwave-starfield-topbot::after {
168
+ height: 100%;
169
+ transform: rotateX(-90deg);
170
+ transform-origin: center top;
171
+ bottom: auto;
172
+ animation: art-synthwave-starfield-lines-y 0.5s linear 0s infinite,
173
+ art-synthwave-starfield-color 5s linear 3s infinite;
174
+ }
175
+
176
+ /* Starfield layers */
177
+ .art-synthwave-starfield-stars {
178
+ width: 100%;
179
+ height: 100%;
180
+ z-index: 3;
181
+ }
182
+
183
+ .art-synthwave-starfield-stars::before,
184
+ .art-synthwave-starfield-stars::after {
185
+ width: 200%;
186
+ height: 200%;
187
+ background: transparent;
188
+ border-radius: 100%;
189
+ background-image: repeating-conic-gradient(
190
+ #fff8 0%,
191
+ transparent 0.0002%,
192
+ transparent 0.075%,
193
+ transparent 0.65%
194
+ ),
195
+ repeating-conic-gradient(
196
+ #fff 0%,
197
+ transparent 0.0004%,
198
+ transparent 0.05%,
199
+ transparent 0.495%
200
+ );
201
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * -0.4));
202
+ opacity: 0;
203
+ animation: art-synthwave-starfield-stars 4s ease-in -1s infinite;
204
+ z-index: 1;
205
+ left: -50%;
206
+ top: -50%;
207
+ }
208
+
209
+ .art-synthwave-starfield-stars::after {
210
+ animation-name: art-synthwave-starfield-stars2;
211
+ animation-delay: -2s;
212
+ }
213
+
214
+ /* Second stars div: offset delays for smooth looping */
215
+ .art-synthwave-starfield-stars + .art-synthwave-starfield-stars::before {
216
+ animation-delay: -3s;
217
+ }
218
+
219
+ .art-synthwave-starfield-stars + .art-synthwave-starfield-stars::after {
220
+ animation-delay: -4s;
221
+ }
222
+
223
+ /* Pause all animations (opt-in modifier) */
224
+ .art-synthwave-starfield.art-synthwave-starfield-paused *::before,
225
+ .art-synthwave-starfield.art-synthwave-starfield-paused *::after {
226
+ animation-play-state: paused !important;
227
+ }
228
+
229
+ .art-synthwave-starfield-sm {
230
+ --art-synthwave-starfield-size: 300px;
231
+ }
232
+
233
+ .art-synthwave-starfield-lg {
234
+ --art-synthwave-starfield-size: 900px;
235
+ }
236
+ }