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

r-stack and r-stretch work on Firefox but not Chrome #3597

Closed
alifeee opened this issue Mar 24, 2024 · 0 comments · Fixed by #3598
Closed

r-stack and r-stretch work on Firefox but not Chrome #3597

alifeee opened this issue Mar 24, 2024 · 0 comments · Fixed by #3598

Comments

@alifeee
Copy link
Contributor

alifeee commented Mar 24, 2024

Please see my reproduction (https://github.com/alifeee/revealjs-rstretch-bug) on http://alifeee.co.uk/revealjs-rstretch-bug/

Importantly, here is the markup of the problem slide:

        <section data-auto-animate>
          <h1 data-id="h1"><code>class="r-stack r-stretch"</code></h1>
          <p>
            Stack only. On Firefox, limits section to viewport. On Chrome,
            stretches off bottom of viewport :(
          </p>
          <div class="r-stack r-stretch">
            <img src="images/wide.png" alt="wide image" />
            <img src="images/tall.png" alt="tall image" />
          </div>
        </section>

Firefox

All is good

image

Chrome

All is not good (images stretch off the bottom)

image

Why?

I am not sure why. It seems a difference in how Firefox and Chrome deal with grid layout?

See the grid overlay here, and I have highlighted the div containing the images

Firefox

Div is sized correctly, and grid layout is the same size

image

Chrome

Div is sized correctly, but the grid layout overflows past this size

image

Research

After doing some research, I think I have found a fix. I will create a PR. I will also create this issue for people to find.

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 a pull request may close this issue.

1 participant