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: revert overflow-hidden for SlideWrapper #1493

Merged
merged 1 commit into from Apr 8, 2024

Conversation

murilo-cunha
Copy link
Contributor

Hi, thanks a lot for this project! Slidev's my go-to tooling these days. Big fan of the project!

This PR:

  • Allow overflow to be visible to enable negative margins for styling

I like to style my slides with negative margins (especially when using two-cols, etc.) but with the change introduced in c820e23, it was hard to customize it to my liking.

Not sure there are any other side effects to this change, but it took me some time to fix it so I figured I'd open a PR :)

My current workaround was to include in styles/main.css:

.slidev-page {
  /* https://github.com/slidevjs/slidev/commit/c820e23b10581191a42bbf51c04bfd2caa49077a */
  overflow: visible !important;
}

Allow overflow to be visible to enable negative margins for styling
Copy link

netlify bot commented Apr 2, 2024

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 4c3637f
🔍 Latest deploy log https://app.netlify.com/sites/slidev/deploys/660c193fb3328f0008ad7c81
😎 Deploy Preview https://deploy-preview-1493--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu
Copy link
Member

antfu commented Apr 2, 2024

Can you elaborate more what you want to do and why is this needed?

@murilo-cunha
Copy link
Contributor Author

In general so I can use negative margins to adjust the content.

Sometimes I like to have images partially over/covering each other in my slides (when using two-cols layout.

Or to make quick adjustments on the spacing for text.

I'm not sure if the overflow-hidden has other side effects, but I was using it as a quick way to increase the spacing of elements via negative margins

Copy link
Member

@KermanX KermanX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, in #1462 I also did this change. It seems that this pverflow-hidden is redundant and not other slide wrappers don't have this class.

@antfu antfu changed the title Revert overflow-hidden for SlideWrapper fix: revert overflow-hidden for SlideWrapper Apr 8, 2024
@antfu antfu merged commit 29867e5 into slidevjs:main Apr 8, 2024
4 checks passed
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.

None yet

3 participants