GettEngineering / Prism

Gett's Design System code generator. Use Zeplin Styleguides as your R&D's Single Source of Truth.
https://prism.tools
MIT License
361 stars 21 forks source link

Support line spacing #41

Closed crysxd closed 4 years ago

crysxd commented 4 years ago

Hi! Thanks for this super helpful tool!

I'm currently building templates for an Android app. In Zeplin the line height is defined for some of our text styles (e.g. 18.2) with a text size of e.g. 15. To configure this in Android we need to have the "line spacing extra" being 3.2 in this example (18.2 - 15).

It would be great to do something like {{% textStyle.lineHeight - textStyle.fontSize %}} or a similar syntax.

freak4pc commented 4 years ago

Hey @crysxd, thank you very much! :) Always exciting hearing of more people using Prism.

I think it would be non-trivial (and mostly useless for other cases) to support math as a whole, but — I believe we can easily add textStyle.lineSpacing instead, which prism will internally compute for you.

WDYT?

crysxd commented 4 years ago

That would be amazing! Simple workaround