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

Inner tables don't respect cell padding #150

Open
rhysb27 opened this issue Mar 28, 2023 · 1 comment
Open

Inner tables don't respect cell padding #150

rhysb27 opened this issue Mar 28, 2023 · 1 comment

Comments

@rhysb27
Copy link

rhysb27 commented Mar 28, 2023

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?

@bellef
Copy link

bellef commented Apr 29, 2024

👍
Same here but instead I would like no padding at all on the outside of the nested table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants