readium / readium-css

🌈 A set of reference stylesheets for EPUB Reading Systems, starting with Readium Mobile
https://readium.org/readium-css/
BSD 3-Clause "New" or "Revised" License
89 stars 20 forks source link

Safeguard not applying to SVG elements #148

Open JayPanoz opened 1 week ago

JayPanoz commented 1 week ago

I'm submitting a bug report.

Short description of the issue/suggestion:

At the moment, the safeguard for svg is not working while there is no issue with img for instance.

https://github.com/readium/readium-css/blob/2e1bb29d02de1b2d36ec960eb90c2c4ac238b346/css/src/modules/ReadiumCSS-safeguards.css#L46-L69

Please note audio is corrected in branch Thorium Ports.

Steps to reproduce the issue/enhancement:

  1. apply a context in which svg’s height is larger than the viewport
  2. it won’t be limited as is the case with img for instance

What is the expected behaviour?

It should behave as it does with img i.e. the height is restricted to the viewport’s height, and not overflow.

What is the current behaviour?

It overflows in Chrome and Firefox, it is cut and displayed in the next column in Safari.

Do you know which CSS modules (stylesheets) are impacted?

Safeguards (horizontal and vertical)