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

Table cell padding setting not affect table header cells #1098

Closed
Glaberrd opened this issue Jun 12, 2019 · 5 comments
Closed

Table cell padding setting not affect table header cells #1098

Glaberrd opened this issue Jun 12, 2019 · 5 comments
Assignees
Labels
Milestone

Comments

@Glaberrd
Copy link

When working with version:

Asciidoctor PDF 1.5.0.alpha.16 using Asciidoctor 2.0.5 [https://asciidoctor.org]
Runtime Environment (ruby 2.2.10p489 (2018-03-28 revision 63023) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)

Following setting in custom theme:

table:
  cell:
    padding: 3

Was affecting also cells in table header row. That is not the case for later versions - table header cells padding can't be customized anymore.

@mojavelinux
Copy link
Member

You're absolutely right. Somehow, that got dropped. I'll fix it, add support for table_head_cell_padding as well, then add a test.

@mojavelinux mojavelinux self-assigned this Jun 12, 2019
@mojavelinux mojavelinux added this to the v1.5.0.beta.1 milestone Jun 12, 2019
@mojavelinux
Copy link
Member

Of course, if you'd like to have a go at it, feel free!

Here's the logic needed in the head section:

padding: theme.table_head_cell_padding || theme.table_cell_padding,

@Glaberrd
Copy link
Author

Unfortunately, I don't possess any Ruby skills so it would be hard to provide any solution from my side (not even saying about proper one with tests and support for table_head_cell_padding)

@mojavelinux
Copy link
Member

No worries. I just wanted to make sure I didn't step in front of you if it's something you could do.

mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Jun 13, 2019
* apply cell padding to table cells in the head row
* allow the theme to control the padding of table cells in the head row using the table_head_cell_padding key
@mojavelinux
Copy link
Member

This got missed because the reference PDF for the chronicles example was created after the regression occurred. Had it been the other way around, the visual test would have caught it. But the test suite will catch any future regression.

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

No branches or pull requests

2 participants