I would like to have a header with a solid color background and then normal cells thereafter.
I have attached an image of the expected result (produced with the default table) and of the current result (produced with tablex).
In the second case white lines appear where the color should be solid.
The code for the tablexcase is:
// Print the table
tablex(
columns: (1fr, 1fr, 2fr, 2fr, 1fr, 1fr),
align: center + horizon,
header-rows: 1,
// Color the headers
map-cells: cell => {
// Color the cells of the first row
if cell.y == 0 {
cell.fill = colors.red
cell.stroke = none
cell.outset = 2pt
cell.content = {
set text(fill: white, weight: "bold", size: 0.95em)
cell.content
}
}
return cell
},
// Remove the lines on the header cells
map-hlines: h => {
if h.y in (0, 1) {
h.stroke = none
}
return h
},
map-vlines: v => {
v.start = calc.max(1, v.start)
return v
},
// Add the content
..content.flatten(),
)
}