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

Dynamic profile photos fail to maintain aspect ratio #8

Closed
nelsonni opened this issue Feb 28, 2020 · 0 comments · Fixed by #9
Closed

Dynamic profile photos fail to maintain aspect ratio #8

nelsonni opened this issue Feb 28, 2020 · 0 comments · Fixed by #9
Assignees
Labels
bug Something isn't working

Comments

@nelsonni
Copy link
Member

nelsonni commented Feb 28, 2020

Profile pictures on the People page were introduced in #6. However, flexbox appears to not be correctly configured for preserving the aspect ratio of the images.

For example, the first image is the EPICLab.github.io/people page open full-screen on my MacOS laptop and the profile images are stretching in the y-axis (height):
Incorrect Scaling
The second image is the same page, but with the Developer Console open. Because of the extra pane being open, the available space for flexbox to scale content is less and the images appear to have a proper aspect ratio:
Correct Scaling

There is a good article on StackOverflow, "Maintain image aspect ratio when changing height", which describes how to resolve this type of issue using CSS and flexbox.

@nelsonni nelsonni added the bug Something isn't working label Feb 28, 2020
@nelsonni nelsonni linked a pull request Mar 8, 2020 that will close this issue
dliu04 added a commit that referenced this issue Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants