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

Image with CSS max-width and max-height incorrectly scaled up #242

Closed
koan00 opened this issue Jul 6, 2018 · 0 comments
Closed

Image with CSS max-width and max-height incorrectly scaled up #242

koan00 opened this issue Jul 6, 2018 · 0 comments

Comments

@koan00
Copy link

koan00 commented Jul 6, 2018

When the image supplied is smaller than both the max-width and max-height, the image is scaled up. Css max attributes should only result in down scale. When only one of the two max attributes is supplied, the up-scaling does not occur.

<html><head></head><body>
<img style="max-height: 950px; max-width: 710px" src="https://pbs.twimg.com/profile_images/638747380494503936/C89d1hl3_400x400.jpg" />
</body></html>

koan00 pushed a commit to koan00/openhtmltopdf that referenced this issue Jul 6, 2018
danfickle added a commit that referenced this issue Jul 7, 2018
Fix #242 - Image with CSS max-width and max-height incorrectly scaled up
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

No branches or pull requests

1 participant