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

Fix for issue #556 - background-size: cover CSS size computation #833

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

scm6079
Copy link

@scm6079 scm6079 commented Aug 10, 2018

Computation of the image size for the background-size: cover mode always assumed a fixed aspect ratio between image and viewport (e.g. never a landscape image in a portrait viewport). This code now looks at both image and viewport aspect ratio to compute image size.

…e aspect ratio of both the image and the viewport to create the appropriate sized image.

Addresses issues:
* 'background-position: center' & 'background-size: cover' stretching image mpdf#556
* `background-size: cover` not working mpdf#141
…ver CSS size computation by reviewing the aspect ratio of both the image and the viewport to create the appropriate sized image.
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.

'background-position: center' & 'background-size: cover' stretching image
2 participants