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

Nested elements subvert white-space: nowrap #190

Closed
Smylers opened this issue May 1, 2014 · 3 comments
Closed

Nested elements subvert white-space: nowrap #190

Smylers opened this issue May 1, 2014 · 3 comments
Milestone

Comments

@Smylers
Copy link
Contributor

Smylers commented May 1, 2014

With white-space: nowrap, WeasyPrint still allows wrapping at tag boundaries for nested elements within the text.

Demo: http://www.stripey.com/demo/weasyprint/nowrap_elements.html, which WeasyPrint (version 0.21) renders as: http://www.stripey.com/demo/weasyprint/nowrap_elements.pdf

@liZe already mentioned this in a comment to Issue #176, but it seemed worth having a separate number for this, so it's documented as a known issue.

@SimonSapin
Copy link
Member

Thanks for properly filing and documenting this bug.

I believe that to fix this we’d have to keep track of the "last known line break opportunity" (which can be arbitrarily far in the tree of inline elements) and only "commit" stuff to a line up to that point so that we can "go back" when it turns out we’re overflowing the line. (I don’t know if that makes sense, but I can explain in more details if needed.)

@liZe
Copy link
Member

liZe commented Mar 8, 2016

Grouped in #301.

@liZe liZe closed this as completed Mar 8, 2016
@liZe liZe added this to the v0.42 milestone Dec 26, 2017
@liZe
Copy link
Member

liZe commented Dec 26, 2017

Fixed by closing #301.

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

3 participants