stoyan / cssshrink

CSS minifier
1.05k stars 81 forks source link

Prefixed pseudo-classes are not working #14

Open vincentorback opened 10 years ago

vincentorback commented 10 years ago

Hey @stoyan and thanks for this awesome project!

I found a small issue with prefixed pseudo-classes such as ::-webkit-input-placeholder.

They wont work if they are stacked after each other like this:

::-webkit-input-placeholder, :-moz-placeholder, ::-moz-placeholder, :-ms-input-placeholder {
  color: red;
}

So instead they need to be broken down like this:

::-webkit-input-placeholder {
  color: red;
}
:-moz-placeholder {
  color: red;
}
::-moz-placeholder {
  color: red;
}
:-ms-input-placeholder {
  color: red;
}

Unfortunately I’m not so node-savy yet so i couldn't make a pull-request. But here’s a jsfiddle with the issue. This is also the issue with ::selection but that’s not a CSS standard yet.

pepelsbey commented 10 years ago

+1 for fixing this, it’s really annoying

tbredin commented 10 years ago

+1, I had to remove it from our company workflow after a short trial that revealed broken placeholder styles everywhere

febLey commented 10 years ago

+1, i've encountered the same issue

marcobiedermann commented 10 years ago

+1

stefanmaric commented 9 years ago

+1

frontend-3 commented 9 years ago

+1

diego06884 commented 8 years ago

+1 and has anyone found a solution-workaround for this?

frontend-3 commented 8 years ago

You can use this https://github.com/Lukavyi/stylus-input-placeholder-mixin