If one wants to do a "Masonry" layout, what's wrong with calculating it via JavaScript?
Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
141–150 of 359 posts
Re: Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
#142Earlier quoted context omitted.
[flagged]
It's often referred to as the masonry layout, so why not?
Re: Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
#143> This layout creates uniformly-sized columns, without any rows I find it amusing that they've decided to refer to this as masonry layout. If you actually built a wall like this (as opposed to uniformly-sized rows , without any columns ) it would be a structural engineering disaster.
Nothing that a transform(90deg) cannot solve :-). More seriously, what you describe is quite doable with flexbox (flex-direction: row, flex-wrap: wrap and flex-grow: 1). Interestingly, even the Masonry layout was already doable using a simple multi-column layout, the "only" issue is that instead of having the items left-to-right, top-to-bottom (ordered by row) you have them top-to-bottom, left-to-right (ordered by co…
It's infuriating.
Re: Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
#144Re: Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
#145Earlier quoted context omitted.
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.
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 Moz…
Re: Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
#146Earlier quoted context omitted.
It’s always funny to read people that just never understood CSS trying to convince everyone that CSS is impossible to understand!
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…
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
#147Earlier quoted context omitted.
Because why introduce a custom abstraction to implement something with an imperative scripting language when you can achieve the same result with a declarative language built specifically to address this use case? You'd rather maintain all the maths and JS dependencies for this than have browsers just render what you want?
The question is, where do you draw the line? It's obviously not viable to implement literally every single design imaginable straight in CSS. If I want to do something silly like placing my content on the faces of a hypercube it wouldn't be realistic for me to expect that to be part of CSS. Having me write some JS is completely acceptable - that's what it is for, after all! It's not a matter of "would this be better…
Honestly, I'd say kudos to the WebKit folks for opening the discussion and being transparent about the process and the tradeoffs. It can certainly help refine (or inspire) future proposals.
Re: Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
#148Earlier quoted context omitted.
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 env…
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.
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
#149Re: Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
#150Would it instead be possible to exclude anyone with that attitude from a discussion about an open standard? I know this sounds toxic, but I would argue that approaching public design this way is ultimately more toxic wrt the outcome and those affected by it.
Or maybe I misunderstood that part since everyone seems to not be bothered by it at all here...