haskellfoundation / hs-opt-handbook.github.io

The Haskell Optimization Handbook
https://haskell.foundation/hs-opt-handbook.github.io/
Creative Commons Attribution 4.0 International
170 stars 12 forks source link

Eventlog: Fix whitespace after embedded eventlog html #59

Open doyougnu opened 1 year ago

doyougnu commented 1 year ago

We embed the eventlog2html plots directly into the eventlog chapter which gives us nice interactive plots, but for some reason this leaves whitespace after each embedded plot.

The whitespace is not an html element and from reading the internet is related to how iframes are laid out. So this is a css issue that is induced by these webkit lines:

#scaled-frame {
  zoom: 1.00;
  -moz-transform: scale(0.75);
  -moz-transform-origin: 0 0;
  -o-transform: scale(0.75);
  -o-transform-origin: 0 0;
  -webkit-transform: scale(0.75);
  -webkit-transform-origin: 0 0;
}

in /hs-opt-handbook.github.io/_static/css/iframe.css

doyougnu commented 1 year ago

Per David's comments (https://stackoverflow.com/questions/71832358/transform-scale-with-iframe), set the height and width of the iframe in addition to scaling