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

.columns.wrap with images doesn't wrap #353

Closed
obilodeau opened this issue Mar 16, 2020 · 1 comment · Fixed by #360
Closed

.columns.wrap with images doesn't wrap #353

obilodeau opened this issue Mar 16, 2020 · 1 comment · Fixed by #360
Labels
Milestone

Comments

@obilodeau
Copy link
Member

Test case. To be dropped in examples/ and images will resolve properly.

= Grid Wrapping Tests
:imagesdir: images/
// reveal.js config
:revealjs_hash: true
:revealjs_center: false
:revealjs_height: 1080
:revealjs_width: 1920

[.columns.wrap]
== Should Wrap But Doesn't

[.column]
* Things here should wrap
* But instead images shrink

[.column]
image::cover.jpg[width=900px]

[.column]
image::70s.jpg[width=900px]

This looks like this:
adrjs-grid-wrap-issue

If I disable flex-basis on .columns .slide-content > .column it becomes:

adrjs-grid-wrap-issue-ok

Which would be more what I would expect.

However, I wonder if that is a viable fix. @Mogztter any ideas?

@ggrossetie
Copy link
Member

Damn! And now I don't specifically remind why flex-basis was important but I'm pretty sure that if you remove it, it will have some side effects.

To limit impact, we could override it when wrap is enabled:

.columns.wrap .slide-content > .column {
  flex-basis: auto;
}

I believe auto is the default value: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis

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

Successfully merging a pull request may close this issue.

2 participants