0

I'm trying to convert scss file to css, but the error( expected "{" ) shows in following line.

@media only screen and (-webkit-min-device-pixel-ratio: 1.25),
2 only screen and (min-device-pixel-ratio: 1.25),
3 only screen and (min-resolution: 200dpi),
4 only screen and (min-resolution: 1.25dppx) {
5     -webkit-font-smoothing: subpixel-antialiased;
6 }
Arjun Pandi
  • 23
  • 1
  • 7

2 Answers2

0

I think you should remove comma's in the first 3 lines. Also, I would keep 'only screen' only in the first line.

daxtersky
  • 410
  • 3
  • 9
0

This seems to work (LibSass compiler)

@media 
    only screen and (-webkit-min-device-pixel-ratio: 1.25),
    only screen and (min-device-pixel-ratio: 1.25),
    only screen and (min-resolution: 200dpi),
    only screen and (min-resolution: 1.25dppx) {
    -webkit-font-smoothing: subpixel-antialiased;
}

... But I would keep it simple (96dpi = 1dppx). Also drop the "only hack" IMO it's not needed

@media screen and (-webkit-min-device-pixel-ratio: 1.25), // Webkit
       screen and (min-resolution: 120dpi) {              // Everyone else
    -webkit-font-smoothing: subpixel-antialiased;
}
Jakob E
  • 4,476
  • 1
  • 18
  • 21