Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upLine height stuck at 18px #226
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
evancz
May 11, 2016
Member
Sorry this did not get attention til now! The Graphics.* modules now live in evancz/elm-graphics so I am trying to get stuff migrated over there. I am hoping that'll make it easier to get help with issues like this!
|
Sorry this did not get attention til now! The |
evancz
closed this
May 11, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
justinmanley commentedApr 24, 2015
Sometimes, I'd like to show text in the browser that is smaller than 16pt.
In some cases, that's because I'd like it to take up less space than 16pt text. At the moment, that's not possible with the Graphics.Element module. Here's what happens when you try to use different font-sizes with Graphics.Element:
That is, setting the
heightofTextto a value <16 will change the font-size, but the text will still take up the same amount of space; setting theheightto a value >16 will change both the font-size and the amount of space that the text uses.Is this a bug? I asked about it on elm-discuss and never got an answer.
This behavior is caused by the way that
Textis handled by Elm. AllTextseems to be wrapped in a<div>which, among other things, hasheight: 18px. Whenheightis called on a piece ofText, the HTML text is wrapped in a<span>withfont-sizeset to theheightbefore being placed inside this<div>.Why is the height of the enclosing
<div>set to18px?