Skip to content

Temp variables #107

Answered by argyleink
roblevintennis asked this question in Q&A
Dec 6, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Lea Verou writes very well about the benefits and reasoning here! https://lea.verou.me/2021/10/custom-properties-with-defaults/

I think of it like, you have global props (generics), which back your app props which aren't specific to a token/prop, they're about a purpose. have a prop back a prop has big benefits. See the Color 101 section for a nice breakdown of when it becomes really nice. like for example, users of your design system dont need to memorize --gray-3 for dark theme light text if you just have a --text-2 var that is being adapted to light and dark in media queries. it's like, there's props that back all the props (back of the front-of-the-front) and then the props the front-…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@roblevintennis
Comment options

@argyleink
Comment options

@roblevintennis
Comment options

Answer selected by roblevintennis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants