Skip to main content
Lukas_Oppermann
Jan 29, 2021 1:09 PM UTC

Use styles in other styles

Problem
Currently you can’t use color styles in other styles like grid or effect styles.
However this is very helpful for building design systems. Otherwise when changing a color that is used in effect styles you have to manually change it in all effect styles (which is a lot of work and can lead to bugs by forgetting it).

Solution
One possible solution would be to allow us to use color styles within the other styles.

Am I the only person who feels this pain or do others run into this as well?

45 replies

Vesno
May 30, 2022 2:34 PM UTC

this would be super helpful - immense help when creating a design system and sharing it with devs

Marc7
Jun 1, 2022 7:14 AM UTC

For it will make sense to can use style colors to create another one. For example, in code, I have neutrals and branding colors as base colors and these CSS variables are used to create other variables → --xx-color-text-primary: --neutral-100; This will be amazing!

Glenn3
Jun 14, 2022 2:55 PM UTC

We need this feature asap!
image

Ludwig_T
New Member
Jun 17, 2022 2:02 AM UTC

Nested Styles are a must for anyone making a design system.

Zack_Davenport
Jun 30, 2022 7:14 PM UTC

+1, need this feature asap.

Whatislove
Jul 16, 2022 11:57 AM UTC

+1, it would be very helpful!

MFR
Jul 16, 2022 6:57 PM UTC
MFR
Jul 16, 2022 7:26 PM UTC

I just explored a solution. You can use a BASE colour and then apply styles this way. It’s also useful for changing an entire theme of a design at once.

You could make the shades different variants of the same component and swap them easily as states. Changing the base colour on the component would allow you to theme it.

Ludwig_T
New Member
Sep 13, 2022 3:32 PM UTC

I have found that “Figma Design Token” plugin works well to do this and has good video tutorial on YouTube.

Ludwig_T
New Member
Sep 13, 2022 3:34 PM UTC

This is a very interesting approach, that’s for sharing it I will give it a try and see if it fits for me as well
❤️