Unwanted zooming of pictures on Refresh theme

Solved

Unwanted zooming of pictures on Refresh theme

mauricegosselaa
Tourist
3 0 1

Hello, 

 

I sell officeproducts and some pictures have less height. In search-function and while surfing through collection those images are abnormally zoomed,  how to disable this zooming?

 

www dot merkendistributie dot nl   -  and search for  'pen'    press the search button and some abonormally zoomed images will appear.  

 

(resizing the images to square would be the best solution,  but if I can avoid that with some code  I would be happy!)  

 

thanks in advance!  

Accepted Solution (1)
g33kgirl
Shopify Partner
390 109 143

This is an accepted solution.

Ahh, I see you have added it but it is in a media query. You need to close the bracket of the media query and add the code outside it.

 

@media (forced-colors: active) {
  .button,
  .shopify-challenge__button,
  .customer button {
    border: transparent solid 1px;
  }

  .button:focus-visible,
  .button:focus,
  .button.focused,
  .shopify-payment-button__button--unbranded:focus-visible,
  .shopify-payment-button [role="button"]:focus-visible,
  .shopify-payment-button__button--unbranded:focus,
  .shopify-payment-button [role="button"]:focus {
    outline: solid transparent 1px;
  }

  .field__input:focus,
  .select__select:focus,
  .customer .field input:focus,
  .customer select:focus,
  .localization-form__select:focus.localization-form__select:after {
    outline: transparent solid 1px;
  }

  .localization-form__select:focus {
    outline: transparent solid 1px;
  }
} <-- add this bracket here

  .card__media .media img {
    object-fit: contain !important;
}
If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl
If you're not comfortable with code, please modify code files at your own risk.

View solution in original post

Replies 5 (5)

g33kgirl
Shopify Partner
390 109 143

You can add this code to your CSS file:

 

.card__media .media img {
    object-fit: contain !important;
}
If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl
If you're not comfortable with code, please modify code files at your own risk.
mauricegosselaa
Tourist
3 0 1

Thanks very kindly, I have added it to base.css    -  no result so far  😞 

g33kgirl
Shopify Partner
390 109 143

I can't see it in base.css. Where have you added it? 

If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl
If you're not comfortable with code, please modify code files at your own risk.
g33kgirl
Shopify Partner
390 109 143

This is an accepted solution.

Ahh, I see you have added it but it is in a media query. You need to close the bracket of the media query and add the code outside it.

 

@media (forced-colors: active) {
  .button,
  .shopify-challenge__button,
  .customer button {
    border: transparent solid 1px;
  }

  .button:focus-visible,
  .button:focus,
  .button.focused,
  .shopify-payment-button__button--unbranded:focus-visible,
  .shopify-payment-button [role="button"]:focus-visible,
  .shopify-payment-button__button--unbranded:focus,
  .shopify-payment-button [role="button"]:focus {
    outline: solid transparent 1px;
  }

  .field__input:focus,
  .select__select:focus,
  .customer .field input:focus,
  .customer select:focus,
  .localization-form__select:focus.localization-form__select:after {
    outline: transparent solid 1px;
  }

  .localization-form__select:focus {
    outline: transparent solid 1px;
  }
} <-- add this bracket here

  .card__media .media img {
    object-fit: contain !important;
}
If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl
If you're not comfortable with code, please modify code files at your own risk.
mauricegosselaa
Tourist
3 0 1

Wow you are MASTER, thanks very kindly!    You are true  about the Bracket!   

Solution accepted  🙂   Cheers cheers cheers so much!  

 

Okay, for everyone with the same issue  :  The base.css is build up into more sections which are closed by brackets.  Find the right one.  And go go go