Change Table Row Color Conditionally CSS?

I have a prototype here, but it requires a few things so I’m not sure if it works. Requirements are:

  • Have an additional If-Then-Else column to check if both payments have been completed.

  • Display them in a table like this, with Bool 1 and Bool 2 set to editable.

  • The CSS:
tr[class*="new-table-lib___StyledTr"]:has(div[class*="true-boolean"]) {
background-color: gold;
}

label[class*="pages-switch___StyledLabel"] {
pointer-events: none;
cursor: not-allowed;
}

Reasoning: Only allow one true-boolean class (the Finished one) to appear, change the bools to editable and then not allowing them to be edited.

3 Likes