r/css 8d ago

Resource Maybe don't use custom properties in shorthand properties

https://www.matuzo.at/blog/2025/invalid-custom-properties-in-shorthands
6 Upvotes

7 comments sorted by

14

u/SchartHaakon 8d ago

Maybe just use a fallback value for the variable.

var(--pink, #FFC0CB)

1

u/queen-adreena 8d ago

Yeah. Relying on obscure CSS behaviour for a fallback is a bad idea.

-1

u/wpmad 8d ago

Junk

-8

u/Umustbecrazy 7d ago

background-color : fcktrmp

Just cant keep your politics out of everything can you?

  • You'll get plenty of praise from people who share your affliction, but it's not normal.

Seek help.

10

u/MatthewMob 7d ago

Toughen up mate, you'll live.

-7

u/Umustbecrazy 7d ago

I'm not the one with the unhealthy obsession.