Two lines of CSS that will improve HN on mobile (IMO)
131–140 of 163 posts
Re: Two lines of CSS that will improve HN on mobile (IMO)
#132Earlier quoted context omitted.
12pt = 1em, so how would using em be different?
`em` is a relative unit that can change depending font-size of the given element while `pt` is an absolute value. the W3C does not recomend using any absolute value such as `pt` for text rendered on screens. only relative values or `px` should be used. [0] I would suggest this very helpful article on the topic, it provides a lot of good info and context on this subject. [0] https://www.w3.org/Style/Examples/007/units…
https://en.wikipedia.org/wiki/Em_(typography)
There's also a unit called an "en", which was based on the width of "N":
Re: Two lines of CSS that will improve HN on mobile (IMO)
#133[0] https://apps.apple.com/us/app/apollo-for-reddit/id979274575
Re: Two lines of CSS that will improve HN on mobile (IMO)
#134Earlier quoted context omitted.
12pt = 1em, so how would using em be different?
`em` is a relative unit that can change depending font-size of the given element while `pt` is an absolute value. the W3C does not recomend using any absolute value such as `pt` for text rendered on screens. only relative values or `px` should be used. [0] I would suggest this very helpful article on the topic, it provides a lot of good info and context on this subject. [0] https://www.w3.org/Style/Examples/007/units…
Both px and pt (and cm, mm, in etc.) are absolute (in the sense that they don't depend on the current font size, only on the pixel density and scale factor of the display). So there is no reason to prefer px to the other units.
In traditional typography, pt is relative to the size of a font, but in CSS it is just an absolute measurement like px.
See: https://drafts.csswg.org/css-values-3/#absolute-lengths
The tutorial you link to is wrong, which is weird since it is written by the inventor of CSS! It might be because it is out of date and reflect the original intention of CSS, not how it actually turned out.
Originally, the intention of CSS was that px should correspond to a pixel and pt/mm/in to physical dimensions, so the ratio between px and pt would vary depending on the pixel density. But people started to specify font sizes in px, which meant text would just become unreadably small when high-density displays were introduced. So instead px was redefined as a physical unit rounded to nearest pixel, and the other absolute units defined relative to this.
Re: Two lines of CSS that will improve HN on mobile (IMO)
#135Sometimes I wish the Apollo [0] app developer, Christian Selig, would create a HN app using the bones of the Apollo app but that would probably just increase my HN browsing time whereas now I normally only browse HN on desktop. [0] https://apps.apple.com/us/app/apollo-for-reddit/id979274575
I'm so used to the Reddit app rif is fun, to a point that any HM apps I have tried feel "wrong" as soon as they're different from it and I constantly feel frustrated.
I ended up just not read HN much on my phone and when I do, I just use the webpage.
Re: Two lines of CSS that will improve HN on mobile (IMO)
#136Sometimes I wish the Apollo [0] app developer, Christian Selig, would create a HN app using the bones of the Apollo app but that would probably just increase my HN browsing time whereas now I normally only browse HN on desktop. [0] https://apps.apple.com/us/app/apollo-for-reddit/id979274575
Do you know if HN or any third party provides an API so that devs can play around building mobile interfaces ?
Re: Two lines of CSS that will improve HN on mobile (IMO)
#137Re: Two lines of CSS that will improve HN on mobile (IMO)
#138For me the up- and downvote icons are too close together and I always have to pinch zoom to upvote (I don't downvote often). So prefer a bit more spacing between them.
On some phone widths, you end up with the profile and "logout" links right above one another and it's even odds you'll have to log back in on all your device because you'll fat-finger the wrong one and there's no confirmation or anything, just straight fuck off.
No idea why that damned logout link can't be moved to the profile, is anyone really in such a hurry to log out they can't just hit two links?
Re: Two lines of CSS that will improve HN on mobile (IMO)
#139Don't use points, use em or rem. Otherwise it won't render well for people with unusual screen formats.
12pt = 1em, so how would using em be different?
See: https://drafts.csswg.org/css-values-3/#absolute-lengths
Much terminology have a different meaning in CSS than in traditional typography. For example the em unit does not actually depend on the width of on "m"-letter in the font, rather it depends on the height of the font.
Re: Two lines of CSS that will improve HN on mobile (IMO)
#140Sometimes I wish the Apollo [0] app developer, Christian Selig, would create a HN app using the bones of the Apollo app but that would probably just increase my HN browsing time whereas now I normally only browse HN on desktop. [0] https://apps.apple.com/us/app/apollo-for-reddit/id979274575