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

Support for column-span #719

Closed
fabiobatalha opened this issue Oct 25, 2018 · 1 comment
Closed

Support for column-span #719

fabiobatalha opened this issue Oct 25, 2018 · 1 comment
Labels
feature New feature that should be supported good first issue Issues that can be quite easily solved by Python developers with a good CSS background
Milestone

Comments

@fabiobatalha
Copy link

Is any kind of envisioning to give support for column-span.

Example of use of column-span using the tool PagedJS:

screenshot from 2018-10-25 10-23-24

The same PDF file produced with WeasyPrint using the same HTML and CSS's.

screenshot from 2018-10-25 10-23-50

@liZe liZe added feature New feature that should be supported good first issue Issues that can be quite easily solved by Python developers with a good CSS background labels Oct 26, 2018
@liZe
Copy link
Member

liZe commented Oct 26, 2018

Is any kind of envisioning to give support for column-span.

Nothing has been done yet to support column-span, but it would be quite easy to handle simple cases (ie at least without fixed height).

The overall goal is to change the columns_layout function (in layout/columns.py) to split the box at the beginning of the function into multiple boxes. For example:

div {columns: 2}
h2 {column-span: all}
<div>abc def <h2>test</h2> ghi jkl</div>

In this case, we have to:

  • go through box (the div element) to find the h2 element,
  • render <div>abc def (with the current code) and <h2>test</h2> (with some added code),
  • render ghi jkl</div> for example by calling columns_layout with the current skip_stack.

If anyone is interested in implementing this feature, I'll be happy to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature that should be supported good first issue Issues that can be quite easily solved by Python developers with a good CSS background
Projects
None yet
Development

No branches or pull requests

2 participants