rohlik.cz - product images are sized to zero height and width Topic is solved

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
jokusoftware
Moongazer
Moongazer
Posts: 14
Joined: 2015-08-23, 11:46
Location: Prague, Czech Republic

rohlik.cz - product images are sized to zero height and width

Post by jokusoftware » 2025-04-13, 23:13

Some time ago the online grocery store rohlik.cz ceased to display product images in its catalog in PaleMoon. I have now investigated it a bit and it seems that something used in CSS for width/height inline calc() is not supported. It looks like this:

Code: Select all

width: calc(100% - 32px);
height: calc(100% - 32px);
and the result is always zero. It seems to be supposed to calculate a size of the image div contained inside a flex div. Tested with PaleMoon 33.7 x64 on Windows 11.

User avatar
adoxa
Lunatic
Lunatic
Posts: 441
Joined: 2019-03-16, 13:26
Location: Qld, Aus.

Re: rohlik.cz - product images are sized to zero height and width

Post by adoxa » 2025-04-14, 06:16

It's due to lack of aspect-ratio. Try this userstyle.

Code: Select all

@-moz-document domain("www.rohlik.cz") {
  div[data-test="productCard-header-image"] {
    height: 150px
  }
}

jokusoftware
Moongazer
Moongazer
Posts: 14
Joined: 2015-08-23, 11:46
Location: Prague, Czech Republic

Re: rohlik.cz - product images are sized to zero height and width

Post by jokusoftware » 2025-04-14, 09:06

Ah, working fine. Thank you very much.