Adding conditional css to view or display type Hi i have created a view that displays recently viewed items. This displays the 'teaser' display mode of a custom content type. This content type has a field 'favorite'.

What i want is to add a css class to the outer div (on the teaser div or de col-... generated by the view). But only if it is a 'favorite'.

I have created the view in the Drupal backend I could probably do in a custom module. I just want to check if it is possible without any programming.
You could try this but may depend on your 'favourite' field output

If you click on "Format > settings" when editing your view you'll see a "Row class" field. In there you can put the replacement pattern for your favourite field. 

So if its populated it will add the field value as a class to the view-row div. And you can use this to know if the field has content

If that's not going to work because the field content isn't suitable as a class then you could preprocess the node view and add a class yourself in the attributes array