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

Thanks for the feedback. I've changed it to avoid further derailing the topic. (I don't understand the difference between "not smart enough", "has hard time understanding", or "has difficulties acquiring knowledge" - it's all just different ways to express the exact same thing. Would be great if we could focus on any reason _why_ we believe or don't believe that's the case.)

If `*` means "anything", then why would it be difficult to understand that `a-*` means "anything that starts with `a-`? It's using the same symbol to mean the same thing. I can't think of a more natural way to express `a-*` given that `*` on its own already has an established meaning. In fact, I'm willing to bet that most people -- _especially_ beginners -- would expect `a-*` to work as per this proposal once they see what `*` does. If you introduce something like `:has-prefix`, you have to remember that. Was it `:with-prefix`? Was it `:prefixed`? Was it `::has-prefix`? Was it with parenthesis after that? Now you also have `:has-suffix`. And you can't express natural things like `.foo-*-bar` unless you write `:has-prefix(.foo-):has-suffix(.-bar)`. I'm trying to nail the use case in which _not_ using `*` as a wildcard is clearer.

I understand that shorter doesn't necessarily mean easier to understand. I don't understand why this particular case is harder to understand. I understand that too many special characters in one spot _can_ get hard to understand. I don't understand why adding a star is harder to understand. Are you aware of any studies conducted that could translate to this case? Do you have any anecdotal evidence? I've been teaching people CSS for years now and people generally don't have difficulties to grasp the syntax of selectors one bit, until `:this` comes into play. (And the usual "Why doesn't `<` parent-select?"!)

-- 
GitHub Notification of comment by lazarljubenovic
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10001#issuecomment-2008013457 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 20:00:32 UTC