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

Empty sub bullet point causes next bullet point to be on the same line #873

Closed
AlexDvorak opened this issue May 23, 2019 · 3 comments

Comments

2 participants
@AlexDvorak
Copy link

commented May 23, 2019

Given the following HTML, with an empty sub bullet point as seen in the HTML below, weasyprint (v47) renders the following bullet point on the same line weasyprint
but when the same HTML is rendered in Firefox, the bullet point is on its own line. firefox
when checking inspect element, the HTML does not correct to anything else so it would appear that this is an issue with weasyprint and not bad HTML I believe.
HTML that breaks Weasyprint (Firefox does not do anything else to it)

<ul>
  <li>
    hello
    <ul>
      <li>hi</li>
      <li></li>
    </ul>
  </li>
  <li>hu</li>
</ul>

@liZe liZe added the bug label May 23, 2019

@liZe

This comment has been minimized.

Copy link
Member

commented May 23, 2019

Thanks a lot for this report. I'm always surprised (and really disappointed) to discover really simple corner cases that are broken…

@liZe liZe added this to the 48 milestone May 23, 2019

@liZe liZe added conformance and removed bug labels May 30, 2019

@liZe

This comment has been minimized.

Copy link
Member

commented May 30, 2019

Well, the behavior is actually not defined by CSS, even in recent modules:

The size or contents of the marker box may affect the height of the principal block box and/or the height of its first line box, and in some cases may cause the creation of a new line box; this interaction is also not defined.

I can try to find a way to make li elements at least as high as their markers.

@liZe liZe closed this in ec4504d May 31, 2019

@liZe

This comment has been minimized.

Copy link
Member

commented May 31, 2019

@AlexDvorak It's fixed, thanks for the report!

If anyone knows how it's implemented in other browsers, please tell me! I suppose that an empty linebox is added, but it sounds like a really big change in the DOM for a very small feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.