Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix and simplify iframe styles #292

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Commandtechno
Copy link
Contributor

@Commandtechno Commandtechno commented May 11, 2022

Description

Removes random white background on iframes which is visible in dark mode

Fixes weird sizing/padding issues with iframes on https://react-notion-x-demo.transitivebullsh.it/5d4e290ca4604d8fb809af806a6c1749, especially on mobile. These changes apply a 100px padding on either side like how notion does it. For regular sized iframes, they just fill their container because of the min-width: 100%.

Re #285 (comment): This removes the need for .notion-asset-wrapper-full because https://github.com/NotionX/react-notion-x/blob/master/packages/react-notion-x/src/components/asset.tsx#L62-L66 extends full width embeds like the figma one, and https://github.com/NotionX/react-notion-x/blob/master/packages/react-notion-x/src/components/asset.tsx#L90-L92 for embeds with a defined width like the spotify podcast one. The 100px padding still applies from the parent element (notion-asset-wrapper).

Notion Test Page ID

5d4e290ca4604d8fb809af806a6c1749

@vercel
Copy link

vercel bot commented May 11, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
react-notion-x ✅ Ready (Inspect) Visit Preview May 11, 2022 at 11:02PM (UTC)
react-notion-x-minimal-demo ✅ Ready (Inspect) Visit Preview May 11, 2022 at 11:02PM (UTC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant