News for hackers. Stuff that matters.
Re:PX or REM in CSS? Just Use REM by Wowfunhappy on Saturday December 03, 2022 @05:57PM (#33848363)
Honest question: why do people increase the font size instead of just changing the default zoom level?

I feel that the latter creates a more consistent experience.

Re:PX or REM in CSS? Just Use REM by croes on Saturday December 03, 2022 @06:19PM (#33848537)
Maybe because they just want bigger text and not a bigger site.
Re:PX or REM in CSS? Just Use REM by csande17 on Saturday December 03, 2022 @09:05PM (#33849803)
Unfortunately, if web developers follow the advice from the article to use rem units everywhere, they'll get a bigger site.
Re:PX or REM in CSS? Just Use REM by ehutch79 on Sunday December 04, 2022 @10:28AM (#33854490)
You are correct!

REM for text, PX for layout

But if you're going to choose one, use rem with the body text-size hack.

Re:PX or REM in CSS? Just Use REM by nailer on Saturday December 03, 2022 @06:21PM (#33848553)
Because old web browsers didn't let people zoom properly. I think IE7 was one of the first.
Re:PX or REM in CSS? Just Use REM by Wowfunhappy on Saturday December 03, 2022 @07:01PM (#33848901)
Yeah, and that makes sense in 2010, but not in 2022.
Re:PX or REM in CSS? Just Use REM by lmm on Saturday December 03, 2022 @07:21PM (#33849055)
Maybe I want to keep seeing images at 1:1. Maybe the font sizes are bad. I remember the days when the user was supposed to be in control of how websites were styled.
Re:PX or REM in CSS? Just Use REM by ehutch79 on Saturday December 03, 2022 @09:03PM (#33849795)
Depending on your vision, you might be able to see a button is a button, but the font is just too small by a few pts. You don't need borders or whatever zoomed, just the font size bumped a bit.
Re:PX or REM in CSS? Just Use REM by layer8 on Sunday December 04, 2022 @12:20AM (#33850860)
Because they don’t want the layout to get bigger, but just the text size within the existing layout.
Re:PX or REM in CSS? Just Use REM by SebastianKra on Sunday December 04, 2022 @07:07AM (#33852932)
But then the articles recommendation doesn't make sense, because using rem for everything would also scale the layout.

I'd guess that you should always use pixels except for /(max-)?(width|height)/, because these are the only properties that may make assumptions about the size the content.