ant-design / antd-token-previewer

https://ant-design.github.io/antd-token-previewer
MIT License
71 stars 21 forks source link

Add a section to define variables #214

Open RamonEspinosa opened 6 months ago

RamonEspinosa commented 6 months ago

The theme editor works great, but maintaining a theme can become hard for people who want more control over the components. Imagine the following case:

  1. A designer updates all color properties to match a color palette.
  2. The new theme is reviewed and they want darker colors. Hence a new color palette is chosen.
  3. The designer has to go through the whole interface and update every single color property 😭

I propose to add a section to define custom variables. When defined, variables will be then converted to CSS custom properties and could be used to define the value of a property in the theme.