diff --git a/tests/ref/grid-subheaders-colorful.png b/tests/ref/grid-subheaders-colorful.png new file mode 100644 index 000000000..38bb4ad8b Binary files /dev/null and b/tests/ref/grid-subheaders-colorful.png differ diff --git a/tests/ref/grid-subheaders.png b/tests/ref/grid-subheaders.png deleted file mode 100644 index 89ccf2a9a..000000000 Binary files a/tests/ref/grid-subheaders.png and /dev/null differ diff --git a/tests/suite/layout/grid/subheaders.typ b/tests/suite/layout/grid/subheaders.typ index 19c3409ff..3410104aa 100644 --- a/tests/suite/layout/grid/subheaders.typ +++ b/tests/suite/layout/grid/subheaders.typ @@ -1,3 +1,28 @@ +--- grid-subheaders-colorful --- +#set page(width: auto, height: 12em) +#let rows(n) = { + range(n).map(i => ([John \##i], table.cell(stroke: green)[123], table.cell(stroke: blue)[456], [789], [?], table.hline(start: 4, end: 5, stroke: red))).flatten() +} +#table( + columns: 5, + align: center + horizon, + table.header( + table.cell(colspan: 5)[*Cool Zone*], + ), + table.header( + level: 2, + table.cell(stroke: red)[*Name*], table.cell(stroke: aqua)[*Number*], [*Data 1*], [*Data 2*], [*Etc*], + table.hline(start: 2, end: 3, stroke: yellow) + ), + ..rows(2), + table.header( + level: 2, + table.cell(stroke: red)[*New Name*], table.cell(stroke: aqua, colspan: 4)[*Other Data*], + table.hline(start: 2, end: 3, stroke: yellow) + ), + ..rows(3) +) + --- grid-subheaders-basic --- #grid( grid.header( @@ -271,31 +296,6 @@ grid.cell(x: 0)[done.] ) ---- grid-subheaders --- -#set page(width: auto, height: 12em) -#let rows(n) = { - range(n).map(i => ([John \##i], table.cell(stroke: green)[123], table.cell(stroke: blue)[456], [789], [?], table.hline(start: 4, end: 5, stroke: red))).flatten() -} -#table( - columns: 5, - align: center + horizon, - table.header( - table.cell(colspan: 5)[*Cool Zone*], - ), - table.header( - level: 2, - table.cell(stroke: red)[*Name*], table.cell(stroke: aqua)[*Number*], [*Data 1*], [*Data 2*], [*Etc*], - table.hline(start: 2, end: 3, stroke: yellow) - ), - ..rows(6), - table.header( - level: 2, - table.cell(stroke: red)[*New Name*], table.cell(stroke: aqua, colspan: 4)[*Other Data*], - table.hline(start: 2, end: 3, stroke: yellow) - ), - ..rows(5) -) - --- grid-subheaders-alone --- #table( table.header(