As I've been thinking about this, I do wonder if starting with grids as the foundation would have been a better approach. As I understand it, early CSS focused on stuff like color and font style, with primitive layout tools. Over time better tools have been bolted on, but it's messy.
Say we merged flexbox and grid into a unified system, and threw away the other layout algorithms. At the same time, made some tweaks to clarify margin, border, padding, and overflow. Maybe that's a good foundation.
I think the big change will be better support for hierarchical definitions, including but not limited to nesting. TFA discussion would be pretty moot if there were namespaced properties that could somehow fit under display: masonry; rather than polluting the global namespace.
I don't want to be overly negative, but I just can't view CSS as "pretty great."
I appreciate the inherent difficulty of using 1-dimensional static text to specify a 2-dimensional dynamic layout. Still, basically every programming problem involves defining abstractions over some domain concept and expressing that in the syntax of your programming language. Somehow that's harder in CSS than any other language I've used.
Within web dev I find both HTML and JS much easier to work with, despite their imperfections.
I think flutter and XAML might be other interesting ones to look at
Things which are 3 lines in CSS are hundreds of lines of a combination XAML/.NET only to get janky window resizing behaviour.
Are there any books or papers on how to create a coherent layout system?
What about alternatives like Qt, Tk, SwiftUI, etc.? I've never used anything besides CSS. Are any of the actually-implemented systems in the wild better? If so, what makes them better?
I want a system that provides a better interface for developers, but how? If we could start over, what are the design principles?