Skip to content

Instantly share code, notes, and snippets.

@ivanmem
Last active August 7, 2022 14:34
Show Gist options
  • Save ivanmem/05052d23354acab3623ee9d355c585c9 to your computer and use it in GitHub Desktop.
Save ivanmem/05052d23354acab3623ee9d355c585c9 to your computer and use it in GitHub Desktop.
vk fix zoom images windows 125, 150, 175, 200%
[dir] #pv_photo {
display: flex;
align-items: center;
}
[dir] #pv_photo img {
max-width: 100%;
max-height: 100%;
width: auto !important;
height: auto !important;
}
@media(resolution: 1.25dppx) {
[dir] #pv_photo img, img.can_zoom {
zoom: 0.875;
}
}
@media(resolution: 1.5dppx) {
[dir] #pv_photo img, img.can_zoom {
zoom: 0.75;
}
}
@media(resolution: 1.75dppx) {
[dir] #pv_photo img, img.can_zoom {
zoom: 0.625;
}
}
@media(resolution: 2dppx) {
[dir] #pv_photo img, img.can_zoom {
zoom: 0.5;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment