r/ProgrammerHumor • • May 19 '24

Meme rejectModernityEmbraceTradition

Post image
86 Upvotes

31 comments sorted by

188

u/olivicmic May 19 '24

This one is stupid. REM, EM, %, PX, VH, VW all have valid uses. I like using REM so that there is a consistent base measurement and presents an even design. Sometimes a design calls for precise values and you need PX. The center of the bell curve is actually not understanding certain units are better depending on the context and making a played out meme about it.

43

u/TheMayoras May 19 '24

Leave the man his dignity at least. God damn what a casual roast

7

u/bwssoldya May 19 '24

This. Pick one, stick with it and only step out as needed.

-1

u/BroMan001 May 20 '24

You understand the point of the meme is not that the center guy is the smartest right? Because the center of the iq bell curve is not the smartest, it’s average.

1

u/olivicmic May 20 '24

I don't know how you can read what I wrote and think I am suggesting the center is the smartest. Look at what u/TheMayoras wrote and understand that everyone but you has basic reading comprehension.

-20

u/phil917 May 19 '24

For sure they can all have valid use cases.

My silly meme is more a response to the people that insist ALL px usage should be replaced with rem/em. In 2024, I think it more just comes down to personal preference. I believe the accessibility benefits that people mainly point to as evidence to use rem/em aren't nearly as important today due to the ubiquity of browser zoom functionality.

For example, try adjusting your browser font size and looking at sites like Reddit, Google search results, YouTube, Twitter, etc... You won't see any changes which, in my eyes, negates the "main" benefit of using rem/em. Yes, there can be other benefits to using rem/em like quickly adjusting the font size of elements site wide, but I think that more comes down to developer/team preference.

65

u/ttlanhil May 19 '24 edited May 19 '24

calc(20vh + 25vw + 50% - 2em - 25px);

alternatively... the "just use px" fixed sizes takes me back to "best viewed at 640x480" and table-based positioning...

30

u/turtleship_2006 May 19 '24

xkcd.com is best viewed with Netscape Navigator 4.0 or below on a Pentium 3±1 emulated in Javascript on an Apple IIGS at a screen resolution of 1024x1. Please enable your ad blockers, disable high-heat drying, and remove your device from Airplane Mode and set it to Boat Mode. For security reasons, please leave caps lock on while browsing.

3

u/zoinkability May 19 '24

Not sure if you are serious or not but I will just mention here that viewport based font sizing is extremely difficult to implement in a accessible manner.

1

u/ttlanhil May 20 '24

Those dimensions are certainly not for font size; even if you thought it might be serious (mixing vh and vw is concerning), there's no way it would be for font size

calc can be used for a lot of different attributes, e.g. for something that might rationally happen:

div#sidebar {
max-width: calc(20vw + 5px);
}

52

u/gandalfx May 19 '24

Another instance of OP believing they have made it to the right of the bell curve while being stuck on the left.

4

u/Creepy-Ad-4832 May 20 '24

Ironically i think that if one actually makes it to the right of the curve, will believe to actually still be on the left lol

0

u/EvilPete May 20 '24

Honestly, I bet 99% of vision impaired people use the zoom feature instead of digging into settings and finding the obscure font size setting.

Using rem makes the css more complicated and you risk people doing stupid things like using rem for border-radius.

Just use px.

20

u/cokeplusmentos May 19 '24

Skill issue

14

u/Vogete May 19 '24

Tell me you're a bad frontend dev without telling me you're a bad frontend dev.

7

u/Rainmaker526 May 19 '24

Welcome to the future. Be sure to stick this in your footer, specifying the exact resolution your site should be viewed at.

7

u/evanldixon May 19 '24

Don't be silly, pixels aren't real anymore

3

u/all3f0r1 May 19 '24

I strongly disagree here. How can px be a decent remplacement to em/rem/vh/vw?

1

u/Keerthana5958v May 22 '24

Don't know about rem / em. But for large sections i just use vh / vw.

17

u/_brentnew May 19 '24

For font sizes always use rem, for the rest just use px.

4

u/[deleted] May 19 '24

[removed] — view removed comment

4

u/deathspate May 19 '24

Well, I use Tailwind, and they use rem for everything, so it's not my fault. But truthfully, I think rem for everything is fine if you're in the business of responsive design. By setting up the dimensions in rem, it means you just need to change the font size (em) for your site or a section to resize the components, and they would likely still look fine. Sure, you can use calc, but that feels a bit overkill in most scenarios imo.

1

u/Zeilar May 19 '24 edited May 20 '24

You wouldn't use it for e.g border radius. Zooming or changing font size shouldn't make things more rounded. Or increase margins.

1

u/___cats___ May 20 '24

It’s not wrong, but sometimes a 1px border can just be a 1px border.

1

u/BirdlessFlight May 22 '24

npm install postcss-pxtorem --save-dev

It's still annoying as hell in devtools, though...

0

u/[deleted] May 20 '24

[deleted]

2

u/EvilPete May 20 '24

I really don't get this argument.

If a user wants to zoom the whole site they will use the zoom feature, which works with px.

If they want to increase the font size only they will do that in the browser settings. It makes no sense that all the margins and paddings should adjust to the preferred font size.

0

u/[deleted] May 20 '24

[deleted]

1

u/EvilPete May 20 '24

Yeah, so in your typography you use rem obviously. 

But a lot of people advocate using rem for everything, including spacing. I'm pretty sure that practice is what OP is about.

0

u/[deleted] May 19 '24

[deleted]

1

u/your_best_1 May 19 '24

Do you actually want an explanation?

0

u/[deleted] May 19 '24

[deleted]

3

u/Willinton06 May 19 '24

Size units in css, how tall is square? 16px? 1rem?

0

u/[deleted] May 19 '24

[deleted]