mikaelvesavuori / figmagic

Figmagic is the missing piece between DevOps and design: Generate design tokens, export graphics, and extract design token-driven React components from your Figma documents.
https://docs.figmagic.com
MIT License
807 stars 71 forks source link

Export CSS variables #190

Closed mikaelvesavuori closed 11 months ago

mikaelvesavuori commented 1 year ago

Discussed in https://github.com/mikaelvesavuori/figmagic/discussions/168

Originally posted by **brunosarlo** August 23, 2022 Hi! I'm looking forward to have figmagic export css variables. I couldn't find an easy way to do this yet. It has already been proposed as feature: https://github.com/mikaelvesavuori/figmagic/projects/1#card-38295671 Any ideas? Thanks!
tjmusser commented 11 months ago

Not sure if it helps @mikaelvesavuori but our project uses Style Dictionary to output figmagic data to CSS variables, LESS, SCSS, and XAML for multiple teams/projects.

We take the json output and then run it through style dictionary.

mikaelvesavuori commented 11 months ago

Added basic support in version 4.5.9. See https://github.com/mikaelvesavuori/figmagic#switch-token-file-format