3 ms·
Design tools often have controls on how you can scale a box by locking expansion in different directions and anchoring elements to specific side. Its results in
by dexwiz 3y ago
Design tools often have controls on how you can scale a box by locking expansion in different directions and anchoring elements to specific side. Its results in the same thing as flexbox and alignment but is was more intuitive.
The real issue with CSS is the eternal question of, do I fill my parent or expand to fit children? You have to trace multiple levels and rules, and even then it might be a guessing game. This is because the rules that govern this can change at each level, and that changes how you answer the question.
I have been using CSS for 20 years. It’s too difficult for what it primarily does.
- emllnd 3y ago> The real issue with CSS is the eternal question of, do I fill my parent or expand to fit children? This is one of the real issues of GUI tools in general, not just CSS. You run into the same complexity on e.g. UIKit/SwiftUI (Apple) or any other toolkit that tackles the full complexity of defining UI layouts for any screen simultaneously. Agree that CSS has a bit of extra cruft due to it’s evolution which makes it more difficult to learn and slower to work in than it perhaps could be if the web standards process allowed pruning features more easily
- leptons 3y ago>I have been using CSS for 20 years. It’s too difficult for what it primarily does. I've been using CSS since the day it first appeared in IE3 in 1996. "Too difficult" is not at all how I would describe it. Considering how many kinds of layouts need to be created, CSS has performed really well for the task it was designed to do. New features are added every year. It keeps getting easier. The difficulty is in trying to support every kind of device layout, which wouldn't really be any easier in any other layout language.
- solardev 3y agoI think it's easier for us because we've kept up with small incremental changes over 20 years. To someone just jumping in fresh from school or boot camp or whatever, it's quite overwhelming. We've had the benefit of having mastered the simple basics back when they still were simple, and then gradually increasing complexity on an as-needed basis, every few years at a time. It's different when you're just thrust into it new, with decades of built-up cruft. There is nothing magical about CSS that makes it uniquely suited for responsive layouts, especially compared to print layout software (Illustrator or Word or InDesign have had to deal with many container and page sizes and be able to reflow text between and around them for decades) or other GUIs (like Winforms or the ill-fated WPF, or today's mobile platforms, all of which have responsive layouts) or bespoke UIs like game UIs that have had to support different monitor and window sizes since the Everquest and WoW days and before. Hacking together a bunch of pixel measurements and percentage calculations and virtual pixels to do responsive layout is just so... unnecessary. Even with Bootstrap or Tailwind, when a lot of it is abstracted away with helper classes, it's still often much slower than defining the same layout in GUI tools with a few simple clicks and drags. Having to try to guesstimate a resulting layout from code is a poor way to lay out visual designs, which is why full-time designers usually use Figma or a similar tool, not just tinker with CSS until it looks almost right. I don't hate (or even dislike) CSS; it's a powerful tool uniquely suited for the job it was intended for (wrangling HTML "documents" into complex app UIs), but I do wish we had an entirely different workflow that was custom-built to be UI-first and not a paint layer over a hacky XML document... CSS itself has to compete with HTML layout rules, different levels of specificity and overrides, etc. It's a lot of unnecessary complexity that only exists because of history and backward compatibility, not because it was the best design choice overall.
- leptons 3y ago>To someone just jumping in fresh from school or boot camp or whatever, it's quite overwhelming. That would have been just as true in 1996. Programming is hard, that's why not everyone is doing it. You can't get someone to code just by dumbing down programming, many people will fail and just don't have the focus, perseverance, or aptitude for it, and that's okay. I can't ride a skateboard without coming close to killing myself, but many people can. But people coming into it now actually have it easier because all the wonky stuff and been fixed, there are new ways to do thing that are actually much easier than it was in CSS1 or CSS2, or even CSS as it was 2 years ago. The new people learn "best practices" that didn't exist even 5 years ago. And just because a layout or programming language has lots of features doesn't mean you need to use all of them or feel like it's too difficult to know how to use all of it. >There is nothing magical about CSS that makes it uniquely suited for responsive layouts, especially compared to print layout software I also have to take issue with this. CSS has evolved quite a bit specifically for responsive layouts. Flexbox is easily the best example of why your argument is wrong. It's been around for 15 years. And quite a bit more has been added to CSS since then specifically to make responsive layouts easier. Media queries for example. And citing Illustrator and Word and InDesign are just kind of nonsensical, because the output from those programs are not designed to be resized at will by the person holding a piece of paper (printed page). I'm not even sure how you can use that as an example except if you're trolling? >or bespoke UIs like game UIs that have had to support different monitor and window sizes since the Everquest and WoW days and before. These aren't tools to use for layout, they are hard-coded programs that adapt as far as they can to specific screen sizes. I seriously doubt they would resize correctly for a portrait display. >Hacking together a bunch of pixel measurements and percentage calculations and virtual pixels to do responsive layout is just so... unnecessary I'm sorry if you think that's the only way to do responsive layout. >, different levels of specificity and overrides, etc. It's a lot of unnecessary complexity that only exists because of history and backward compatibility, not because it was the best design choice overall. You don't need to have different levels of specificity or overrides or anything complicated to use CSS and get a simple page working. These advanced things exist because there are absolutely a million valid use cases for specificity and overrides that don't fit into your narrow view of what web browser should do.