figma-polychrom icon indicating copy to clipboard operation
figma-polychrom copied to clipboard

Move to CSS Custom Properties for dynamic styles

Open ai opened this issue 2 years ago • 0 comments

Reasons:

  1. Inline CSS has worse performance (because their changes re-build CSSOM)
  2. A better separation. All styles will be in Tailwind (I think you could use CSS Custom Properties colors in Tailwind config)
  3. Often you use the same color in two places (like top and bottom use label color). With CSS Custom Properties they both can share the same token.
  4. Very likely that you will be able to remove <ColorMetrics>

ai avatar Aug 16 '23 16:08 ai