Question on webkit-min-device-pixel-ratio

Which all browsers will understand or rather apply CSS rules for the following statement;

@media screen and (-webkit-min-device-pixel-ratio:0) {
//CSS Styles
}

Also what will be the difference if "only screen" is used above insted of screen i.e.

@media only screen and (-webkit-min-device-pixel-ratio:0) {
    //CSS Styles
    }

Answers:

Answer

The rule will be applied for all webkit-based browsers. You can see a list here http://en.wikipedia.org/wiki/List_of_web_browsers#WebKit-based_browsers (most important chrome and safari).

About the word only W3 says:

The keyword ‘only’ can also be used to hide style sheets from older user agents. User agents must process media queries starting with ‘only’ as if the ‘only’ keyword was not present.

Source: http://www.w3.org/TR/css3-mediaqueries/

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.