You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Leftovers from #1878: HTML import: table widths, cell colours, spans, borders and layout tables #1894
Leftovers from #1878 (PR #1893): minor review findings and plan items deferred by the loop.
p1 (minor, plan, docxcore/src/import/html_table.rs): HTML import: CSS borders on tables and cells
p2 (minor, plan, docxcore/src/import/html.rs): HTML import: row heights, col/colgroup widths, max-width
p3 (minor, plan, docxcore/src/import/html.rs): HTML import: centre a table under center / div align / margin:0 auto
p4 (minor, plan, docxcore/src/import/html.rs): HTML import: th default bold/centre, body and image backgrounds
p1
HTML import (#1878) reads only the border attribute of <table>. CSS border, border-top/right/bottom/left (and -width/-style/-color) on tables and cells are ignored, as are frame/rules, border-collapse and the bordercolor attribute. HTML emails often draw rules with border-bottom: 1px solid #eee on cells. Map them to tblBorders / tcBorders (docxcore/src/import/html.rs cascade, docxcore/src/import/html_table.rs tcPr/tblPr writers).
p2
HTML import (#1878): row/cell height (→ w:trHeight atLeast), <col>/<colgroup>width (→ grid columns), and CSS max-width on a table (the common width:100%;max-width:600px email shape) are not read. col/colgroup are void/ignored in docxcore/src/import/html.rs.
p3
HTML import (#1878) centres a table only from <table align=center|right>. A browser also centres it under <center>, <div align=center> (align descendants), and with CSS margin: 0 auto / margin-left:auto; margin-right:auto; that is how most email templates centre their 600px table. Map them to tblPr/w:jc.
p4
HTML import (#1878): th cells are not bold and centred by default as a browser's UA sheet makes them; a page/bodybgcolor or background and table background images are not read.
Activity