News for hackers. Stuff that matters.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by pavlov on Tuesday April 23, 2024 @07:16AM (#40130549)
If the designers of Unix had seen the light of CSS, they wouldn’t have bothered with shells and file descriptors and C and Awk and all that composable flotsam.

They’d just created a single program, call it the “Central Software System”, and defined thousands of properties that let you control its state machine to produce the output you need.

Presto! The perfect computer. If for some reason someone needs a new kind of output, it can be added to the Central Software System via a friendly decade-long committee process.

And if the properties happen to conflict in how they define some output, well, the one company in the world who has actually implemented all of this “open standard” can decide what happens in that case.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by afavour on Tuesday April 23, 2024 @07:28AM (#40130643)
It’s almost - almost! - as if the designers of Unix and of CSS work in completely different scenarios and with completely different constraints! Almost!
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by pavlov on Tuesday April 23, 2024 @07:41AM (#40130740)
And with this convenient domain excuse, CSS has managed to become a system that’s not a fit for any domain.

It’s incomprehensible to visual designers, incomprehensible to programmers, and incomprehensible to document authors.

On the upside, it provides a massive moat of sunk cost and implicit implementation dependency around Chromium, so at least there’s that.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by dada78641 on Tuesday April 23, 2024 @08:23AM (#40131116)
While I agree that CSS is sometimes difficult and obtuse, and getting things working in it is more of an art than a science, it's actually shockingly easy to get basic layouts working in it these days even as a total beginner. CSS is very powerful and you can learn the basics very quickly.

It's also worth keeping in mind that CSS is sometimes more complicated than it seems like it should be due to accessibility concerns and flexibility. That's why you can take some HTML produced by some part of your system and use it in completely different contexts with totally different designs, entirely as is, just by adding a few different rules.

I've been doing HTML dev since the late 90s and things were infinitely more difficult back in the old days. CSS might have been simpler, but doing complex things required tons of bizarre hacks that also made your design more frail and less accessible. These days CSS has improved to the point where you can do just about anything, and even very complicated effects can fairly easily be deconstructed just by looking at the devtools and poking around until you get it.

CSS isn't perfect, but all things considered I'm not complaining.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by miunau on Tuesday April 23, 2024 @08:03AM (#40130948)
Maybe you need better glasses. This proposal is coming from the Webkit team, ie. Apple. CSS is plenty comprehensible and using it gets better with every browser release as they are focused around yearly interoperability efforts.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by pavlov on Tuesday April 23, 2024 @08:26AM (#40131143)
AFAICT, practically nobody picks WebKit over Blink/Chromium for new projects.

The reasons why Apple still maintains their own browser engine have to do with corporate prestige and expensive insurance policy. They can afford it because Apple is literally the world’s richest corporation.

Nobody else does anymore. Even Microsoft gave up on their own browser engine despite having 97% market share two decades ago. And Mozilla is bankrolled by Google as their own kind of insurance policy.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by miunau on Tuesday April 23, 2024 @09:18AM (#40131650)
Safari has 24% of the browser market.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by pavlov on Tuesday April 23, 2024 @09:34AM (#40131800)
Not on merit but simply by being the only allowed option on iOS. Nobody chooses Safari because it runs WebKit instead of Blink.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by jampekka on Tuesday April 23, 2024 @08:19AM (#40131079)
I happen to quite like CSS (in comparison to any other layouting system out there), but I really wouldn't characterize it plenty comprehensible.

I'm quite certain there's no human on earth that could reliably predict the outcome of most non-trivial real-life CSS layouts given just the code. And even though the situation has improved a lot, it's still common to have to use clearfixque hacks that definitely weren't envisioned by the commitees.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by echoangle on Tuesday April 23, 2024 @08:37AM (#40131237)
Isn’t that true for most software? Do you think you can simulate the outcome of a semi complicated Python Codebase just by looking at it? That’s just an intrinsic property of the problem you’re dealing with, adaptive page layout will always be complicated and not easily understandable just by looking at code.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by jampekka on Tuesday April 23, 2024 @09:23AM (#40131695)
I think I'd have a lot better shot with a semi-complicated Python codebase to be correct. Even with GUI stuff if using something like e.g. Qt box layouts.

Yes, CSS is a lot more powerful than those kinds of systems. Perhaps comparable to constraint satisfaction layouts that tend to be quite surprising.

But even so, there are so many settings and their combined behavior in CSS that it's, for me at least, totally infeasible to try to code much CSS "up-front" without constantly checking the result of the changes. And I don't mind it that much, but I'm quite certain that a more "predictable" equally powerful layouting system is entirely possible.

It could be an interesting challenge to show people some layouts and ask them to produce them using CSS without being able to iterate the results.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by greasyphalanges on Tuesday April 23, 2024 @08:18AM (#40131071)
I will concede to an argument that CSS exemplifies "design by committee" pejorative and is blighted by backward compatibility woes, but rest assured, it does its job as best as it can. Web development has patchworked its way out of most problems it has created, making it somewhat burdensome to learn. I'd say that is its Achilles's heel.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by camillomiller on Tuesday April 23, 2024 @08:19AM (#40131082)
It’s always funny to read people that just never understood CSS trying to convince everyone that CSS is impossible to understand!
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bryanrasmussen on Tuesday April 23, 2024 @08:30AM (#40131181)
it's better on HN because you can get it combined with snide insinuations that they could have created a better layout system that would do all the things that CSS does, but also fix the various problems that CSS has.

However the glory days are evidently behind us, because these insinuations never end with "in a weekend" anymore.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by jampekka on Tuesday April 23, 2024 @08:35AM (#40131223)
I'd be surprised to hear anybody with intimate knowledge of CSS claiming to understand CSS.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by crispyambulance on Tuesday April 23, 2024 @08:36AM (#40131224)
Yes, that's fair.

Sure, today we have grid and vanilla CSS is sane and useable by anyone who takes the time to learn the modern way of doing things.

But let's not forget what a long and tortured road CSS has taken to become what it is today. CSS was a total dumpster fire up until around when flexbox came out. It was SO HARD to make it do what you want for SO LONG.

The MOST BASIC NOTION of layout, putting things in a freaking grid, was missing from CSS for almost two decades. Yet, the grid concept has been around in application layout since the 1980's. I can't explain why it took CSS such a long time, and the explanations I've heard don't seem plausible to me.

It's understandable that folks who were around in the bad days of CSS are still kind of bitter. I was, and if I didn't take the time to see the new ways of using it, I would still be incredulous about CSS.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bazoom42 on Tuesday April 23, 2024 @10:30AM (#40132417)
> The MOST BASIC NOTION of layout, putting things in a freaking grid, was missing from CSS for almost two decades

This is not true. CSS have had ‘display:table’ for 25 years, which is a simple grid layout model equivalent to html tables. Content can be aligned in rows and columns.

‘Display:grid’ is much more powerful of course.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by crispyambulance on Tuesday April 23, 2024 @12:16PM (#40133669)
Yeah, I remember those. It was intended as a way to make "tables" using divs.

That way, we could pretend to do page layout with CSS, while still feeling shitty about repurposing something meant for tables.

There's just no justifiable reason for putting whole-page lay-out on the back-burner for so long. So many other far less important things came out before grid, it feels almost like it was deliberately spiteful to delay it so long.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bazoom42 on Tuesday April 23, 2024 @01:33PM (#40134652)
Why would you feel shitty about using ‘display:table’?

It puts things into a freaking grid as you asked for.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by crispyambulance on Tuesday April 23, 2024 @04:15PM (#40136740)
For a long time, css was a huge step backwards from what we were accustomed to with desktop application layout mechanisms.

Web-apps were "a thing" starting in the very early naughts, yet just getting stuff to stick where you wanted it on web page required a bunch of stupid hacks and accommodations. Of course people resorted to using tables for page layout. The display:table thing was just a continuation of that.

Whole-page layout should have been an absolute top priority for the folks that controlled css, yet it seems they just didn't care until grid finally came out in 2017-ish? I just don't understand why that is.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bazoom42 on Wednesday April 24, 2024 @03:10AM (#40141532)
It is still not clear to me why you discount display:table as a valid and useful tool for placing content in a grid.

Sure, it is not as sophisticated as Display:grid eg it doesn’t support changing the number of columns depending on the viewport width and it doesnt support elements overlapping multiple grid cells. But many common “full-page” layouts, like header, sidebar, footer can be expressed using “display:table”.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by crispyambulance on Wednesday April 24, 2024 @10:16AM (#40144651)
My memory is a bit foggy, but I recall there was an issue with older browsers back in those days not supporting display:table.

So if you wanted to "do right" you could not because IE6 was still "a thing" and did not support display:table. You were forced to use actual tables for layout or do endless tedious workarounds to make things work.

Who to blame? The W3C? Microsoft? I don't know but I glad those kinds of problems are mostly over.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bazoom42 on Wednesday April 24, 2024 @12:31PM (#40146446)
Oh yeah, IE 6 did not support display:table. This was the age of hacks. Microsoft basically managed to block any progress on web standards for half a decade.

I’m not sure why you’d blame this on W3C though. IE stasis froze any standard including ECMAScript. It was Microsofts attempt to halt the progress of the web because they considered it a threat to their desktop dominance. Luckily it didn’t work.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by jampekka on Tuesday April 23, 2024 @03:56PM (#40136541)
There was a huge cargo cult adamantly against using tables back in the day, even though the "true way" of hacking divs with float and clearfixes and invisible images was totally broken. Somehow having bunch of wrapper and empty divs was "more semantic" or something.

I was in the cult. It was totally inane, but seems to carry some effects to this day.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bazoom42 on Wednesday April 24, 2024 @06:39AM (#40142727)
The movement was against using html table markup (<table>, <tr> etc.) for layout because of the accessibility issues. It was not against the CSS display:table since that does not affect accessibility.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by jampekka on Wednesday April 24, 2024 @12:10PM (#40146108)
IE didn't support display:table until version 8.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by afavour on Tuesday April 23, 2024 @09:20AM (#40131663)
> I can't explain why it took CSS such a long time

It is weird to look back on but the web platform essentially went through a dark ages for a while. You could say the same about why it took us so long to get to ES6 JS, too. The standards bodies were frozen in ice (and I don’t quite know why either), everyone was debating HTML5 vs XHTML and somehow the rest of the platform floundered for years.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by marksbrown on Tuesday April 23, 2024 @09:48AM (#40131935)
Microsoft failed to capture the internet. IE6 can still cause sane minds to crack.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by FartinMowler on Tuesday April 23, 2024 @08:04AM (#40130956)
What would you propose instead that is comprehensible to visual designers, programmers, and document authors?
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by cqqxo4zV46cp on Tuesday April 23, 2024 @08:16AM (#40131049)
The inane and utterly incomprehensible toolset that they happen to be more familiar with, obviously. Some people take their ball and go home after they can’t work out how to centre a div, after decades of having “HTML and CSS are for the ‘stupid’ developers” drilled into them, and thinking that they can intuit it.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by afavour on Tuesday April 23, 2024 @07:46AM (#40130785)
I’m a web programmer and I find it comprehensible. Sure there are times I need to go to the docs but vast majority of the time I can work with it just fine. I’d agree that it probably is incomprehensible to many visual designers but unfortunately so is code in general.

But sure, if you want, CSS is a conspiracy theory to ensure the dominance of Google.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by Joker_vD on Tuesday April 23, 2024 @07:50AM (#40130827)
Of course it is, there is even the word "masonry" in TFA's name!
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by pavlov on Tuesday April 23, 2024 @08:05AM (#40130960)
It’s not a conspiracy. It’s a well-intentioned but poorly thought-out design for basic 1990s word processing layouts that accidentally blew up to describe entire application GUIs, and now it’s not in the interest of the stakeholders to try to do anything about it.

It’s the same kind of growth pattern as government bureaucracies. Those are largely not conspiracies either, despite the occasional optics.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by afavour on Tuesday April 23, 2024 @08:17AM (#40131054)
What you’re describing is the organic growth of a platform. The web is undeniably more complex than it was twenty years ago but needs are more complex too. Yes, the complexity does benefit major players but that isn’t the reason the complexity exists.

It’s ironic you’re saying that CSS is some form of vendor lock in. I have to imagine that if Google proposed a new layout engine for the web tomorrow they’d be roasted to kingdom come for their attempt at taking over the web.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by yau8edq12i on Tuesday April 23, 2024 @08:06AM (#40130965)
And yet, somehow, I browse websites using CSS successfully every day. Reality disagrees with your narrative, which is nothing more than a pandering "CSS bad" with little substance. "Not fit for any domain", "incomprehensible", these insults are based on what, exactly?
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by snapcaster on Tuesday April 23, 2024 @08:24AM (#40131119)
Not fit for any domain? It's one of the most widely used "programming languages" in the world. It's clearly fit for many domains I don't know why people have to be so dramatic with their tech opinions
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bodantogat on Tuesday April 23, 2024 @08:47AM (#40131353)
I don't get the drama either. The issue I have with CSS is less about the spec itself, and more about browser compatibility. I'd be dead with caniuse.com and MDN. Having said that, when I build a new page, I rarely need to spend more time laying out the html & css than it takes to type it out and test. Creating cross platform, responsive web pages is a solved problem now.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by gherkinnn on Tuesday April 23, 2024 @08:25AM (#40131130)
Nonsense. CSS works. It has its quirks, but what doesn't?

What I do see here, is one of many cases of "I don't understand it therefore it is dumb because it can't be my fault".

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bmacho on Tuesday April 23, 2024 @08:26AM (#40131137)
But your favorite 20% of CSS (just like in the old days + some of the new features) fits nicely for web design.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by whywhywhywhy on Tuesday April 23, 2024 @10:03AM (#40132120)
It's honestly not that difficult at all, saying that as a designer.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by JamesSwift on Tuesday April 23, 2024 @05:00PM (#40137196)
HTML and CSS were created in a time where the entire point was to provide marked-up documents to be read. Now the browser is mainly a generic application runtime.

Its like if the terminal was actually now mostly a video player and people complaining about how awk and sed are tough to use against video frames.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by klabb3 on Tuesday April 23, 2024 @07:38AM (#40130716)
CSS may be complex, but you get a huge bang for the buck in terms of UX, rendering performance, flexibility, accessibility, compared to most drawing and layout systems. You could argue against border-radius and flex as well, but Im glad we’re past clearfix and gifs for corners. Does masonry layout qualify for becoming standard? I don’t know.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by blackbear_ on Tuesday April 23, 2024 @08:04AM (#40130957)
> compared to most drawing and layout systems

This is just an accident of history and not because CSS has anything that makes it intrinsically better than the alternatives.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by jampekka on Tuesday April 23, 2024 @08:41AM (#40131283)
Anything other than existing.

CSS is quite a mess, and I would welcome a backwards-incompatible new layouting system, but all the alternatives out there are a lot worse.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by klabb3 on Tuesday April 23, 2024 @11:33AM (#40133104)
Accumulated garbage for backwards compatibility? Let him who is without sin cast the first stone.

I’m not saying css is intrinsically better (what does intrinsic even mean in this case?). It’s pragmatically better than anything else I’ve seen. It’s dead simple to learn and use, and (almost) fully declarative, and degrades gracefully. Just show me a better alternative and I’ll change my mind.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by smokel on Tuesday April 23, 2024 @07:21AM (#40130579)
They would probably also use regular expressions and incomprehensible $ and \ escape codes to retain some of the fun.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by alpaca128 on Tuesday April 23, 2024 @07:36AM (#40130704)
Did the designers of Unix also have to ensure compatibility with billions of devices connected worldwide running different software stacks?

Also as mentioned in the linked article the masonry layout is already possible with JS, no decades-long committee process needed. It's just about standardizing something frequently used.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by btbuildem on Tuesday April 23, 2024 @08:21AM (#40131099)
The point GP is making is that they didn't have to, because the architecture made it infinitely configurable while remaining coherent.

Billions of connected devices worldwide do indeed run on *nix with a mad variety stacked on top.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by kevincox on Tuesday April 23, 2024 @07:46AM (#40130787)
It's fine, just run ./configure before compiling.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by mejutoco on Tuesday April 23, 2024 @07:53AM (#40130857)
What is the composable unix approach for layout/graphical interfaces?
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by mrighele on Tuesday April 23, 2024 @08:05AM (#40130962)
Tcl/Tk ?

When you had enough of using text as the single data structure in a shell, you can start doing the same with a GUI toolkit.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by wizzwizz4 on Tuesday April 23, 2024 @08:18AM (#40131067)
Tk has basically the same model as CSS, except that it's not strictly hierarchical. (Though CSS has that now, too: https://developer.mozilla.org/en-US/docs/Web/CSS/@scope)
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by datascienced on Tuesday April 23, 2024 @07:26AM (#40130617)
Is this a sysvinit vs systemd rant?
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by HeckFeck on Tuesday April 23, 2024 @07:44AM (#40130764)

   $ /etc/init.d/initwar start
   Starting initwar (via systemd)
Sad sysadmin noises
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by wodenokoto on Tuesday April 23, 2024 @07:59AM (#40130903)
What dynamic layout system is it that ships in posix again?
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by jampekka on Tuesday April 23, 2024 @07:53AM (#40130850)
Trusting us plebs with universal turing machines is unacceptable. There's a config/app/saas/appliance for everything you need to need.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by doctor_eval on Tuesday April 23, 2024 @07:48AM (#40130801)
I want to say something about monolithic kernels but I’m too scared.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by sebstefan on Tuesday April 23, 2024 @07:19AM (#40130568)
You can say that about almost any abstraction layer
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by gwervc on Tuesday April 23, 2024 @07:28AM (#40130641)
The WPF has easy to use grids and layouts, a sane default styling yet is very to completely overhaul. CSS is a failure by design.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by sebstefan on Tuesday April 23, 2024 @09:26AM (#40131718)
Yes, but that's a completely different point
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by dartos on Tuesday April 23, 2024 @07:28AM (#40130638)
Nixos?
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by cjk2 on Tuesday April 23, 2024 @08:09AM (#40130991)
Um, err, POSIX.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by jojobas on Tuesday April 23, 2024 @08:24AM (#40131123)
Was rather hard to tell if you're joking or not, seeing how every trivial program today wants to have Electron with it.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by lumb63 on Tuesday April 23, 2024 @08:29AM (#40131165)
I didn’t realize this was satire until the second paragraph. Well done.

As a firmware engineer who is trying to build a website in his spare time, I find CSS absurd. I’ve found SCSS and Sass make it much more bearable. The ability to represent a hierarchy concisely is awesome.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by meowface on Tuesday April 23, 2024 @08:31AM (#40131187)
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by micromacrofoot on Tuesday April 23, 2024 @10:46AM (#40132582)
the committee process is probably down to about 5ish years now? I feel like people who complain about this weren't around when the process was "20 years from now when we can drop IE support" — velocity has improved significantly