onyx-gen / onyx

A Figma plugin that helps to transform Figma Design Systems to Vue components with UnoCSS utility classes.
MIT License
4 stars 0 forks source link

Handle enabled vertical trim typography option #5

Open MiguelFranken opened 7 months ago

MiguelFranken commented 7 months ago

It is possible to enable the vertical trim option in Figma. There is no direct CSS equal for a vertical trim fix. One might use https://github.com/seek-oss/capsize to add a approximated vertical trim fix using font metrics.

We should give the option to alter the generated font utility class. For example: font-$custom-font to font-cap-$custom-font. The updated utility class name is something user-specific that adds the capsize fix to the generated utility class. How to alter the original utility class name to the target one containing the cap infix should be configurable in the Figma Plugin UI via maybe a regex pattern or something similar.

Image