Can anyone explain how to get Figma to output CSS that can be used unaltered in a build step to generate file(s) to send to the browser? I want this to prevent create a design twice, first in Figma, then in code.
To implement this I need Figma to:
- include CSS class names in the export.
- use CSS properties with relative units like
ch
,ex
,%
,vw
andvh
to set all sizes and distances. - use expressions as values, like for border sizes:
calc(1px + .1ch)
to shrink/grow the border with font size, but always have at least a 1 pixel border. - calculate colors, like a style with a fixed hue and saturation, and generate a set of shades with vary lightness. Preferable output as CSS variables.
As a software developer I might expect different things from Figma as designers. But nowadays in a project team everyone is a designer/analist/tester/programmer/sysadmin/etc…