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

Reveal.js dissappearing on load when using Bootstrap 4 #3689

Open
camerongreen opened this issue Oct 11, 2024 · 0 comments
Open

Reveal.js dissappearing on load when using Bootstrap 4 #3689

camerongreen opened this issue Oct 11, 2024 · 0 comments

Comments

@camerongreen
Copy link

camerongreen commented Oct 11, 2024

I figured this out but putting it here in case it takes anyone else most of a day to figure it out (I have about 50 external CSS and javascript files in my project that complicated finding this).

I am embedding reveal.js and adding a transition by giving the parent of the reveal div an absolute height and width and setting the following:

{ embedded: true, transition: 'fade' }

This worked fine in my test.html, but when I tried to embed it into a Boostrap 4 website, the slideshow would load for a millisecond and then quickly disappear.

The issue was my use of the transition, which added the class ".fade" which means something different in reveal.js and bootstrap4. There is probably another way to fix this, but not being too invested, I simply used another transition 'fade-out' and things sprung to life.

For fellow embedders, it might be worth Reveal.js (and Bootstrap) thinking about namespacing things in the code. Either .reveal.fade or having some prefix rjs-fade etc.

Thanks for the great framework :)

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

No branches or pull requests

1 participant