WeasyPrint icon indicating copy to clipboard operation
WeasyPrint copied to clipboard

Handle the CSS column combinator

Open aschmitz opened this issue 4 years ago • 3 comments

WeasyPrint supports <col> elements with width attributes, but not other attributes that have been deprecated and are no longer actually defined in HTML5 (although width is not either).

The align and valign attributes in particular are difficult because there is no easy CSS alternative, meaning it's not possible to support them via a presentational hints CSS file. (bgcolor could arguably be supported with an appropriate application of attr().)

(I suspect that supporting char and charoff values might be difficult, but I would hope that the other values could be cascaded without too much difficulty.)

If it would be feasible to support these attributes in WeasyPrint, that would be much appreciated, as a fair amount of HTML already relies on these attributes.

aschmitz avatar Oct 31 '21 18:10 aschmitz

That would be useful indeed. I don’t know if there are official rules about how to support them, or we’ll have to "cascade" these attributes in an uncommon way.

liZe avatar Nov 06 '21 07:11 liZe

Implementing the column combinator is exactly what we want.

liZe avatar Dec 25 '21 20:12 liZe

Related to https://github.com/Kozea/cssselect2/pull/24.

liZe avatar Sep 17 '22 09:09 liZe