Hacker News new | ask | show | jobs
by laszlok 4695 days ago
This change is more about consistency than anything else.

The problem is that other things, like shapes, are specified in pixels. So if text size isn't, it makes it impossible to position any shapes relative to text.

Think about a title in a game; you don't want it to go off the screen and you don't want it to wrap either.

1 comments

I'm not suggesting that only ems be available, just that we need both px and em.
It seems the internet shares this opinion. My feeling was that `px` was a general solution, but I may have misunderstood the true meaning of em. I'd imagined code such as:

    em = 16
    title = Text.height (2*em) (toText "Title")
    pic = image 400 (4*em) "yogi.jpg"
I can also imagine the definition of em depending on the user's settings or fonts. In any case, we'll definitely open this up for discussion on the lists again if people start running into problems :)