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
Named opacity values were previously supported as color alpha modifiers. They have been removed by #14278, but the rationale is - i humbly think - questionable and there remains a case for the relevance of reusable named alpha values.
Supporting some form of theme values for alpha modifiers through a set of variables other than opacity could prevent the confusion risks mentioned in the linked PR all while enabling a better DX with named vars that can be customized independently of their underlying value and prove relevant when designing systems with that expect standardized background or text fading independent of colors.
Sure, one currently could resort to passing the full var function as an arbitrary value (...-my-color/[var(--opacity-foo)]), but this is somewhat cumbersome compared to the syntax that comes with supported theme values (...-my-color/foo).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Named opacity values were previously supported as color alpha modifiers. They have been removed by #14278, but the rationale is - i humbly think - questionable and there remains a case for the relevance of reusable named alpha values.
Supporting some form of theme values for alpha modifiers through a set of variables other than
opacity
could prevent the confusion risks mentioned in the linked PR all while enabling a better DX with named vars that can be customized independently of their underlying value and prove relevant when designing systems with that expect standardized background or text fading independent of colors.For example:
Sure, one currently could resort to passing the full var function as an arbitrary value (
...-my-color/[var(--opacity-foo)]
), but this is somewhat cumbersome compared to the syntax that comes with supported theme values (...-my-color/foo
).Beta Was this translation helpful? Give feedback.
All reactions