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.

library(tidyverse)
library(gt)

set.seed(10)

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

df <- iris[x, ]

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

image

(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?

Thanks.

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