4 ms·
The change from em to pixels seems misguided. Pixels are not a replacement for ems just because it is a programming language. The claim made in the discussion
by asdasf 13y ago
The change from em to pixels seems misguided. Pixels are not a replacement for ems just because it is a programming language. The claim made in the discussion that em is a kludge to make relative resizing possible is wrong. You don't control the users font size to start with. Using ems lets me specify sizes in terms relative to your font size which I do not know. Without ems, I have to force a pixel size on everything to start with, which is terrible (people with vision problems can't read anything now) and which doesn't actually work (setting a font to 10px will not work in my browser for example, I have the minimum font size constrained to 14px). We really do need both px and em to be available.
On a side note, any plans to integrate sounds? The use case I have that got me considering elm was simple web based games like solitaire or connect 4. Sound effects would be really nice there.
- laszlok 13y agoThis 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.
- asdasf 13y agoI'm not suggesting that only ems be available, just that we need both px and em.
- wheatBread 13y agoIt 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 :)