Skip to content
This repository has been archived by the owner on Jun 6, 2022. It is now read-only.

Iterate over each item in a selector? #36

Closed
smth opened this issue May 17, 2018 · 1 comment
Closed

Iterate over each item in a selector? #36

smth opened this issue May 17, 2018 · 1 comment

Comments

@smth
Copy link

smth commented May 17, 2018

Is it possible to iterate over each item in a selector? Here's an example of the use case I'm thinking of (maybe there's another way to achieve it?). Say you have:

@custom-selector :--button
  button,
  .button;

@custom-selector :--disabled
  :disabled,
  .disabled;

and you wanted to end up with:

button:not(:disabled):not(.disabled),
.button:not(:disabled):not(.disabled) {
    /* some styles */
}

As opposed to

button:not(:disabled),
button:not(.disabled),
.button:not(:disabled),
.button:not(.disabled) {
    /* some styles */
}
@jonathantneal
Copy link
Contributor

Without knowing how you are using the pseudo-selector, I could not tell you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants