Give each backdrop icon a distinct light color

Cycle a small warm palette (terracotta, golden-brown, golden-yellow)
across the icons via a CSS custom property instead of one flat tint.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-13 20:31:43 +02:00
co-authored by Claude Sonnet 5
parent 6bd63b53c6
commit 6a81b305bc
+3
View File
@@ -46,6 +46,7 @@ const FriesIcon = () => (
) )
const ICONS = [PizzaIcon, BurgerIcon, FriesIcon] const ICONS = [PizzaIcon, BurgerIcon, FriesIcon]
const ICON_COLORS = ['#e2725b', '#d9a441', '#e8c468']
// Fixed, hand-placed positions rather than random ones — random values would // Fixed, hand-placed positions rather than random ones — random values would
// differ between the server-rendered and first client-rendered HTML and // differ between the server-rendered and first client-rendered HTML and
@@ -66,6 +67,7 @@ export const MenuBackdrop = () => (
<div className={styles.backdrop} aria-hidden="true"> <div className={styles.backdrop} aria-hidden="true">
{PLACEMENTS.map((placement, index) => { {PLACEMENTS.map((placement, index) => {
const Icon = ICONS[index % ICONS.length] const Icon = ICONS[index % ICONS.length]
const color = ICON_COLORS[index % ICON_COLORS.length]
return ( return (
<span <span
key={index} key={index}
@@ -78,6 +80,7 @@ export const MenuBackdrop = () => (
height: placement.size, height: placement.size,
animationDelay: `${placement.delay}s`, animationDelay: `${placement.delay}s`,
'--icon-rotate': `${placement.rotate}deg`, '--icon-rotate': `${placement.rotate}deg`,
color,
} as CSSProperties } as CSSProperties
} }
> >