> Because many web sites and apps aren't as simple as "my first homepage" and don't only consist of first-party code.
CSS is there to style HTML tags. Yes, your complex webb app is dealing with a lot of third party code and whatnot... but CSS is just there to style your HTML tags. Why is it so hard to get that?
The point is, comparing CSS selectors to the functions or variables in other programming languages is silly, cause guess what... CSS actually has functions and variables!
So in your head, the analogy is not a big part of the argument? I'd accept your congrats, but I really have not earned it.
The whole idea of comparing CSS to general purpose, Turing complete programming languages is surprisingly stupid. CSS has a very specific, narrow goal: styling HTML elements.
> Selectors are a global namespace. Imagine if every variable and function in your favorite programming languages were global and so had to be unique.
A selector is not not a variable or a function. CSS has functions (e.g translate) and it has variables, which are both distinct concepts in the language from selectors.
> No modules or namespaces.
CSS is not supposed to be a turing complete general purpose programming language. Why would you need namespaces and modules to style up HTML tags?
Sorry but you're mixing up terms. A "web component library" would be something not compete with React, because React is a web component framework. The frameworks is whats used to build the component libraries e.g I think material design has one built on top of React.
> in which case you're limited to what that framework provides (and it won't be as robust as any non-wc framework).
Is there something inherently wrong with wc that stops robust frameworks being built on top of it? Have you tried actual framworks built on wc like Lit for example.
HTML5 refers specifically to the latest, living version of HTML, the markup language. CSS and JavaScript have their own specifications, and version numbers. The term your looking for is the web platform [1].
With the actual layout models, I see it more of an evolution thing. For someone starting on CSS today, you do not have to learn all 8 now if you don't want to, just master the grid. It was designed to be the last one to rule them all.
HTML (Hyper-Text Markup Language) is a specific kind programming language, a markup language. It is nowhere close to a general purpose (Turing complete) programming language. Maybe you meant the web stack (HTML, JavaScript, CSS)?
> It's a source of stress to add a class to the system with a simple, short and readable name and have to worry it is used someplace else.
That is the whole point of CSS classes: re-use. A CSS class is not meant to be used in only one very specific place. For that, you can select an element's ID or an elements HTML path, to style just that one thing.
> Being an insane brand means literally nothing if people can trivially switch to competitors, which they can.
Logically speaking, yes it is easy to switch between OAI and Gemini, or Coke and Pepsi. But brand loyalty is more about emotions (comfort, familiarity,..) rather logical reasoning.
CSS is there to style HTML tags. Yes, your complex webb app is dealing with a lot of third party code and whatnot... but CSS is just there to style your HTML tags. Why is it so hard to get that?