How to set a element style based on a custom field value?

Hi

You could use the attributes filter for that.

See this:

Cheers

Patric