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 collapses to zero height unless it's in a container set with an absolute height #3719

Open
deanebarker opened this issue Nov 21, 2024 · 4 comments

Comments

@deanebarker
Copy link

If I do this:

<main>
  <div class="reveal">
    <!-- reveal stuff here -->
  </div>
</main>

The slides do not show, and layout inspector reveals (heh...) that div.reveal has a height of 0px.

If I do this --

<main style="height: 400px;">
  <div class="reveal">
    <!-- reveal stuff here -->
  </div>
</main>

-- it works fine.

@psyko255
Copy link

Seeing this as well. Any workarounds?

@Frank-a-Rabbit
Copy link

This is expected behavior. The div with class .reveal has height set to 100% but if the parent element does not have a height set it will collapse to 0 height. I have submitted a PR with a fix.

@Martinomagnifico
Copy link
Collaborator

Martinomagnifico commented Dec 18, 2024

This is expected. In a browser where the HTML page is the presentation (standard), the presentation will adjust to the browser window. And because the browser window has a height, the presentation has a height. When a presentation is shown inside another page, it is 'embedded' (set embedded: true in the config). It is up to the author of that outer page to define an area (just give it a width and height there) inside which that presentation is then shown. Reveal will fill that area with the presentation. It does not need the PR.

@Frank-a-Rabbit
Copy link

Frank-a-Rabbit commented Dec 23, 2024

This is expected. In a browser where the HTML page is the presentation (standard), the presentation will adjust to the browser window. And because the browser window has a height, the presentation has a height. When a presentation is shown inside another page, it is 'embedded' (set embedded: true in the config). It is up to the author of that outer page to define an area (just give it a width and height there) inside which that presentation is then shown. Reveal will fill that area with the presentation. It does not need the PR.

@Martinomagnifico I disagree. The PR is one CSS rule that will simplify the need to explicitly set a height elsewhere.

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

4 participants