Skip to content

Commit 2ae2c9a

Browse files
committed
Enhance wave background animations and adjust opacity settings for improved visual effects
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
1 parent 776d80f commit 2ae2c9a

File tree

1 file changed

+83
-32
lines changed

1 file changed

+83
-32
lines changed

styles/layout.css

Lines changed: 83 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
--of-card-bg: rgba(0, 0, 0, 0.05);
2525
--of-card-border: var(--of-accent-purple);
2626
--of-code-bg: #e8e8ec;
27-
--of-wave-opacity: 0.8;
27+
--of-wave-opacity: 1;
2828
--of-green-text: #007a00;
2929
--of-logo-fill: #231f20;
3030
--of-logo-circle: #f5f5f5;
@@ -175,9 +175,54 @@
175175
}
176176

177177
/* ----------------------------------------------------------
178-
Wave Background Decoration (CSS-only approximation)
179-
The ODP uses flowing green + blue/purple wave lines at
180-
the bottom-left corner of slides.
178+
Wave Animation Keyframes
179+
Each pseudo-element is taller than the container and
180+
extends below it, so the bottom edge is never visible.
181+
Multi-stop 2D translate paths create organic side-to-side
182+
drift. Green and purple counter-phase at different speeds.
183+
---------------------------------------------------------- */
184+
185+
@keyframes green-drift {
186+
0% { transform: translate(0%, 0%) scale(1); }
187+
20% { transform: translate(-6%, -1%) scale(1.02); }
188+
40% { transform: translate(-12%, 0.5%) scale(1.01); }
189+
60% { transform: translate(-4%, -0.5%) scale(1.03); }
190+
80% { transform: translate(-10%, 0%) scale(1.01); }
191+
100% { transform: translate(0%, 0%) scale(1); }
192+
}
193+
194+
@keyframes purple-drift {
195+
0% { transform: translate(-15%, 0%) scale(1); }
196+
25% { transform: translate(-8%, -1%) scale(1.02); }
197+
50% { transform: translate(0%, 0.5%) scale(1.01); }
198+
75% { transform: translate(-10%, -0.5%) scale(1.03); }
199+
100% { transform: translate(-15%, 0%) scale(1); }
200+
}
201+
202+
@keyframes green-drift-prominent {
203+
0% { transform: translate(0%, 0%) scale(1); }
204+
15% { transform: translate(-8%, -1%) scale(1.03); }
205+
35% { transform: translate(-16%, 0.5%) scale(1.01); }
206+
55% { transform: translate(-5%, -1%) scale(1.04); }
207+
75% { transform: translate(-14%, 0%) scale(1.02); }
208+
100% { transform: translate(0%, 0%) scale(1); }
209+
}
210+
211+
@keyframes purple-drift-prominent {
212+
0% { transform: translate(-15%, 0%) scale(1); }
213+
20% { transform: translate(-6%, -1%) scale(1.03); }
214+
45% { transform: translate(0%, 0.5%) scale(1.01); }
215+
70% { transform: translate(-12%, -1%) scale(1.04); }
216+
100% { transform: translate(-15%, 0%) scale(1); }
217+
}
218+
219+
/* ----------------------------------------------------------
220+
Wave Background Decoration
221+
Pseudo-elements are 130% wide x 120% tall, positioned so
222+
they overhang on the right and below. overflow:hidden on
223+
the parent clips them. No hard edges are ever visible
224+
because gradients fade to transparent well inside the
225+
element boundaries.
181226
---------------------------------------------------------- */
182227

183228
.wave-bg {
@@ -190,91 +235,97 @@
190235
.wave-bg::after {
191236
content: "";
192237
position: absolute;
193-
bottom: 0;
238+
bottom: -20%;
194239
left: 0;
195-
width: 100%;
196-
height: 100%;
240+
width: 130%;
241+
height: 120%;
197242
pointer-events: none;
198243
z-index: -1;
244+
will-change: transform;
245+
transform-origin: center bottom;
199246
}
200247

201248
/* Green wave layer */
202249
.wave-bg::before {
203250
background:
204251
radial-gradient(
205-
ellipse 80% 50% at 5% 100%,
206-
rgba(0, 200, 0, calc(0.3 * var(--of-wave-opacity))) 0%,
252+
ellipse 80% 50% at 5% 85%,
253+
rgba(0, 200, 0, calc(0.55 * var(--of-wave-opacity))) 0%,
207254
transparent 70%
208255
),
209256
radial-gradient(
210-
ellipse 60% 40% at 15% 95%,
211-
rgba(0, 200, 0, calc(0.2 * var(--of-wave-opacity))) 0%,
257+
ellipse 60% 40% at 25% 80%,
258+
rgba(0, 200, 0, calc(0.4 * var(--of-wave-opacity))) 0%,
212259
transparent 60%
213260
),
214261
radial-gradient(
215-
ellipse 90% 35% at 95% 100%,
216-
rgba(0, 200, 0, calc(0.15 * var(--of-wave-opacity))) 0%,
262+
ellipse 70% 35% at 75% 85%,
263+
rgba(0, 200, 0, calc(0.3 * var(--of-wave-opacity))) 0%,
217264
transparent 50%
218265
);
266+
animation: green-drift 8s ease-in-out infinite;
219267
}
220268

221269
/* Blue/purple wave layer */
222270
.wave-bg::after {
223271
background:
224272
radial-gradient(
225-
ellipse 70% 45% at 20% 100%,
226-
rgba(123, 123, 255, calc(0.3 * var(--of-wave-opacity))) 0%,
273+
ellipse 70% 45% at 30% 85%,
274+
rgba(123, 123, 255, calc(0.55 * var(--of-wave-opacity))) 0%,
227275
transparent 65%
228276
),
229277
radial-gradient(
230-
ellipse 80% 35% at 85% 100%,
231-
rgba(123, 123, 255, calc(0.25 * var(--of-wave-opacity))) 0%,
278+
ellipse 80% 35% at 70% 85%,
279+
rgba(123, 123, 255, calc(0.45 * var(--of-wave-opacity))) 0%,
232280
transparent 55%
233281
),
234282
radial-gradient(
235-
ellipse 50% 30% at 50% 95%,
236-
rgba(123, 123, 255, calc(0.15 * var(--of-wave-opacity))) 0%,
283+
ellipse 50% 30% at 50% 80%,
284+
rgba(123, 123, 255, calc(0.3 * var(--of-wave-opacity))) 0%,
237285
transparent 50%
238286
);
287+
animation: purple-drift 10s ease-in-out infinite;
239288
}
240289

241-
/* Cover/section slides get more prominent waves */
290+
/* Cover/section slides get more prominent waves with wider drift */
242291
.wave-bg-prominent::before {
243292
background:
244293
radial-gradient(
245-
ellipse 90% 60% at 5% 100%,
246-
rgba(0, 200, 0, calc(0.4 * var(--of-wave-opacity))) 0%,
294+
ellipse 90% 60% at 5% 85%,
295+
rgba(0, 200, 0, calc(0.7 * var(--of-wave-opacity))) 0%,
247296
transparent 70%
248297
),
249298
radial-gradient(
250-
ellipse 70% 50% at 20% 95%,
251-
rgba(0, 200, 0, calc(0.25 * var(--of-wave-opacity))) 0%,
299+
ellipse 70% 50% at 30% 80%,
300+
rgba(0, 200, 0, calc(0.5 * var(--of-wave-opacity))) 0%,
252301
transparent 60%
253302
),
254303
radial-gradient(
255-
ellipse 100% 45% at 90% 100%,
256-
rgba(0, 200, 0, calc(0.2 * var(--of-wave-opacity))) 0%,
304+
ellipse 80% 45% at 75% 85%,
305+
rgba(0, 200, 0, calc(0.4 * var(--of-wave-opacity))) 0%,
257306
transparent 55%
258307
);
308+
animation: green-drift-prominent 7s ease-in-out infinite;
259309
}
260310

261311
.wave-bg-prominent::after {
262312
background:
263313
radial-gradient(
264-
ellipse 80% 55% at 15% 100%,
265-
rgba(123, 123, 255, calc(0.4 * var(--of-wave-opacity))) 0%,
314+
ellipse 80% 55% at 25% 85%,
315+
rgba(123, 123, 255, calc(0.7 * var(--of-wave-opacity))) 0%,
266316
transparent 65%
267317
),
268318
radial-gradient(
269-
ellipse 90% 45% at 80% 100%,
270-
rgba(123, 123, 255, calc(0.3 * var(--of-wave-opacity))) 0%,
319+
ellipse 90% 45% at 65% 85%,
320+
rgba(123, 123, 255, calc(0.55 * var(--of-wave-opacity))) 0%,
271321
transparent 60%
272322
),
273323
radial-gradient(
274-
ellipse 60% 35% at 50% 95%,
275-
rgba(123, 123, 255, calc(0.2 * var(--of-wave-opacity))) 0%,
324+
ellipse 60% 35% at 50% 80%,
325+
rgba(123, 123, 255, calc(0.4 * var(--of-wave-opacity))) 0%,
276326
transparent 50%
277327
);
328+
animation: purple-drift-prominent 9s ease-in-out infinite;
278329
}
279330

280331
/* ----------------------------------------------------------

0 commit comments

Comments
 (0)