Condition on a custom filter!

Hello,
i have a tutoring website built with sharetribe os and i would like to apply some css styles at a listing depending of the subject of the listing (maths, english etc.).

I didn’t manage to make it work so was wondering if someone could help ? I would like something like this

  • if subject == maths
    apply the maths css style
  • else
    apply the default css style

The subject is a dropdown custom filter.

Thanks in advance !

Mathieu