Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use device pixel ratios when defined instead of calculating, fix #521 #522

Closed
wants to merge 2 commits into from

Conversation

maikelvl
Copy link

No description provided.

@ai
Copy link
Member

ai commented Sep 19, 2015

Men, I told you, that min-device-pixel-ratio in wrong way ;). There is not min-device-pixel-ratio in spec. There is only min-resolution.

So this code has no sence:

@media (min-device-pixel-ratio: 2), (min-resolution: 192dpi) { }

Only this code is right:

@media (min-resolution: 2dppx) { }

Look at dppx unit. It is exactly same thing as device-pixel-ratio. dp (device pixel) per px (pixel).

@ai ai closed this Sep 19, 2015
@ai
Copy link
Member

ai commented Sep 19, 2015

I asked you about round dpi to min-device-pixel-ratio calculations.

@maikelvl
Copy link
Author

Aha, I see. Now I know why this issue occurred: 350dpi != 3dppx
That code was used in a tutorial (http://www.sitepoint.com/watch-creating-high-resolution-background-images-with-css/)

Nevermind merging, I get it ;)
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants