CAnnot add design token alias

Hey, this is not a bug. I’ll try to explain it:

Design token names are built from token paths. Periods (.) are used to nest tokens groups. Then, the last segment of the token name corresponds to the token.

The thing is that a token name cannot also be a token group.

So in the example you are using:

bs.color.blue creates this nested structure:

bs          /* group */
  color     /* group */
	blue    /* token */
      

But bs.color.blue.500 creates this one:

bs          /* group */
  color     /* group */
	blue    /* group */
      500   /* token */

Here’s the problem: in the first case, blue is already a token. In the second case, you’re trying to make blue a group, which causes a conflict.

This behavior is not from Penpot, but from tokens spec :slight_smile:

I hope this helps!

3 Likes