Skip to main content
Question

Styles creating a problem when using variables to manage modes


I’m using variables to manage light & dark modes in my design file. Since variables can hold one value at a time, I use styles when I need a combination of values.

I know that we can use variables inside styles and when the mode changes, the value also changes. In my current situation, I created two styles using colors that do not correspond to each other in dark and light mode. Therefore, I could not use variables when creating these styles. The two styles I created are the counterparts of each other in dark and light modes.

I do not want to create new variables specific to these two styles because there will be a lot of such styles.

How can I ensure that the two styles I obtained by combining independent colors that do not correspond to each other in dark and light mode are updated when I change the mode?

This topic has been closed for replies.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings