Conditional Formatting for a custom Record Summary

Conditional Formatting for a custom Record Summary

I have created a custom record summary for a report.

I want the conditional formatting from the report to work on the record summary as well. 

I know it is possible because it works on the default template.

Can anyone help me to get it working for my custom record summary.

Thank you very much in advance :)