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

Styling not carrying over when using as_raw_html #293

Open
RicLouRiv opened this issue Dec 20, 2022 · 1 comment
Open

Styling not carrying over when using as_raw_html #293

RicLouRiv opened this issue Dec 20, 2022 · 1 comment
Assignees

Comments

@RicLouRiv
Copy link

Hello,

It seems as if the styling of my row groups is bleeding into the rowname columns when I convert to raw html, producing (in this example) two consecutive columns that are in weight bold.

`library(gt)

gtcars %>%
gt(
rowname_col = "model",
groupname_col = "mfr"
) %>%
tab_options(
row_group.as_column = TRUE
) %>%
tab_style(
style = list(
cell_fill(color = rgb(106, 151, 212, maxColorValue = 255)),
cell_text(
color = "white",
weight = "bold"
)
),
locations = cells_column_labels()
) %>%
tab_style(
style = list(
cell_text(
weight = "bold"
)
),
locations = cells_row_groups()
) -> gt_table_object

gt_table_object %>% as_raw_html() -> email_html`

@rich-iannone
Copy link
Member

First of all, this is the blastula repository (it's fine, maybe you're trying to get a table into an email message body?) and second, the as_raw_html() function has been fixed up in version 0.8.0 of gt. Could you update and try again?

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

No branches or pull requests

2 participants