Remove shading from HTML tables generated using Quarto

When rendering an HTML document using Quarto, light grey shading is added to alternate/odd-number rows for both {gt} and {DT} tabular output. The shading persists even when opt_row_striping(row_striping = FALSE) is included.



x <- sample(1:nrow(iris), 10)

df <- iris[x, ]

df |> 
  gt() |> 
  opt_row_striping(row_striping = FALSE)


(Note: shading does not appear when generating and viewing the table in RStudio)

This shading does not appear in when knitting this same code as an HTML document using RMarkdown.

How can this either be turned off or set to a different color?


yes the shading is added by default on computational table output in Quarto

This can't be easily removed for now

You'll find information in the discussion, including how to opt-out processing of HTML table produced by GT so that you can keep the gt layout

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.