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

I am strongly in favor of more powerful tools for attribute selectors but I do wonder if the use case is valid.

Encoding a lot of key/value pairs in class names seems like the wrong approach.
Is there a reason that frameworks like Tailwind, Bootstrap do not use attributes?

Maybe because attributes are supposed to have a `data-` prefix and are then much more verbose?

`pt-6` -> `[data-pt~=6]`
`<div class="pt-6">` => `<div data-pt="6">`


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


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

Received on Monday, 26 February 2024 17:37:05 UTC