Layout does not have to be so complex. There are dozens of GUI frameworks with simpler layout system. Those are enough for applications everyone uses.
Layout does not have to be so complex. There are dozens of GUI frameworks with simpler layout system. Those are enough for applications everyone uses.
The ones that use absolute pixel positioning fail when using different resolution displays.
The ones that use box packing fail when you need to deal with different sized displays.
The ones that use constraint programming fail when you need to layout hundreds or thousands of widgets.
CSS-style layout has its own pros and cons, but there is no alternative to it that is clearly better under all circumstances. If you doing layout and want to be resolution-independent, function on everything from phones to giant displays and have thousands of things to layout, CSS is actually likely better than any alternative.
Document readers lay out every possible document.
you mean like vector graphic software, DTPs, word processors etc etc?
Flash did resolution independent graphics and layouts on the web back in the late '90s, we killed it - not without reasons - but we still haven't created a decent alternative to it
Video editors.
Image editors.
Web browsers.
Circuit, interior and architectural design.
None of these are anything like your "most desktop applications".
BTW all of those applications you mentioned use many of the same techniques video games use (for the same reason: custom layouts), existed long before the web and are doing just fine without CSS
Although it works poorly with translations, so it's probably not the best approach, but certainly one of the simplest. If you don't need translations, it works surprisingly well. Basically all Delphi applications used it and there were used a lot in private companies.
Even basic tools like those which were found in old Delphi, with anchoring components to the parent side, were sufficient for many UI-s, although some tasks like internalisation could case some pain.
In the end my opinion is that there should be a balance between usability and ease of implementation. Especially for technologies which are supposed to have many implementations.