Re: [csswg-drafts] [selectors-4] Attribute match syntax extended to cover tag selectors (#6571)

I like the new pseudo-selector idea, but I wonder if instead of `:tag`, `:custom` might be better?

```css
:custom /* selects all non-native elements */
:custom(= x-foo) /* like `x-foo` but different specificity */
:custom(^= x-)
:custom($= -foo)
:custom(*= -foo-)
:custom(= div s) /* case sensitive: matches <div> but not <DIV> */
```

The reason for `:custom` over `:tag` is to also include [customized elements](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements) using the `is=""` syntax.

For example, `<p is="word-count">` and `<word-count>` are the same element class, but different tag names.

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


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

Received on Thursday, 21 September 2023 17:42:57 UTC