Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cssom] Expose array of selectors on CSSStyleRule #8999

Open
bramus opened this issue Jun 22, 2023 · 3 comments
Open

[cssom] Expose array of selectors on CSSStyleRule #8999

bramus opened this issue Jun 22, 2023 · 3 comments
Labels
cssom-1 Current Work

Comments

@bramus
Copy link
Contributor

bramus commented Jun 22, 2023

CSSStyleRule has a selectorText property but there seems to be no way to access the individual selectors themselves. This seems like a gap, as authors now need to rely on external libraries to extract the individual selectors from the selectorText should it represent a SelectorList.

@Loirooriol
Copy link
Contributor

But is providing the individual complex selectors sufficient? Or will authors also want to get the compound selectors of a complex one, or the simple selectors of a compound one?

@tabatkins
Copy link
Member

Yeah, I'd like to understand the use-cases better here, as I'm not sure why having access to the individual selectors as strings is particularly more helpful than just the current whole list as a string. If the use-cases actually want a parsed representation we should do that instead.

@tabatkins tabatkins added the cssom-1 Current Work label Jun 22, 2023
@bramus
Copy link
Contributor Author

bramus commented Jun 22, 2023

For my use-case specifically – in which I analyze the selectors used on a page – I don’t need a fully parsed representation but only the individual selectors. Of course, other people might want more info so yeah, it’s not clear where to draw the line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cssom-1 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants