3 ms·
Well, hang on, there are several different layout algorithms in CSS, right? They keep the old ones for backwards compatibility, and they have to interoperate wh
by iainmerrick 2mo ago
Well, hang on, there are several different layout algorithms in CSS, right? They keep the old ones for backwards compatibility, and they have to interoperate which makes things more complicated; but flexbox and grid are relatively new and quite nice.
- Rohansi 2mo agoThe people saying CSS is unfit for UI have probably never actually built a good UI in anything, and also realistically don't even know how to use CSS. Flexbox on its own is a simple and very capable algorithm that you can use anywhere. You can do a lot with flexbox alone (see Yoga: www.yogalayout.dev) so it's a great place to start. Taffy supports a few more layouts (block, grid) which have their own separate use cases but flexbox is enough for most things.
- phoghed 2mo agoWhat are all the systems you’ve built good UIs in that are worse than HTML/CSS?
- troupo 2mo agoPeople 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 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.
- F7F7F7 2mo agoI 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.
- troupo 2mo ago> picking a stadium scoreboard The one that has two big numbers and two team names? That big complex layout?
- iainmerrick 1mo agoThey mentioned Fenway Park, which is a baseball stadium. Baseball scoreboards are quite complex with a lot of detailed stats, similar to cricket scoreboards.
- exsol 2mo agothat'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 ;)
- troupo 2mo ago> 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-pt-2/ https://unsung.aresluna.org/photoshops-challenges-with-focus...
- Rohansi 1mo ago> 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.
- troupo 1mo ago> 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.
- Rohansi 2mo agoThere'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.
- troupo 2mo agoSomehow "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.