Re: [csswg-drafts] [selectors] New selector to facilitate utility classes (`[name~^=value]`? `.prefix-*`?) (#10001)

> * searching for `*` is not easy, you have to already know the name in context (universal, wildcard) to be able to find more information.

Searching through code as plain text will always yield all sorts of things unless you get creative with regexes. It's up to IDEs to provide contextual lookup relevant to the language and help developers navigate their code.

> * reading and understanding code becomes harder when the density of ascii symbols is greater

What's the source of this? Maths seems to be doing fine for hundreds of years now with `x ∈ N, x ≥ 2` and I don't see any movement that's advocating that "all natural numbers which are greater than or equal to two" is clearer.

> * people new to CSS will have a hard time learning the difference between this and the universal selector

I'm really tired of seeing this "people new to CSS are not smart enough" argument. It's really not that difficult to teach someone that there's a difference between `div *` and `.foo-*`. People already understand that `{` starts either an object or a code block, and no modern language is trying to go back to Pascal's `begin`. People also understand that "bat" is either an animal or baseball equipment, or that "knight" and "night" sound the same but mean different things. All natural languages have homonyms, so this is not exclusive to English.

> * there are a lot of tools that assume that the order in a compound doesn't matter
> * there are a lot of tools that assume that the universal selector must always be the first part in a compound

There were a lot of tools that assumed that `...` is invalid JavaScript and yet here we are. It's the tools' responsibility to adapt themselves as the language progresses; the growth of the language shouldn't be bound by existing tools.


-- 
GitHub Notification of comment by lazarljubenovic
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10001#issuecomment-2007758818 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 19 March 2024 17:31:16 UTC