thescientist13 / greenwood-starter-presentation

A Greenwood plugin and general purpose starter kit for creating slide decks and presentations from markdown.
https://awesome-bhaskara-b7d76c.netlify.app
3 stars 0 forks source link

"snap to fit" for preview slides does not work in Firefox #62

Open thescientist13 opened 1 year ago

thescientist13 commented 1 year ago

Type of Change

Summary

Comparing the starter template in FF vs Chrome, it looks like the preview slides on the left are all big and out of perspective.

Chrome Screen Shot 2022-12-01 at 5 00 50 PM

FF Screen Shot 2022-12-01 at 5 00 35 PM

Details

Likely has to do with the code inside the <iframe> we use. https://github.com/thescientist13/greenwood-starter-presentation/blob/master/src/components/slide-list.js#L83

slideLoaded(slide) {
  const frame = this.shadowRoot.getElementById(`slide_${slide.id}`);
  const style = document.createElement('style');

  style.textContent = `
    body {
      zoom: .4;
    } 
  `;

  frame.contentDocument.head.appendChild(style);
}