CSS line-height property weirdness
Opened this issue · 0 comments
tsawitzki commented
Hey John,
what an amazing plugin idea first of all! I have one issue though right now, after test running it in my environment:
Setting the font-size in em seems to work fine as far as I can see, I run into problems setting line-height property though (which Sketch itself is a bit nasty with). Steps to reproduce this:
- Make a text layer
- Set line-height via Sketch GUI to "auto" or leave on default
- Give text layer class name (e.g. .copy)
- Set the line-height property via css to 135% (a value I often start with in CSS) and save
- The text layer will flicker with a change of line height change but jump back to its original line size
- Set the line-height in CSS again, this time to e.g 145% and save
- The text layer will now change its line-height but way too much
- Set the line-height in CSS again, this time to e.g **100%**and save
- Nothing will happen
- Set the line-height in CSS again, this time to 10px and save
- You will get some decent line-height but it feels a bit too much
- Set the line-height in CSS again, this time to 0px and save
- The line-height will increase …
Anyway, it seems like setting the line-height in CSS is not really possible or am I getting something completely wrong, maybe?
It would be great to be able to use line-height at least kind of like in a real browser setting.
Regards
Tobias