Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

People pretending CSS is a good fit for complex layouts have never yried to build complex layouts in CSS.

Open any actual complex software from Photoshop and Cubase and weep https://x.com/dmitriid/status/1424052288205856773

There's a reason all the CSS frameworks endlessly recreate the same dozen-or-so trivial components and never dare touch layouts.



I used to teach a CSS to college freshman class a decade and a half ago.

An assignment that I had that they always seemed to enjoy was picking a stadium scoreboard (I initially forced Fenway park but loosened it up in later years) and recreating it responsively exclusively in html markup and hand coded CSS (JS only allowed to pass arrays). Had to go through all 3 major media queries.

That assignment was in week 4 out of 15. 95% of the kids came in with no CSS knowledge at that time.

If you learned CSS through the aforementioned frameworks that abstract it into a mishmash of barely recognizable selector abbreviations I totally understand why you would think that it was complex and unapproachable. But once you understand positioning and the box model selector by selector sky's the limit.

Blame bootstrap for the nature of today's HEADER ROW BLOCK BLOCK BLOCK ROW BLOCK BLOCK ROW state of web design. CSS has very little to do with that.

Edit: sorry for the run on sentences.


> picking a stadium scoreboard

The one that has two big numbers and two team names? That big complex layout?


They mentioned Fenway Park, which is a baseball stadium. Baseball scoreboards are quite complex with a lot of detailed stats, similar to cricket scoreboards.


that's TAL-U-NO-LX in the screenshot, right? Bit self-defeating as an example. That UI is a skin. Fixed bitmap, every knob position and hitbox hardcoded, window can't be resized at all. I don't know offhand whether TAL is on vstgui or juce, but it doesn't much matter, with juce you write resized() by hand and chop up a rectangle with removeFromTop/removeFromLeft until you run out of controls. Either way there's no layout algorithm in there. It's what you end up with when you don't have one...

Photoshop is a strange pick too. The extension layer was CEP, which is literally Chromium, and UXP that replaced it ships flexbox. There's a browser version now as well.

No negativity, but I feel biased towards CSS ;)


> that's TAL-U-NO-LX in the screenshot, right?

There's also Cubase behind it ;)

> Photoshop is a strange pick too. The extension layer was CEP

As we all know, Photoshop is just the extension layer.

Edit. And when they started moving to more and more web tech, they couldn't even get the most trivial of the app's layouts correctly: https://unsung.aresluna.org/photoshops-challenges-with-focus...


> And when they started moving to more and more web tech, they couldn't even get the most trivial of the app's layouts correctly

Nothing in that post complains about layout. It's all regressions in usability.

What you are referring to as "layouts" is not what everyone else is talking about. In the context of this entire thread "layout" is the algorithms which decide the size and position of UI elements.


> Nothing in that post complains about layout.

You can literally see the screenshots in the post

> In the context of this entire thread "layout" is the algorithms which decide the size and position of UI elements.

And yet the apparently amazing layout algorithms in CsS haven't lead to people easily creating actual complex layouts, and all CSS frameworks re-implement the same dozen or so trivial components.

The few companies that manage to do something complex do that at gereat expense and over untold man-hours of engineering.


There's absolutely nothing complex about the layout in that Cubase screenshot. It's likely mostly (if not fully) manually positioned which you can do with CSS. The rendering is more complex because a lot of it would need to be represented as images/SVGs to render all those lines at least somewhat efficiently.

The thread you linked kind of touches on that, too, by pointing out that sometimes you need to drop down to handling layout+rendering yourself. Doesn't matter if it's a desktop or web app. It is actually the best option to do sometimes because it can be less hacky and more performant.


Somehow "there's nothing complex" and "rendering" or something, and there are no layouts in CSS even close to the complexity of this layout. Except perhaps a few examples or useless stuff like "let's render Mona Lisa using CSS only".

And if you try to layout this many elements, the browser will just sit down and cry.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: