h5p / h5p-cli

Command Line Interface
MIT License
64 stars 33 forks source link

display bug when inserting an H5P.ImageHotspotQuestion inside an H5P Interactive Book #103

Closed rezeau closed 3 months ago

rezeau commented 4 months ago

display bug when inserting an H5P.ImageHotspotQuestion inside an H5P Interactive Book see attached screenshot wrong display of this css rule here: .h5p-image-hotspot-question::before { content: '\f059'; } 2024-07-18_18-47-50

otacke commented 4 months ago

This is not an issue with the H5P CLI tool. At least not directly.

When you view content with the H5P CLI tool, it will always load all the dependency libraries regardless of whether they are actually used in the respective content or not. (side note to @devland: Don't know if you'd want to change that. I've never felt a performance issue locally by that behavior.)

In your case, H5P.ImageHotspots is loaded and comes with https://github.com/h5p/h5p-image-hotspots/blob/master/styles/image-hotspots.css#L91-L93 which unfortunately collides with the CSS class name h5p-image-hotspot-question that H5P.ImageHotspotQuestion is using. You can verify this easily by inspecting the before pseudo-element that you see in your screenshot. It will be filled by the stylesheet of H5P.ImageHotspots. You can reveal that bug on any H5P integration if you have a content type that loads both H5P.ImageHotspotQuestion and H5P.ImageHotspots - just put both in a Column ...

otacke commented 4 months ago

Fixed in https://github.com/h5p/h5p-image-hotspots/pull/115

devland commented 3 months ago

Closing this since it is not an h5p-cli issue.