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

Longer titles trigger left-alignment of title and subtitle #630

Open
joepowers16 opened this issue Jul 30, 2020 · 1 comment
Open

Longer titles trigger left-alignment of title and subtitle #630

joepowers16 opened this issue Jul 30, 2020 · 1 comment

Comments

@joepowers16
Copy link

joepowers16 commented Jul 30, 2020

When I use a longer title in a gt table, the title and subtitle start to left align. This is undesirable since the rest of my report has center aligned table titles, and I suspect this is a bug. Please see my attached reprex with code and knitted pdf.

gt_alignment_problem.pdf

library(tidyverse)
library(gt)

mtcars %>% 
    count(cyl) %>% 
    gt() %>% 
    tab_header(
        title = md("When my Title is long it gets Left-aligned and this is not attractive"),
        subtitle = md("Even subtitle gets left aligned") 
    )

image

@rich-iannone
Copy link
Member

Sorry for the lack of response until now. But I do have a fix in the works to solve this issue.

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