我试图将scss文件转换为css,但错误(预期的"{“)显示在以下行。
@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 }
发布于 2019-04-10 17:59:38
我认为你应该删除前3行中的逗号。另外,我会在第一行只保留“only screen”。
发布于 2019-04-10 23:16:01
这似乎起作用了(LibSass编译器)
@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;
}..。但我会保持简单(96dpi = 1dppx)。也删除"only hack“,我不需要它
@media screen and (-webkit-min-device-pixel-ratio: 1.25), // Webkit
screen and (min-resolution: 120dpi) { // Everyone else
-webkit-font-smoothing: subpixel-antialiased;
}https://stackoverflow.com/questions/55609485
复制相似问题