Skip to main content

LAUNCHED: Include color variable alias in dev mode side panel


Roxanne_G_UX

Hi. I have set up all my color variables in my design system β€œApp_Usage_Collection.” But my devs use storybook and they call the colors by their primitive names, so I set up another collection of color variables called _Storybook. I alias the Storybook Primitives in the App_Color_Usage collection. BUT in dev mode I only see the app_color_usage collection variable name, not the alias. Can we also please see the alias listed? Thanks! πŸ™

50 replies

Phiri_Thoko

Yes please!! Was looking for this and it would be immensely useful!!


kykoo
  • New Member
  • 1 reply
  • July 12, 2023

Really… wanted to fix…


Roxanne_G_UX

Tell your friends who agree to upvote this please!


Kolodziej_Ashley

I need aliases for my use case as well.


Polyandra_Cazuza

pleaseee, we need this!


Blagovirnyy_Roman

I’ve created root variables for all of my root colors. Then, for each component I am creating alias variables for colors of specific elements (e.g., text, background, border) in different states (default, hover, active, disabled) and configurations (e.g., default, error, selected). The alias variables link back to specific root variables. However, in dev mode all I see is the HEX code, not the name of the root variable that the developer should assign as the value to the alias variable for the specific element of the component in a specific state and configuration. I think this is a big oversight, as the developer would need to find the correct root variable that needs to be assigned to each alias variable for each component for each theme when creating the themes in CSS by matching up HEX codes.

TL;DR; if a variable is getting its value from another variable, please give us the option to see this relationship in Dev Mode.

Here is a basic example:

/* Global CSS ------------------*/

/* root colors */
/* --[name space]-[var type]-root-[name] */
--ns-color-root-light: #AAAAAA;
--ns-color-root-neutral: #808080;
--ns-color-root-dark: #111111;


/* alias colors for Button component */
/* --[name space]-[var type]-[component]-[configuration a...n]-[state]-[element] */

/* light theme */
.light {
    --ns-color-button-primary-default-label: var(--ns-color-root-dark);
    --ns-color-button-primary-default-background: var(--ns-color-root-neutral);
    --ns-color-button-primary-default-border: var(--ns-color-root-dark);
}

/* dark theme */
.dark {
    --ns-color-button-primary-default-label: var(--ns-color-root-light);
    --ns-color-button-primary-default-background: var(--ns-color-root-neutral);
    --ns-color-button-primary-default-border: var(--ns-color-root-light);
}

/*----------------------*/
/* Button component CSS */

color: var(--ns-color-button-primary-default-label);
background-color: var(--ns-color-button-primary-default-background);
border-color: var(--ns-color-button-primary-default-border);
/* When I inspect the Button in dev mode,
I want to see the names of the variables that these three
variables are getting their values from, NOT the HEX. **/

RizePoint_Product

I’m having the same issue. My devs need to see the values that are feeding the semantic components, but there’s no way to do that in dev mode. The unfortunate workaround is that I need to manually define the underlying primitive values using Code Syntax, which is going to be a time consuming task for 250 variables. Please introduce this feature!


Stephan_de_Oliveira1

I have THOUSANDS (really) of aliased variables. I need this feature. Let’s do it, Figma! πŸ”₯ πŸ”₯ πŸ”₯


Stephan_de_Oliveira1

Hey, @Josh ! How are you doing?

It would be great to get some feedback on this issue here, so I can know how I should use aliased variables for now… If Figma is going to implement something in the next few days, I’ll keep my semantic-to-component-tokens scheme, otherwise, I will only use semantic aliased variables for now… Could you help us, please?

Thanks a lot!


Stephan_de_Oliveira1

Hey, @RizePoint_Product , did you find any plugin to help?


RizePoint_Product

Unfortunately not. We settled on a workaround, though, which was me listing the color β€œformula” as a note next to the relevant components.

Ex: All outlines are [color]-70, all text is [color]-80, etc. The β€œColor” is part of the component properties so that, at least, they have access to.


Blackwood
  • 10 replies
  • September 8, 2023

Upvoted along with a few other similar requests here. Developers REALLY need this to implement and maintain design systems in code. Right now you need to make all your developers editors just to see the alias mappings. Or provide a screenshot of the mapping.

It feels like a core part of the variables feature to be able to see the trail.


Cameron_Miller2

I am also running into this same issue. We have put effort into defining two collections for color variables: one collection for primitive colors, and another for semantic color variables. Upon our initial attempt at development handoff with our newly defined semantic color variables, our dev team immediately came back to us with confusion as they weren’t able to reference the primitive color tokens (which is what they are used to referencing, and what they have defined as tokens in their css). So now what I need to do is essentially revert our handoff documentation to reference the original color styles, which is certainly not ideal.

It would be GREAT if Figma could display the root/primitive/aliased color token alongside the hex value in dev mode. Please and thank you!!


  • 1 reply
  • October 20, 2023

I honestly can’t comprehend how this made it passed the whiteboard stage without including something as necessary as this


Alex_Wright

Yes please, we run into these issues far too often during design handoffs from myself to the devs. Please update this πŸ™‚


  • 1 reply
  • October 26, 2023

Please, I need this. Now! πŸ˜‰


Gaetan3
  • 2 replies
  • October 31, 2023

We really need this, please Figma πŸ™


Jordan_Tuffery

That would be really awesome πŸ™


Milo4
  • 1 reply
  • November 1, 2023

Dev mode needs this update +1 +1 +1 +1


  • 3 replies
  • December 7, 2023

Please Figma, add this!


This is also needed just as a designer trying to manage color name aliases. When designing I often want to know the aliases and it’s very slow trying to manually track them down.


Aaron_Wu
  • 2 replies
  • January 5, 2024

Has anyone found a good workaround?


Valentine_Makhouleen

Dev mode needs this as a feature for it to be a usable product.


Roxanne_G
  • New Member
  • 21 replies
  • January 10, 2024

I’m the original poster. As of today the UX team I work on decided to hide our color variables semantic set and redo all our components in our whole design system using our primitive color variables set. That way the devs and we will all see the same thing because this forum item looks like it will not be addressed


Chelsey1
  • 3 replies
  • January 11, 2024

It would be nice to at least be able to see the variables set up by the designer. Then we can match the variable hierarchy they are using.


Reply


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