News for hackers. Stuff that matters.
Re:PX or REM in CSS? Just Use REM by stevebmark on Saturday December 03, 2022 @05:47PM (#33848284)
I don’t get it. I am semi visually impaired and often use command +/- to increase the font size, and on iPhone, use the reader viewer view for websites. Rems are terrible to use in CSS because they stack relative to their parent, making components non-portable and required hacks to undo parent sizing. Is default font size that prevalent that it’s worth the crappy units?
Re:PX or REM in CSS? Just Use REM by p1318820 on Saturday December 03, 2022 @06:07PM (#33848445)
You're thinking of ems, not rems.
Re:PX or REM in CSS? Just Use REM by noduerme on Saturday December 03, 2022 @08:15PM (#33849467)
ems have their uses, too! Especially for secondary/tertiary text where you might want it to always be 0.8 em of the parent but not want to write a whole separate set of media queries for it.
Re:PX or REM in CSS? Just Use REM by piskerpan on Saturday December 03, 2022 @08:12PM (#33849448)
If you’re talking about the zoom controls in Safari (and any other modern browser), units are completely irrelevant. For the last 15 years, browsers have been changing the size of 1px rather than changing the root font-size. The whole viewport becomes “smaller” so it appears zoomed in.
Re:PX or REM in CSS? Just Use REM by culi on Sunday December 04, 2022 @02:31AM (#33851448)
> command +/-

This doesn't affect font-size (well, I guess you can set it up to do so in Firefox). There's a difference between increasing zoom and increasing font-size