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

Product thumbnails are stretched on mobile (Product page) #1565

Open
sofiamatulis opened this issue Mar 31, 2022 · 4 comments
Open

Product thumbnails are stretched on mobile (Product page) #1565

sofiamatulis opened this issue Mar 31, 2022 · 4 comments
Assignees
Labels
Category: Bug Something isn't working

Comments

@sofiamatulis
Copy link
Contributor

sofiamatulis commented Mar 31, 2022

Describe the current behavior
Product thumbnails are stretching on mobile on Sense

Describe the expected behavior
Thumbnails should not be stretching

Version information (Dawn, browsers and operating systems)

  • Dawn Version: 1.0.0
  • Chrome Version 91.0.4472.114
  • macOS Version 11.3.1

Possible solution

Additional context/screenshots
https://screenshot.click/31-55-8op0k-j8xn2.png

https://screenshot.click/31-55-sv1wd-zhsyg.png

@sofiamatulis sofiamatulis changed the title Product thumbnails are stretched on mobile Product thumbnails are stretched on mobile (Product page) Mar 31, 2022
@sofiamatulis sofiamatulis changed the title Product thumbnails are stretched on mobile (Product page) Sense: Product thumbnails are stretched on mobile (Product page) Mar 31, 2022
@melissaperreault melissaperreault added the Category: Bug Something isn't working label Mar 31, 2022
@LexMetcalfe
Copy link

It looks like this is happening because the thumbnail--narrow img styles assign a height of 100% and a width of auto, which causes the image to distort. Swapping those attributes fixed the issue for me.

My solution was to just add the following to the bottom of section-main-product.css:

.thumbnail--narrow img {
    height: auto;
    width: 100%;
}

@rigid94
Copy link

rigid94 commented Apr 5, 2022

@LexMetcalfe Your solution does fix the image stretch but doesn't address the space above/below the thumbnails
dawn-error

@LexMetcalfe
Copy link

Hey @rigid94, I forgot to mention that adding the following to the bottom of component-slider.css will adjust the size of the thumbnail frames:

@media screen and (max-width: 749px){
  .slider.slider--mobile .slider__slide {
      padding-bottom: max(var(--focus-outline-padding));
  }
}

@LucasLacerdaUX LucasLacerdaUX self-assigned this Apr 8, 2022
@sofiamatulis sofiamatulis changed the title Sense: Product thumbnails are stretched on mobile (Product page) Product thumbnails are stretched on mobile (Product page) Apr 8, 2022
@LucasLacerdaUX
Copy link
Contributor

LucasLacerdaUX commented Apr 8, 2022

Just adding additional details.

Why is this bug happening?
When we implemented global settings, there was a bug that resulted in slide elements with shadows getting cut off. On Jan 12, we shipped a fix to that problem and it now adds additional padding to account for the shadows.

Because the thumbnail size was implemented in a way that the image would fill 100% of the media aspect ratio, this additional padding now distorts this height.

So, if Theme Settings > Media > Shadow > Blur is greater than 0, the images will be stretched.

I'll work on a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants