News for hackers. Stuff that matters.
Re:No CSS Club – because no JavaScript was not hardcore enough by Wowfunhappy on Sunday July 16, 2023 @06:49AM (#36745476)
Due to the long line length, I had to shrink my browser window in order to read this submission comfortably.

I dunno guys, I kind of like CSS.

Re:No CSS Club – because no JavaScript was not hardcore enough by ptx on Sunday July 16, 2023 @06:56AM (#36745531)
On the other hand, if all sites were like this, we would just keep our browser windows at a smaller size and it would work fine.
Re:No CSS Club – because no JavaScript was not hardcore enough by enumjorge on Sunday July 16, 2023 @07:58AM (#36745992)
We could also all go back to 800x600 monitors. That way, no one would have to be subjected to writing the 10 lines of css to make text heavy sites more readable ;)
Re:No CSS Club – because no JavaScript was not hardcore enough by Gordonjcp on Sunday July 16, 2023 @08:12AM (#36746098)
No, because then you'd have a short line of text that takes up a huge amount of space.

Your lines of text on the screen should never be much wider than your hand at arm's length, ever, for any reason. Not even if it's an example of a one-liner in bash - wrap that line to make it easier to read.

Don't believe me? Angrily click <reply> on this post to tell me what an idiot I am, start to type your reply, and then hold your hand up palm out at arm's length to the screen so it covers up the text box you're typing in.

How big is it?

Told you so, didn't I? And it looks *perfect*.

Re:No CSS Club – because no JavaScript was not hardcore enough by Wowfunhappy on Sunday July 16, 2023 @08:16AM (#36746129)
> Not even if it's an example of a one-liner in bash - wrap that line to make it easier to read.

This is the one case (that I can think of right now) where I don't agree.

As part of a larger script, sure, I agree, wrap the line so it's not way longer than all the other lines.

But a single shell command, in isolation, is always easier to read as a single line, if sufficient horizontal space is available.

Re:No CSS Club – because no JavaScript was not hardcore enough by jprete on Sunday July 16, 2023 @08:32AM (#36746244)
When writing outside of a terminal, I wrap single-line shell commands with backslashes and space indentation. The breaks are at logical clauses, as if writing a conventional programming language. I find this much more readable than the alternatives. Often my terminal will also get it this way, from a copy-paste.

This also usually helps in documentation.

Re:No CSS Club – because no JavaScript was not hardcore enough by Gordonjcp on Sunday July 16, 2023 @12:25PM (#36748703)
If I have to do it twice I stick it in a proper script, with some comments, so I remember what it all does next time I go to do it. I do this particularly for stuff like complex ffmpeg filter chains where I need to do a lot of stuff to a video file. By simply running the bash script, at some later date I can get it to remind me what it does, and suitably mangle the video file.

Then, later on, often weeks later, I use command history to scroll back through everything I've typed until I find something that looks vaguely like what I originally typed, or I don't find it and figure it all out from scratch again, having totally forgotten about the bash script I wrote.

I suspect this workflow is surprisingly common.

Re:No CSS Club – because no JavaScript was not hardcore enough by Gordonjcp on Sunday July 16, 2023 @08:22AM (#36746168)
Yeah, but how many times do you see a one-liner that's in a nice little boxout, but there's a scrollbar and you need to slide it backwards and forwards to read the whole thing?
Re:No CSS Club – because no JavaScript was not hardcore enough by wruza on Sunday July 16, 2023 @10:05AM (#36747144)
ever, for any reason

I have a stylebot rule for stackoverflow that makes the default container 150% wider so I can read teh codes without h-scroll.

Also, I don’t always use HN on desktop.

But when I do, that textbox is too narrow for almost every code-related post. And too short in general.

Thankfully there is a sizer handle.

Re:No CSS Club – because no JavaScript was not hardcore enough by rascul on Sunday July 16, 2023 @10:26AM (#36747372)
> Your lines of text on the screen should never be much wider than your hand at arm's length, ever, for any reason.

No thanks. Ridiculously short lines are harder to read.

Edit: I also resize the reply text box because it's almost too small to be usable.

Re:No CSS Club – because no JavaScript was not hardcore enough by Wowfunhappy on Sunday July 16, 2023 @11:31AM (#36748131)
Decades of research show that long line lengths cause people to read more slowly, although it is of course possible that you process text differently than most for whatever reason.

"Ridiculously" short is another matter, but by my count, "significantly wider than your hand at arm's length" means well above 20 words per line.

Re:No CSS Club – because no JavaScript was not hardcore enough by GoblinSlayer on Monday July 17, 2023 @05:40AM (#36755939)
Research also shows that light color theme works better.
Re:No CSS Club – because no JavaScript was not hardcore enough by amno on Monday July 17, 2023 @08:02AM (#36757135)
> we would just keep our browser windows at a smaller size

I wouldn't keep a browser at all, I would just read them in Emacs all the time or from the command line. I would also be able to use my preferred visual theme with the entire web, and not have to look at some really nasty web designs from time to time, albeit I do agree that as a game dev (long time ago) I do like when I see pretty graphic design.

However, I am not sure how my bank will do and all the other web services in just plain text. Perhaps it is possible, perhaps not?

Re:No CSS Club – because no JavaScript was not hardcore enough by Fred34 on Sunday July 16, 2023 @06:57AM (#36745536)
I think the trick is to avoid the hr tag and to center the pages. I run a no css website https://www.pilledtexts.com/ and just have the readable content in .txt files where I can add a max width.
Re:No CSS Club – because no JavaScript was not hardcore enough by bbrks on Sunday July 16, 2023 @08:42AM (#36746338)
What's with the encoding on that website? It's virtually unreadable in my browser.

e.g. From https://www.pilledtexts.com/files/nick-land/february.txt

> “This can’t go on,” he said. “It’s too blatantly wrong. It’s insolence.”

Re:No CSS Club – because no JavaScript was not hardcore enough by jorams on Sunday July 16, 2023 @09:58AM (#36747060)
It's UTF-8, but the server doesn't specify that so the browser treats it as windows-1252.
Re:No CSS Club – because no JavaScript was not hardcore enough by Fred34 on Sunday July 16, 2023 @01:45PM (#36749677)
Edited my nginx file to display UTF-8, should look better now
Re:No CSS Club – because no JavaScript was not hardcore enough by thejohnconway on Sunday July 16, 2023 @10:00AM (#36747082)
Which is pretty bad on mobile, because the lines wrap before the hard line endings, making a long-line/short-line repeating cadence which I find really difficult to read.
Re:No CSS Club – because no JavaScript was not hardcore enough by lgas on Sunday July 16, 2023 @10:34AM (#36747465)
Honestly it's not great on desktop either.
Re:No CSS Club – because no JavaScript was not hardcore enough by Fred34 on Sunday July 16, 2023 @01:51PM (#36749729)
Added a viewport tag for the html page, I may try to display the text in a page and then just link to the .txt file.
Re:No CSS Club – because no JavaScript was not hardcore enough by Fred34 on Sunday July 16, 2023 @02:04PM (#36749847)
Cool, the guy who ran the no CSS club added my site.
Re:No CSS Club – because no JavaScript was not hardcore enough by Pannoniae on Sunday July 16, 2023 @06:57AM (#36745538)
What do you mean? It perfectly adapts to any browser width; if you want to resize it, just resize the browser window. It's perfectly readable on both a 4k screen and a small phone.

What more do you want? :D

Re:No CSS Club – because no JavaScript was not hardcore enough by addisonl on Sunday July 16, 2023 @12:57PM (#36749110)
To not have to resize my window for each website I visit?
Re:No CSS Club – because no JavaScript was not hardcore enough by Pannoniae on Sunday July 16, 2023 @01:31PM (#36749513)
The alternative is the "accessible" mush which is common nowadays - no matter how big your screen is, the content is compressed together into a small strip in the middle of the screen, almost like a phone.

No thanks, I'll take fullwidth content anytime over that....

Re:No CSS Club – because no JavaScript was not hardcore enough by hot_gril on Sunday July 16, 2023 @02:33PM (#36750111)
There's an ok in-between where wide windows get margins and narrow ones use the full width. But yes a lot of sites have the stupidly huge margins.
Re:No CSS Club – because no JavaScript was not hardcore enough by addisonl on Sunday July 16, 2023 @04:18PM (#36751025)
The best alternative is a site that is responsive that takes advantage of wider screens but not lazy fullwidth.
Re:No CSS Club – because no JavaScript was not hardcore enough by Pannoniae on Sunday July 16, 2023 @05:10PM (#36751433)
Why is full width lazy? It uses all your screenspace;)
Re:No CSS Club – because no JavaScript was not hardcore enough by addisonl on Sunday July 16, 2023 @06:31PM (#36752085)
Because it forces your users to make your site readable which is lazily passing off the responsibility.
Re:No CSS Club – because no JavaScript was not hardcore enough by GoblinSlayer on Monday July 17, 2023 @05:38AM (#36755927)
And what if users want light or dark theme too. How do you guess it?
Re:No CSS Club – because no JavaScript was not hardcore enough by aeno on Monday July 17, 2023 @06:02AM (#36756088)
You don't have to guess. You can just use https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...
Re:No CSS Club – because no JavaScript was not hardcore enough by GoblinSlayer on Monday July 17, 2023 @06:35AM (#36756295)
How it plays with the idea of not passing responsibility to the user? User can request window width too.
Re:No CSS Club – because no JavaScript was not hardcore enough by ThunderSizzle on Sunday July 16, 2023 @07:44PM (#36752541)
Making text wider is lazy. At some point, you'll need to break it into columns so that the text is readable. Perhaps on super wide screens, three or four columns (akin to a two column book that's wide open or a newspaper) may even be more preferable.

Otherwise, the other option is to scale up thr text size, but that takes up precious vertical space on wide screens, and doesn't increase information density.

Obviously, text columns may only make sense it certain scenarios - a minimum amount of text might be required to justify a second column as opposed to just limiting the width of the first column.

Re:No CSS Club – because no JavaScript was not hardcore enough by bjornasm on Sunday July 16, 2023 @07:12PM (#36752358)
No its not, there are lots of more alternatives.
Re:No CSS Club – because no JavaScript was not hardcore enough by hot_gril on Sunday July 16, 2023 @02:35PM (#36750126)
Why do you have to resize it?
Re:No CSS Club – because no JavaScript was not hardcore enough by yakubin on Sunday July 16, 2023 @04:24PM (#36751075)
So that it's shaped more like a page of text than a telegram.
Re:No CSS Club – because no JavaScript was not hardcore enough by hot_gril on Monday July 17, 2023 @02:06AM (#36754672)
But why does that matter for reading it? It's just reading left to right either way. The submission was fine for me to read, and so is HN which has pretty thin margins by modern standards.
Re:No CSS Club – because no JavaScript was not hardcore enough by GoblinSlayer on Monday July 17, 2023 @05:33AM (#36755899)
I browse all sites in a window of my preferred width, works fine.
Re:No CSS Club – because no JavaScript was not hardcore enough by master-lincoln on Sunday July 16, 2023 @06:56AM (#36745533)
What browser are you using? Mine (Firefox on Android)wrapped the long lines nicely.
Re:No CSS Club – because no JavaScript was not hardcore enough by master-lincoln on Sunday July 16, 2023 @07:00AM (#36745566)
Ah, never mind. I understood it the wrong way around. So you have a big resolution and want shorter lines. Maybe use reader mode which applies some css. I still like this for content centric websites. My favorite blog also works like this for years
Re:No CSS Club – because no JavaScript was not hardcore enough by lucideer on Sunday July 16, 2023 @06:59AM (#36745554)
Presumably they're on desktop: long lines don't tend to be an issue on portrait screens.
Re:No CSS Club – because no JavaScript was not hardcore enough by codetrotter on Sunday July 16, 2023 @06:58AM (#36745541)
Desktop browser. Big monitor with high resolution and big window = long lines
Re:No CSS Club – because no JavaScript was not hardcore enough by codetrotter on Sunday July 16, 2023 @06:58AM (#36745552)
No one will ever need more than 800x600 pixels resolution
Re:No CSS Club – because no JavaScript was not hardcore enough by hot_gril on Sunday July 16, 2023 @02:38PM (#36750138)
Unironically, 1920x1080 or 2K scaling is probably all anyone will ever need. The higher-res monitors all scale the UI to that.
Re:No CSS Club – because no JavaScript was not hardcore enough by wouldbecouldbe on Sunday July 16, 2023 @07:01AM (#36745578)
:) I think it's sarcasm.
Re:No CSS Club – because no JavaScript was not hardcore enough by sdiq on Sunday July 16, 2023 @10:16AM (#36747246)
Similarly, I can no longer browse HN on a Firefox browser on Android. I am not really sure what exact settings changed. This started a few weeks ago.
Re:No CSS Club – because no JavaScript was not hardcore enough by web3-is-a-scam on Sunday July 16, 2023 @10:48PM (#36753522)
reader mode ftw