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

Strange output with custom selector and :matches() #3

Closed
ntharim opened this issue Jun 13, 2015 · 1 comment
Closed

Strange output with custom selector and :matches() #3

ntharim opened this issue Jun 13, 2015 · 1 comment

Comments

@ntharim
Copy link

ntharim commented Jun 13, 2015

An example:

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

 :--buttons:matches(:hover, :active) {
  display: none;
 }

postcss-custom-selectors would generate:

button:matches(:hover, :active),
.button:matches(:hover, :active) {
  display: none;
 }

From this, postcss-selector-matches would generate:

button:hover, .button:hover, button:active, .button:hover, button:hover, .button:active, button:active, .button:active {
  display: none;
}

Shouldn't the output be close to something like this instead?

button:hover, button:active, .button:hover, .button:active {
  display: none;
}

This gets worse if you're trying to match at lot of things like :matches(:hover, :active, :focus, .active).

@MoOx MoOx closed this as completed in fcd0a36 Jun 17, 2015
@MoOx
Copy link
Contributor

MoOx commented Jun 17, 2015

Fix released as 1.1.1

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

No branches or pull requests

2 participants