ben-eb / perfectionist

Beautify CSS files.
MIT License
229 stars 14 forks source link

Add more @media test case #1

Closed yisibl closed 8 years ago

yisibl commented 8 years ago

Like this:

@media
  only screen and (-o-min-device-pixel-ratio: 2/1),
  only screen and (min--moz-device-pixel-ratio: 2),
  only screen and (-moz-min-device-pixel-ratio: 2),
  only screen and (-webkit-min-device-pixel-ratio: 2),
  only screen and (min-resolution: 192dpi),
  only screen and (min-resolution: 2dppx) {
  .selector {
    background-size: 30px 50px;
  }
}

@media only screen and (max-width: 600px) {
  @media only screen (min-width: 200px) {
    .foo {
      display: block;
    }
  }
}
ben-eb commented 8 years ago

Splitting media queries over multiple lines sounds good to me. :+1:

yisibl commented 8 years ago

Is considering adding an option?

ben-eb commented 8 years ago

It could be considered part of the maxSelectorLength option.

yisibl commented 8 years ago

Great!