Row Color change by Row_Rendered

The following code used to work on PHPMaker 2021. Today I installed PHPMaker 2024.14 and the list does not show the colors based on the Approval field.

function Row_Rendered() 
{ 
	// Change the table row color based on values of variable Status and Approval
	if ($this->PageID == "list" || $this->PageID == "view") { // List/View page only
		if ($this->Status->CurrentValue == 3) {
			$this->RowAttrs["style"] = "background-color: #ff0000";
		} elseif ($this->Approval->CurrentValue == 0 && $this->Status->CurrentValue == 0) {
			$this->RowAttrs["style"] = "background-color: #ffff33";
		} elseif ($this->Approval->CurrentValue == 1 && $this->Status->CurrentValue == 0)  {
			$this->RowAttrs["style"] = "background-color: #ccffff";
		} elseif ($this->Approval->CurrentValue == 2 && $this->Status->CurrentValue == 0 ){
			$this->RowAttrs["style"] = "background-color: #b2ff66";
		}
	}
}

Note that your styles may not override the default styles, you may Inspect HTML element and test your own CSS styles first. You may need to add !important.

Hi,I used

$this->RowAttrs["style"] = 
           '--bs-table-bg: yourcolor;'.
            '--bs-table-striped-bg: rgba(var(--bs-emphasis-color-rgb), 0.05)';

The second row is for the darktheme

@Pramsent, that actually fixed it for me. Thank you!