[csswg-drafts] [cssom-1] Expose nested selectorText on CSSStyleRule (#10246)

bramus has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom-1] Expose nested selectorText on CSSStyleRule ==
On a `CSSStyleRule` you can get the `selectorText` that returns the textual representation of the selector.

With CSS nesting, this value has become somewhat less useful as it doesn’t represent the full selector.

While an author can use script to compute the flattened selector by manually walking the `.parentRule` to the top and then doing the checks + replacements for `&`, it would be nice if this was built into the platform. That way, an author can directly use it in something like `document.querySelectorAll`.

I’m thinking of a property named `flattenedSelectorText` or `fullSelectorText`.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10246 using your GitHub account


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

Received on Wednesday, 24 April 2024 09:09:40 UTC