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

Float within flex not being displayed correctly #1356

Closed
jjnilton opened this issue May 16, 2021 · 1 comment
Closed

Float within flex not being displayed correctly #1356

jjnilton opened this issue May 16, 2021 · 1 comment
Labels
bug Existing features not working as expected

Comments

@jjnilton
Copy link

Hi, thanks for sharing this great project!

I noticed that floats seem to be misaligned when within a flexbox container. It also seems that justify-content: space-between is not being applied correctly on WeasyPrint's output.

WeasyPrint version 52.5.

Here's an example (on jsbin):

<style>
div {
  
}

.container {
  display: flex;
  justify-content: space-between;
}

.item {
  width: 300px;
  height: 300px;
  border: 1px solid black;
  margin: 5px;
}

.float {
  float: right;
}
</style>
<div class="container">
  <div class="item">
    <span class="float">
      Hello
    </span>
  </div>
  <div class="item">
    <span class="float">
      World
    </span>
  </div>
</div>

Comparing outputs (WeasyPrint on the left):

image

This is the WeasyPrint output:

weasyprint-issue-weasyprint.pdf

This is Google's Chrome print to PDF output:

weasyprint-issue-chrome.pdf

Let me know if I can provide more info or help with something else.

@liZe liZe added the bug Existing features not working as expected label May 17, 2021
@liZe
Copy link
Member

liZe commented Feb 8, 2025

Bug is closed and tested in the flex branch, see #2362.

@liZe liZe closed this as completed Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants