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

> That’s actually a pretty good idea. It would still work for `lang`, but could become _much_ more broadly useful. Obviously, it needs some webcompat research. I could ask the HTTPArchive folks.

So, it looks like the top attributes `|=` is used on are _mostly_ single-valued, with one big fat exception: `class`!
Here are the results (thanks @rviscomi!): https://docs.google.com/spreadsheets/d/1aL4XJoEK-1siYmx-f1Sf6WyH0HWVLY-QlW9j4kOHH18/edit?gid=1039128869#gid=1039128869

Now, I would argue those using it for `class` are probably either under the misconception that it _already_ works that way, _or_ are matching on cases where they know they only have one class, but I know that's a hard sell. But if we could convince someone to do the actual trial, I think we have an opportunity to make `|=` a lot more useful than it currently is.

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


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

Received on Tuesday, 14 January 2025 05:58:19 UTC