What's the semantic of “@media screen and (-webkit-min-device-pixel-ratio:0)”?

前端 未结 3 1162
抹茶落季
抹茶落季 2021-02-02 14:34

I happened to use the below CSS hack for WebKit-based browsers, according to http://www.webmonkey.com/2010/02/browser-specific_css_hacks/.

@media screen and (-we         


        
3条回答
  •  旧巷少年郎
    2021-02-02 15:17

    Here is a quick workaround with YUI compressor's special comment.

    @media screen and/*!*/(-webkit-min-device-pixel-ratio:0) { ... }
    

    The issue is fixed in the current (2.4.5) version

    https://github.com/yui/yuicompressor/blob/master/src/com/yahoo/platform/yui/compressor/CssCompressor.java#L180

提交回复
热议问题