News for hackers. Stuff that matters.
Re:No CSS Club – because no JavaScript was not hardcore enough by lexicality on Sunday July 16, 2023 @07:09AM (#36745631)
As ever, the staggering difference in readability between https://motherfuckingwebsite.com/ and http://bettermotherfuckingwebsite.com/ (on desktop at least) demonstrates that rawdogging the internet is generally a bad idea.
Re:No CSS Club – because no JavaScript was not hardcore enough by Tomte on Sunday July 16, 2023 @07:13AM (#36745670)
Re:No CSS Club – because no JavaScript was not hardcore enough by bjourne on Sunday July 16, 2023 @07:33AM (#36745822)
text-align: justify ruins the readability of the text. Won't ever work until browsers become much better at hyphenation.
Re:No CSS Club – because no JavaScript was not hardcore enough by GoblinSlayer on Monday July 17, 2023 @10:12AM (#36758484)
Uh, hyphenation ruins readability much worse than justified text.
Re:No CSS Club – because no JavaScript was not hardcore enough by LoganDark on Sunday July 16, 2023 @07:42AM (#36745885)
> Bump that body copy to render close to 16px or more

also known as the default font size in browsers, don't you dare override the user's preferred font size for body copy, scale everything else in units of rem instead.

Re:No CSS Club – because no JavaScript was not hardcore enough by wizzwizz4 on Sunday July 16, 2023 @07:45AM (#36745903)
Don't scale everything in units of rem; we want "zoom text only" to continue to do what it says on the tin. Only scale the things that need to be text-sized.
Re:No CSS Club – because no JavaScript was not hardcore enough by Tade0 on Sunday July 16, 2023 @08:08AM (#36746078)
Things like border-radius are especially fun to watch then they're sized in rem.

What was a regular border, eventually becomes a half-circle.

Re:No CSS Club – because no JavaScript was not hardcore enough by FalconSensei on Sunday July 16, 2023 @03:16PM (#36750476)
Also spacing/padding increases to much that then at some point you only have like 1 word per line, and the screen is half blank space
Re:No CSS Club – because no JavaScript was not hardcore enough by LoganDark on Sunday July 16, 2023 @08:14AM (#36746115)
Is there a reason for certain CSS frameworks like Tailwind to scale absolutely everything in units of rem and ignore px like the plague? Or is that just too far?

I did mean font sizes though. :)

Re:No CSS Club – because no JavaScript was not hardcore enough by dmix on Sunday July 16, 2023 @09:29AM (#36746776)
Everyone jumped on the only-use-rem train when mobile started dominating because it provides relative units that scale better rather than absolute pixels.

In practice it doesn't really mean much outside of blog-like text so when doing layouts it's more of just a standard everyone agrees on using everywhere because it's easier to stick to one for consistencies sake and it does the job. I don't think many frontend devs ever test zooming text using a browser anyway, their main concern is variations in screen sizes, basically device variation not manually zooming text. But I get the arguments to limit it to text.

Re:No CSS Club – because no JavaScript was not hardcore enough by afiori on Sunday July 16, 2023 @03:04PM (#36750366)
Modern browsers zoom by increasing the CSS pixel size, so now all units are relative
Re:No CSS Club – because no JavaScript was not hardcore enough by GoblinSlayer on Monday July 17, 2023 @10:00AM (#36758339)
Zoom can use different algorithms, it's a setting.
Re:No CSS Club – because no JavaScript was not hardcore enough by wizzwizz4 on Sunday July 16, 2023 @11:28AM (#36748090)
Incompetence, and thus obedience to a mistakenly-generalised caricature of "good practice", is my guess. I used to use em everywhere for exactly this reason. (The only reason I didn't shift to "rem everywhere", "flexbox everywhere", "web fonts everywhere", etc. was obedience to some different caricature of "good practice".)

I've never seen a CSS framework that's good. (Unless you count https://simplecss.org/, but that's of very narrow usefulness.) They're all made by the kinds of people who don't understand web technologies, and seek to hide them behind a layer of abstraction so they don't have to think about them any more. Unfortunately for them, there's a reason the web's how it is. Some of it's backwards-compatibility, but most of it is that a large group of very clever people failed to find a way to make it any simpler without breaking something important.

If you find yourself reaching for something like Tailwind or Bootstrap, just use inline style attributes. It's easier for everyone involved.

Re:No CSS Club – because no JavaScript was not hardcore enough by afiori on Sunday July 16, 2023 @03:12PM (#36750444)
Good luck using pseudoclasses, pseudoelements or media queries in inline styles.

Wrt Tailwind I still have not used it enough to decide whether it is good™ but it is not that different from writing inline styles.

Apart from optional plugins it is more like a CSS preprocessor than a framework (every class expands to one or few CSS declaration)

The most frameworky features it has is that it predefines CSS variables to allow further customization

Re:No CSS Club – because no JavaScript was not hardcore enough by wizzwizz4 on Monday July 17, 2023 @07:42PM (#36765711)
If you need any of those things, you should be using a proper stylesheet. Use <style scoped='scoped'> in the <body>, if you really must.

A crude "not that different from writing inline styles" classy framework just makes it harder to refactor your CSS in future, because it's all tucked away under incomprehensibly-named CSS classes, and there are otherwise-useless <div>s all through the HTML.

Re:No CSS Club – because no JavaScript was not hardcore enough by afiori on Tuesday July 18, 2023 @05:51AM (#36769996)
I should clarify that I primarily touch html via React, so the unit of reusability is not CSS but rather components.

For handwritten html I believe that tailwind has significant downsides (unless you abuse @apply), but that the case I focus on.

I should have mentioned that I believe tailwind to be applicable only if you have some strong templating support

> Use <style scoped='scoped'> in the <body>

This seems to have been removed from everywhere since at least 2017

Re:No CSS Club – because no JavaScript was not hardcore enough by pwdisswordfishc on Wednesday July 19, 2023 @11:49AM (#36788383)
Joke's on you: I avoid inline CSS like the plague whenever I can. Which is to say, I use it as intended.
Re:No CSS Club – because no JavaScript was not hardcore enough by afiori on Thursday July 20, 2023 @02:30AM (#36797444)
This does not suprise me, inline CSS is very unwieldy
Re:No CSS Club – because no JavaScript was not hardcore enough by 542458 on Sunday July 16, 2023 @09:27AM (#36746756)
> don't you dare override the user's preferred font size for body copy

I’d bet you that 98+% of users don’t even know you can change the browser font size. For that overwhelming majority of users the size reported by their preferences and their actual preferences do not necessarily align. This is not a defence of setting smaller-than-16px font size, but it is a defence of setting larger sizes in some cases.

Re:No CSS Club – because no JavaScript was not hardcore enough by LoganDark on Sunday July 16, 2023 @10:53AM (#36747647)
> This is not a defence of setting smaller-than-16px font sizes

See: HN, that sets a "10pt" font size, otherwise known as 13px.

At least they have a reason and it fits for me. :)

Re:No CSS Club – because no JavaScript was not hardcore enough by justcool393 on Sunday July 16, 2023 @12:25PM (#36748710)
On the contrary, I've always found HN's font size to be one of the worst parts about the UI. I actually have a userstyle set to override it

  body {
      font-size: larger;
  }
  
  .comment, .default, .comhead {
      font-size: 14px;
  }
  
  .subtext, .pagetop {
      font-size: 13px;
  }
  
  .title {
      font-size: 16px;
  }
It's not the prettiest CSS or the most well done, but it works and it's better than the defaults imo.
Re:No CSS Club – because no JavaScript was not hardcore enough by FalconSensei on Sunday July 16, 2023 @03:13PM (#36750459)
I do use HackerNews at 150% because otherwise it's unreadable
Re:No CSS Club – because no JavaScript was not hardcore enough by FalconSensei on Sunday July 16, 2023 @03:12PM (#36750451)
> I’d bet you that 98+% of users don’t even know you can change the browser font size.

The users that need that to be able to read (e.g. vision problems) definitely do know that. It's about accessibility

Re:No CSS Club – because no JavaScript was not hardcore enough by Popeyes on Sunday July 16, 2023 @03:23PM (#36750528)
I disagree, I field a lot of reasonable adjustment requests and a staggering number of people don't know about basic functionality. They are also not interested in them.
Re:No CSS Club – because no JavaScript was not hardcore enough by freeone3000 on Sunday July 16, 2023 @04:29PM (#36751109)
I’m not going to re-solve problems for users that already have a solution but refuse to use it.
Re:No CSS Club – because no JavaScript was not hardcore enough by silon42 on Sunday July 16, 2023 @03:13PM (#36750458)
They do on mobile.
Re:No CSS Club – because no JavaScript was not hardcore enough by EGreg on Sunday July 16, 2023 @08:21AM (#36746162)
If you’re interested in sites loading quickly in more… practical scenarios, read this:

https://community.qbix.com/t/qbix-websites-loading-quickly/2...

Re:No CSS Club – because no JavaScript was not hardcore enough by piperswe on Sunday July 16, 2023 @03:40PM (#36750673)
The former is nigh-illegible to me due to the text contrast. I can't focus on the text for more than a couple seconds.
Re:No CSS Club – because no JavaScript was not hardcore enough by eyko on Sunday July 16, 2023 @07:21AM (#36745721)
And all it takes is a few typographic rules in a style tag.
Re:No CSS Club – because no JavaScript was not hardcore enough by isaacremuant on Sunday July 16, 2023 @07:22AM (#36745731)
Personally, the childish "saying motherfucker is shocking/bold" style is a bit of a cop out to make a proper argument.

I don't even say it with the typical puritan TV USA mindset but just the, give me the facts, not the show. Yelling won't make you right, just 14. Specially when it's clearly not a visceral reaction but a thought out post.

It's like comedy that thinks saying fuck or shit is funny when that's basically the lowest bar of humor. Say it, but style matters, the word in itself is not funny (unless you're a kid and afraid of someone telling you off, again: boldness).

Re:No CSS Club – because no JavaScript was not hardcore enough by stavros on Sunday July 16, 2023 @07:27AM (#36745772)
I agree, I like a well-placed swearword, but when used as a crutch for humor, it falls a bit flat.
Re:No CSS Club – because no JavaScript was not hardcore enough by alemanek on Sunday July 16, 2023 @07:35AM (#36745842)
If you read it in Samuel L Jackson’s voice it makes it a lot better.
Re:No CSS Club – because no JavaScript was not hardcore enough by sigg3 on Sunday July 16, 2023 @07:51AM (#36745940)
While I appreciate the sentiment, I feel you're missing the point. This is akin to maddox's writing. It aims to strike a nice balance between satire and self-immolation, but might stumble in its attempts.

You're supposed to feel conflicted between the obnoxious tone and the rational message. The writing makes fun of know-it-alls while also making a well reasoned argument.

Re:No CSS Club – because no JavaScript was not hardcore enough by Typhon on Sunday July 16, 2023 @08:29AM (#36746224)
It reminds me of the extreme advertising meme.
Re:No CSS Club – because no JavaScript was not hardcore enough by arcanemachiner on Sunday July 16, 2023 @08:53AM (#36746455)
I don't think you can just say "Maddox" in 2023 and assume people will know what you're talking about.

maddox.xmission.com

Re:No CSS Club – because no JavaScript was not hardcore enough by logarhythmic on Sunday July 16, 2023 @01:06PM (#36749218)
I find it fairly cringe, personally.
Re:No CSS Club – because no JavaScript was not hardcore enough by isaacremuant on Monday July 17, 2023 @01:41PM (#36761391)
Just read a Maddox (didn't know who they were) post and, boy, is it full of edginess and self confidence to mask that they don't have a good point.

Of course it's easy to rant and monologue. Dozens of TV presenters do it but sometimes it's very easy to find fault in their subjectively humorous generalizations.

http://maddox.xmission.com/c.cgi?u=bob_dylan_is_a_podcaster

https://youtu.be/MMFj8uDubsE

Blowing in the wind, the first song that comes to mind, doesn't fit this at all.

A quick Spotify search through the most popular songs and I can't find any in 10-15 that fits that example soundbite he used, to extrapolate this "emperor's got no clothes" argument on bob Dylan.

I'm not particularly a fan of Dylan except a song here and there I like (looking at the list), but it just shows the style over substance and strength of argument.

To this, someone will call "don't be such a buzzkill, it's just a joke" and that's fine but then you've left the land of making valid points and into the self congratulatory "ironic" content.

I didn't miss the point, it seems, but you did miss mine.

Re:No CSS Club – because no JavaScript was not hardcore enough by mrits on Sunday July 16, 2023 @08:27AM (#36746215)
Yelling or cussing doesn't make you 14. I like cussing and think that there should be more of it in technical literature.
Re:No CSS Club – because no JavaScript was not hardcore enough by pdntspa on Sunday July 16, 2023 @10:32AM (#36747431)
Agreed. The idea that words can bring curses or displease some fictional deity is a dated trope with no place in modern society. Which means the only reason left is that it displeases certain people to hear them... but fuck those folks for trying to impinge on freedom of speech
Re:No CSS Club – because no JavaScript was not hardcore enough by isaacremuant on Monday July 17, 2023 @09:56AM (#36758294)
This is not about freedom of speech. I explicitly stated it was not a puritan thing. Fuck your strawman, if you want. See? That did very little in terms of argumentation.

Now it was about using insults instead of proper arguments and pretending the mere use was funny. Which isn't.

Also, it's funny how you "insult" in generic third person because if you insult me directly you might get banned. Hey, feel free to insult me directly. I won't care. You just won't necessarily have a good argument because of it and you might also get your comment deleted, but let's see if you're as "brave" to argue with the would be censors then.

Re:No CSS Club – because no JavaScript was not hardcore enough by isaacremuant on Monday July 17, 2023 @10:01AM (#36758356)
You may also like writing in 1337speak. That's not an actual argument for it being an effective mechanism to convey an argument, which the website presumably tries to.

Finding an insult funny just because it's an insult is definitely childish, as I've said before and you haven't tried to address, it relates to rebelry against some authority, which just isn't there in this case.

I won't be offended by the insult, but using in the way the website in question does is just superfluous content and can effectively serve as an mechanism to hide less than solid points.

Re:No CSS Club – because no JavaScript was not hardcore enough by mrits on Monday July 17, 2023 @01:20PM (#36761048)
Your response is definitely childish. Not in the immature sense but an underdeveloped sense of historical social transformation.
Re:No CSS Club – because no JavaScript was not hardcore enough by isaacremuant on Tuesday July 18, 2023 @10:57AM (#36773456)
You've said nothing and basically held a mirror that says "no u".

How about you actually try?

Re:No CSS Club – because no JavaScript was not hardcore enough by mrits on Tuesday July 18, 2023 @04:29PM (#36778655)
It is now apparent that you are an actual child. Have a good one
Re:No CSS Club – because no JavaScript was not hardcore enough by isaacremuant on Saturday July 22, 2023 @11:05AM (#36826835)
An actual child that signed up to HN in 2013 when they were 1 or something and has worked on the industry for a while, huh?

Running away with a false accusation and a dishonest "good wish" is just sad.

Re:No CSS Club – because no JavaScript was not hardcore enough by scarface_74 on Sunday July 16, 2023 @08:58AM (#36746509)
Re:No CSS Club – because no JavaScript was not hardcore enough by lelanthran on Sunday July 16, 2023 @09:04AM (#36746558)
> I don't even say it with the typical puritan TV USA mindset but just the, give me the facts, not the show. Yelling won't make you right, just 14. Specially when it's clearly not a visceral reaction but a thought out post.

Yeah, but if they had done it your way neither you nor anyone else would know about it.

Looks to me like they put a lot of thought into the marketing of that thought out post

Re:No CSS Club – because no JavaScript was not hardcore enough by pwdisswordfishc on Sunday July 16, 2023 @08:01AM (#36746020)
Well, given the former of the two is much better…
Re:No CSS Club – because no JavaScript was not hardcore enough by JKCalhoun on Sunday July 16, 2023 @08:08AM (#36746071)
Sadly, no one ever stops at bettermotherfucking and that turns out to be the problem.

I'd be happy with a No Ads And No 3rd Party Trackers, Analytics or Other Shit Club.

Re:No CSS Club – because no JavaScript was not hardcore enough by Aeolun on Sunday July 16, 2023 @08:08AM (#36746074)
How the 'motherfuckingwebsite.com' looks is entirely up to your user agent. If it looks terrible that's not the fault of the website.
Re:No CSS Club – because no JavaScript was not hardcore enough by toastal on Sunday July 16, 2023 @09:22AM (#36746715)
You can customize the user agent. Firefox I can set the colors & fonts …and this includes different settings for dark themes as well. I prefer this experience­­; namely on my OLED displays I like being able to have #000 black backgrounds & on my e-reader, I much, MUCH prefer #000 text on #fff for maximum readability. There so many contexts where the designer doesn’t need to get overly involved versus letting users decide.
Re:No CSS Club – because no JavaScript was not hardcore enough by red_trumpet on Sunday July 16, 2023 @08:20AM (#36746156)
I have mixed feelings about the second one. Yes, line width highly improves readability. But I think the grey font makes it more difficult to read. And I'm no fan of the increased font height, though that might be more personal.
Re:No CSS Club – because no JavaScript was not hardcore enough by Tepix on Sunday July 16, 2023 @10:08AM (#36747168)
I agree about the reduced contrast. Not cool.
Re:No CSS Club – because no JavaScript was not hardcore enough by pdntspa on Sunday July 16, 2023 @10:28AM (#36747396)
There's a design tenet to never use pure black or white, that's probably what is going on here
Re:No CSS Club – because no JavaScript was not hardcore enough by johntiger1 on Sunday July 16, 2023 @10:40AM (#36747525)
Yeah my #1 peeve is a striking pure white background especially when I'm browsing at night. Maybe they should offer day/night contrast options?
Re:No CSS Club – because no JavaScript was not hardcore enough by xigoi on Sunday July 16, 2023 @11:05AM (#36747810)
Decrease your brightness.
Re:No CSS Club – because no JavaScript was not hardcore enough by least on Sunday July 16, 2023 @02:38PM (#36750143)
Decreasing the brightness reduces the contrast which also decreases the readability of it. A dark background with light text has both higher effective contrast and less light hitting your face.
Re:No CSS Club – because no JavaScript was not hardcore enough by rtheunissen on Sunday July 16, 2023 @03:59PM (#36750849)
Experiment with monitor brightness.

My phone is always on low brightness at night, but for some reason my monitor is always at 100% without question, which means light theme during the day (to match paper/pencil in front of me) and dark theme at night because it is otherwise too much light. Then one day, I tried a light theme at night at 50% monitor brightness and my eyes relaxed immediately. I realized that I have been squinting constantly to brace against the maximum brightness.

The usual advice is to instead increase ambient/room light but I have the room light set perfectly for writing and reading on paper.

Re:No CSS Club – because no JavaScript was not hardcore enough by pdntspa on Sunday July 16, 2023 @11:17AM (#36747973)
I have never understood this. Black text on white backgrounds is fine at night, maybe you should stare at screens more or something? Or use something that adjusts brightness to ambient light, like most phones do now. I personally do not like all this low-contrast nonsense, clear and legible is the way to go.
Re:No CSS Club – because no JavaScript was not hardcore enough by yoyohello13 on Sunday July 16, 2023 @11:59AM (#36748444)
I think the comfortability of contrast is subjective. I have several coworkers who use higher contrasts themes and swear by them, but my eyes start to hurt if I look at content that’s too high contrast. White text on black is by far the worst for me, but I know people who find that very readable.
Re:No CSS Club – because no JavaScript was not hardcore enough by pdntspa on Sunday July 16, 2023 @04:03PM (#36750882)
Computers have been high-contrast since the first GUIs dating all the way back to Xerox PARC (https://crm.org/articles/xerox-parc-and-the-origins-of-gui)

Yet I have only ever heard of people complaining about it recently, when GUI designed started debasing itself by making everything web-based, and zoomers started demanding dark mode everywhere. Before that, and in my lifetime of computer nerditry dating back to the mid-90s (on self-luminescent CRTs!), I have never heard of people intentionally turning down the brightness or complaining about contrast of anything, whether its a tube TV or computer screen.

Which makes this whole preference for low-contrast incredibly suspicious. Like it was another one of those learned 'ailments' that spread around society like a shitty meme.

Re:No CSS Club – because no JavaScript was not hardcore enough by yoyohello13 on Sunday July 16, 2023 @06:26PM (#36752047)
Ok, well. Sorry my preferences disturb you so.
Re:No CSS Club – because no JavaScript was not hardcore enough by Tepix on Wednesday July 19, 2023 @03:30AM (#36783131)
There appears to be a different design tenet to use tiny fonts. Also not cool.
Re:No CSS Club – because no JavaScript was not hardcore enough by lapcat on Sunday July 16, 2023 @09:12AM (#36746625)
Ironically, both sites attempt to load Google analytics.
Re:No CSS Club – because no JavaScript was not hardcore enough by TuringTest on Sunday July 16, 2023 @09:40AM (#36746875)
* * *
Re:No CSS Club – because no JavaScript was not hardcore enough by solarkraft on Sunday July 16, 2023 @09:50AM (#36746980)
It's just browser developers. And I think it's largely caused by the brain worm of "you don't need that on mobile".
Re:No CSS Club – because no JavaScript was not hardcore enough by mistercow on Sunday July 16, 2023 @10:12AM (#36747223)
On iOS Safari, there’s a little “ᴀA” button left of the location bar which lets you zoom to make the text larger, reflowing the way you expect.

This makes sense to me. Pinch to zoom is a specific affordance which means “make the line segment between my fingers be this long”. It wouldn’t make sense with reflow.

Re:No CSS Club – because no JavaScript was not hardcore enough by arcbyte on Sunday July 16, 2023 @10:18AM (#36747274)
Interesting.....

But if you change the font size setting on your browser you will get exactly what you want. Odd how zoom and font size are not linked the same as on desktop - at least for me on Firefox mobile.

Re:No CSS Club – because no JavaScript was not hardcore enough by TuringTest on Sunday July 16, 2023 @12:03PM (#36748480)
Yes, but compare changing the size of small text on a per-site basis by changing the browser settings vs simply doing a pinch gesture...

There used to be a Firefox extension to force text reflow on any website, but recent versions with the new extension API don't allow installing it.

Re:No CSS Club – because no JavaScript was not hardcore enough by Narishma on Sunday July 16, 2023 @11:23AM (#36748036)
The first is more readable to me, mainly due to the lack of contrast in the second one.
Re:No CSS Club – because no JavaScript was not hardcore enough by mulmen on Sunday July 16, 2023 @11:34AM (#36748156)
The first one respects my wishes. If I want to adjust the line width I will just adjust the size of my browser window. I have a 38" monitor, the second page is an ocean of grey pixels. I view white space as a direct insult to my intelligence.
Re:No CSS Club – because no JavaScript was not hardcore enough by addisonl on Sunday July 16, 2023 @12:53PM (#36749057)
I definitely do not want to live in your world where I need to manually adjust my window size on each website I visit.
Re:No CSS Club – because no JavaScript was not hardcore enough by mulmen on Sunday July 16, 2023 @01:37PM (#36749575)
Why would you adjust it on every site? You just do it one and you're done. It's less effort than all the scrolling required by modern CSS.
Re:No CSS Club – because no JavaScript was not hardcore enough by bluescrn on Sunday July 16, 2023 @11:59AM (#36748447)
Some sites take the 'reduce line width' way too far though, and on a widescreen desktop display you're looking at a narrow column in an ocean of whitespace.

(It's one of the more glaring flaws of the Reddit redesign...)