Override element.style height and width of Photoswipe gallery pictures in Glint

I’ve set up a website with the Glint template, and my problem is that I can’t change the aspect ratio of my Photoswipe gallery photos. The images are all squished and stretched to fill the default space. I have tried everything at this point, but I can’t find what the source of the problem is. The height and width are being changed by element.style, but the source of this can not be found. It is not CSS or HTML, and I’ve tried unsuccessfully to find it in the Javascripts.

I do hope this is something that can be easily fixed, because the Glint template has worked pretty well for me otherwise. I just need to fix this small issue currently.

Hi Mahiro

It’s an inline styling, please check elements directly, it’s not from the CSS or js files, style is attached to an element
By the way, you can use !important to override such styles

Thank you very much. Unfortunately, there is no inline styling anywhere in my HTML code, but I was able to override this with !important within the CSS code of Photoswipe.

If you happen to know where this inline styling is coming from, I’d appreciate knowing that. Otherwise, I’m glad the override worked.

Hi Mahiro

If it’s not inline and not in any other CSS file then it was added by JS code for sure, in this case, override by ! important is fully acceptable :slight_smile: