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
As I was working on APA styling using gt, I had a difficult time changing the top (first) and bottom (last) table borders. They don't change colors until you set the width to three or more. This is also the same with heading borders and likely other borders set in tab_options. Example:
I've run into this same issue and after learning how CSS handles collapsed borders have been able to mostly get around it. If anyone stumbles upon this post trying to figure this out:
For the top border:
If you don't have a header, use column_labels.border.top options.
If you do have a header, table.border.top options should work fine.
For the bottom border:
If you have any footnotes source notes, table.border.bottom options should work.
For tables with no footnotes/source notes:
If you don't have any summary rows, use table_body.border.bottom options.
If you have summary rows and all you want is 2px solid color border, set table.border.bottom.style = "double" in addition to your chosen table.border.bottom.color. At 2px it'll be solid (sometimes).
If you have summary rows and you want less than 2px or a different style there's some css options you can mess with but nothing is 100% so it's probably best to just go with the solid 2px border color of your choosing.
As I was working on APA styling using
gt
, I had a difficult time changing the top (first) and bottom (last) table borders. They don't change colors until you set the width to three or more. This is also the same with heading borders and likely other borders set intab_options
. Example:This does not work:
This works:
The text was updated successfully, but these errors were encountered: