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

striping and background coloring not working #738

Open
r98012 opened this issue Dec 18, 2022 · 0 comments
Open

striping and background coloring not working #738

r98012 opened this issue Dec 18, 2022 · 0 comments

Comments

@r98012
Copy link

r98012 commented Dec 18, 2022

Describe the bug
When you use both striping and background coloring, background coloring is not applied to all rows. The background is only applied to rows without grey striping. In prior versions of kableExtra (1.1.0) both striping and background coloring worked. Versions: kableExtra version 1.3.4, rmarkdown version 2.17, R version 4.2.2 and RStudio 2022.07.2+576 "Spotted Wakerobin".

Thank you for taking a look

To Reproduce run this .qmd file

    ---
   title: "Table"
    format:
        pdf:
          toc: false
    editor: source
    ---

    ```{r}
    #| label: load-packages
    #| include: false
    library(tidyverse)
    library(kableExtra)
    ```


    # Table
    ```{r}
    #| label: plot-penguins
    #| warning: false
    #| echo: false
    #| results: asis

    t= head(cars)
    t$dist = kableExtra::cell_spec( t$dist,  background = "red" )
    kable(t, format="latex",escape=FALSE) %>% kable_styling(latex_options=c("striped"))

    ```

output
bg color table

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

No branches or pull requests

1 participant