#set page(margin:0pt)
#set grid(fill:gray)
//we can apply rules based on x
#show grid.cell.where(x:0): set text(fill:red)
#show grid.cell.where(x:1): set text(fill:white)
#show grid.cell.where(x:2): set text(fill:blue)
//But trying to style the cell fill does not work
// The documentation says its settable
#show grid.cell.where(x:1): set grid(fill:blue)
#show grid.cell.where(x:1): set grid.cell(fill:blue)
#grid(
columns: (1fr,1fr,1fr),
rows:1fr,
[column-0],
[
= column-1
],
[column-2]
)
The show rules targeting specific columns to change text work fine, but changing the grid or grid.cell fill do not seem to do anything.
According to the documentation the grid.cell fill is settable.
How can i style the grid cell fill using show rules?
I like to keep style out of my content and create a template where i can style all similar grids. This way the color-scheme becomes configurable in 1 place, instead of having to change every grid.
Oh, so there are other grids with global styling after all. Makes sense then. Though the implication is that they are probably more of a table than a grid. Well, unless you actually use a heading inside, then it’s a grid (unless you mean table.header).