Skip to content

Inner tables don't respect cell padding #150

@rhysb27

Description

@rhysb27

Inner tables appear to work fine when the inner table is only acting as a mechanism for splitting cells. However in my case, I want to give the actual appearance of a table within a table cell, using the cell's padding to achieve this. For example:

references = [
  ["Regulation", "(5.4.2)", "Example link"],
  ["Regulation", "(5.4.2)", "Example link"],
  ["Standard", "(5.4.2)", "Example link"],
  ["Best Practice", "(5.4.2)", "Example link"],
]

references_table = make_table(references, cell_style: { borders: [], size: 10 })

table_data = [
  ["Action will go here"],
  [{ content: references_table, padding: 15 }],
]

make_table(table_data, width: 452, cell_style: { size: 10, background_color: "FFFFFF" })

... results in:
table-not-respecting-padding

Whereas merely replacing references_table with text results in:
text-respecting-padding

How come text respects the cell's padding while the inner table doesn't?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions