fix: use Word's asymmetric cell padding for tables
Cells padded 0.1cm on all sides; Word and LibreOffice use 0.19cm left and right and none top or bottom. Text sat 0.7mm too far left and every row was 2mm too tall, so the offset accumulated down a table. odf-kit only writes the fo:padding shorthand, which ODF defines as a single length — LibreOffice drops a two-value form — so the export expands it per side.
This commit is contained in:
1 parent
52cf5ac702
commit
275a77564e
3 files changed
+67
-4
No files matched your search
@@ -460,7 +460,8 @@
|
||||
and the exported .odt look identical (see export/odt.ts CUST_TABLE handler):
|
||||
• border → export emits 0.5pt solid #000000; 1px solid renders crisply
|
||||
on screen and is the visual equivalent of a thin 0.5pt line.
|
||||
• padding → export emits fo:padding 0.1cm per cell (CELL_PADDING).
|
||||
• padding → Word's/LibreOffice's cell margins; export emits them per side
|
||||
(CELL_PADDING_X/_Y, expanded by expandCellPadding).
|
||||
Tables are wrapped in <div class="tableWrapper"> by TipTap's node view. */
|
||||
.paper .tiptap .tableWrapper {
|
||||
/* Default is flush with the text area; a dragged outer edge sets an inline
|
||||
@@ -482,7 +483,7 @@
|
||||
.paper .tiptap td,
|
||||
.paper .tiptap th {
|
||||
border: 1px solid #000;
|
||||
padding: 0.1cm;
|
||||
padding: 0 0.19cm;
|
||||
vertical-align: top;
|
||||
/* Positioning context for the column-resize handle widget (a child div the
|
||||
resize plugin places at the cell's right edge). */
|
||||
|
||||
Reference in new issue
Block a user