Maximum show rule depth exceeded #4080
Unanswered
lettuceDestroyer
asked this question in
Q&A
Replies: 1 comment
-
#show cell.where(fill: {}): it=> …// When `fill:` is set for the returned `cell()`, this `show` rule doesn't match
#show cell.where(body: [succeeded]): set cell(fill: green)
#show rect: set rect(fill: blue)
#let tabularize-outcomes(..args) = table(
columns: 2 * (1fr,),
header[Affair][Outcome],
..for (aff, outc) in args.pos() {(
aff,
if true == outc {cell(
fill: green,
"succeeded",
)} else if false == outc {cell(
fill: red,
"failed",
)} else if {} == outc {cell(
fill: gray,
"unknown",
)} else {outc},
)},
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to edit table cells based on their value. When the value equals "succeeded" the table cell should be green and when the value equals "failed" it should be red.
What I tried is this:
And this:
The reason why I do it like this and not like the official Typst documentation is because I'm trying to separate the content and styling.
Beta Was this translation helpful? Give feedback.
All reactions