-
Notifications
You must be signed in to change notification settings - Fork 5
Support aliases for colors #11
Comments
Although I'm not sure that's how I would structure colors section in the theme but I'd happy to get support for aliases on all tokens since it's supported by the spec. |
@okonet By structuring the colors section do you mean the position of the alias name? Should we add support for all aliases in a separate issue? |
No, I meant I would not not use aliases like you're using so I would not run into that problem in the first place. Usually, what I do is having palettes (no semantics) and then I refer to them in the color theme to get more "semantic" tokens like "warning" etc. Example react-design-tokens/src/examples/cdds.js Lines 48 to 49 in f175059
|
I don't think so but I think the PR should include aliases support for all scales. Thoughts? |
This is how we use aliases in our DS. Colors array has |
Now, colors palettes are enumerated from
0
topalette.length - 1
.We want to support aliases for color arrays indices.
Example:
or
Proposal
ColorSwatch
withalias
property and display alias under the default namePaletteSwatch
withaliasesKey
prop which will be used to read aliases from colors array and pass it toColorSwatch
The text was updated successfully, but these errors were encountered: