Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Support line spacing #41

Closed
crysxd opened this issue Aug 13, 2020 · 2 comments · Fixed by #42
Closed

Support line spacing #41

crysxd opened this issue Aug 13, 2020 · 2 comments · Fixed by #42
Assignees
Labels

Comments

@crysxd
Copy link

crysxd commented Aug 13, 2020

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
Copy link
Contributor

freak4pc commented Aug 13, 2020

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?

@freak4pc freak4pc added the idea label Aug 13, 2020
@freak4pc freak4pc self-assigned this Aug 13, 2020
@crysxd
Copy link
Author

crysxd commented Aug 13, 2020

That would be amazing! Simple workaround

@freak4pc freak4pc changed the title Suppport math operations Support line spacing Aug 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants