diff --git a/components/NotionPage.js b/components/NotionPage.js index 7c25f2dc..cad7fcf1 100644 --- a/components/NotionPage.js +++ b/components/NotionPage.js @@ -33,6 +33,7 @@ const NotionPage = ({ post }) => { const zoom = isBrowser() && mediumZoom({ container: '.notion-viewport', background: 'rgba(0, 0, 0, 0.2)', + scrollOffset: 200, margin: getMediumZoomMargin() }) diff --git a/styles/notion.css b/styles/notion.css index a43bfcc1..a6361d76 100644 --- a/styles/notion.css +++ b/styles/notion.css @@ -207,6 +207,20 @@ .medium-zoom-image--opened { z-index: 301; + /* width: auto !important; */ +} + +@media (max-width: 768px){ + .medium-zoom-image--opened { + object-fit: fill !important; + height: auto !important; + } +} + +@media (min-width: 768px){ + .medium-zoom-image--opened { + object-fit: scale-down !important; + } } .notion-frame {