postcss / postcss-selector-matches

PostCSS plugin to transform :matches() W3C CSS pseudo class to more compatible CSS (simpler selectors)
MIT License
44 stars 9 forks source link

matches() does not work with pseudo-elements #4

Closed topaxi closed 9 years ago

topaxi commented 9 years ago

Input:

.foo:matches(:hover, :focus)::before {
  color: red;
}

Expected:

.foo:hover::before, .foo:focus::before {
  color: red;
}

Actual:

.foo:hover ::before, .foo:focus ::before {
  color: red;
}

This just stopped working, I'm not sure which version update caused this (using cssnext, happens on http://cssnext.io/playground/ too).

TrySound commented 9 years ago

@topaxi Double colon.

topaxi commented 9 years ago

@TrySound double colon what?

TrySound commented 9 years ago

@topaxi In example. Input and output are different.

TrySound commented 9 years ago

@topaxi Sorry. Playground uses postcss-pseudo-elements.

topaxi commented 9 years ago

@TrySound yes, this is the expected output for cssnext, ofc. this transformer should retain the double colon, doesn't really matter in this example though, the problem is the whitespace. Fixed the expected/actual.

topaxi commented 9 years ago

Works, thx :+1:

stevenvachon commented 8 years ago

The spec says that :matches() does not support pseudo-elements.