You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I define a custom property explicitly with the @property at-rule by using a straightfoward color value for initial-value, it works. Working example below:
Please allow the not-working example to work. It kinda defeats the purpose of custom properties if we still have to write their values after defining them (inside @property, in this case).
The reason for involving @property in this case is to animate CSS gradient, as illustrated in this Stack Overflow answer. Such an animation/transition normally wouldn't work without @property.
The text was updated successfully, but these errors were encountered:
So it becomes quite tricky to build up a set of variables (say for a design system) that may reference each other, without duplicating information in :root
If I define a custom property explicitly with the
@property
at-rule by using a straightfoward color value forinitial-value
, it works. Working example below:But if I use a previously defined custom property for
initial-value
, it does not work. Not-working example below:Please allow the not-working example to work. It kinda defeats the purpose of custom properties if we still have to write their values after defining them (inside
@property
, in this case).The reason for involving
@property
in this case is to animate CSS gradient, as illustrated in this Stack Overflow answer. Such an animation/transition normally wouldn't work without@property
.The text was updated successfully, but these errors were encountered: