Skip to content

[css-selectors] repeating selectors #2792

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

Open
Wes0617 opened this issue Jun 16, 2018 · 2 comments
Open

[css-selectors] repeating selectors #2792

Wes0617 opened this issue Jun 16, 2018 · 2 comments

Comments

@Wes0617
Copy link
Contributor

Wes0617 commented Jun 16, 2018

Hello,

section > div repeat(> ul > li) { /* ... */ }

which is equal to writing 

section > div > ul > li,
section > div > ul > li > ul > li,
section > div > ul > li > ul > li > ul > li,
section > div > ul > li > ul > li > ul > li > ul > li,
section > div > ul > li > ul > li > ul > li > ul > li > ul > li,
... {}

The specificity would be the same of the matched "splatted" selector. Having this would solve a lot of problems derived from too generic css selectors' specificity that designers often encounter.

Would this make sense to have in your opinion?

Thank you for reading this. This is my third request in very short time, I promise I will shut up now :-P

@jonjohnjohnson
Copy link

Would the toggle() expression solve most of what you're needing for this example?

https://drafts.csswg.org/css-values-4/#toggle-notation

@gsnedders gsnedders added the selectors-4 Current Work label Jun 21, 2018
@fantasai
Copy link
Collaborator

@Netmosfera Can you respond to @jonjohnjohnson's question, please? It's not entirely clear what you're trying to do...

@fantasai fantasai added selectors-5 and removed selectors-4 Current Work labels Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants