> Just look at the CSS spec (or collection of specs):
> https://www.w3.org/TR/css-2017
> It's enormous! How could anything be intuitive when there are hundreds of keywords?
But I covered this though -- you don't have to take the whole HTML/CSS spec, because if you did you'd just be making a browser.
Even if there are hundreds of keywords, you generally don't have to know (or support, as an implementer) every single one.
> To give a more specific case, I would argue that CSS is eminently un-guessable. Take for example the CSS property clear: [example]
The example you gave is pathological -- a more reasonable one for a "basic design problem", which is what you said CSS was bad for:
#MyDiv {
background-color: black;
}
Your very next sentence betrays how pathological the case is:
> "clear" is a magic word I just have to know when I'm dealing with float layouts so that my elements end up the place I want them to. It's not a concept that flows naturally from the way designers think about layouts, it's essentially a special case , an implementation detail which has been sloppily bubbled up to the CSS API. CSS is full of these special cases.
"clear" isn't magic, it requires knowing what a float layout is, and having used a float layout before. It is a special case reserved for building float layouts, that is necessary because of how they work.
I don't disagree with you that float layouts are terribad and shouldn't be used these days, but that's the beauty all those keywords in the CSS spec -- you don't have to use it. These days we have Flexbox & Grid, decently engineering solutions for layouts.
> By contrast, a constraint-based layout is built on a few extensible contexts. Essentially you have a hand-full of layout anchors on each object, and you have a short list different possible relationship types between anchors. From those core principals you can build up any kind of layout you want.
Could you de-jargon these sentences? Maybe this is where we differ, I think what you just described is more complex than CSS from principles. Also, I want to note that not many in this thread have stuck up for the simplicity/ease of use of AutoLayout.