How to combine css class with :class?

I have a CSS class=“settings”
I want to combine with :class="{activeColor: isSettings}"

I’ve tried simply doing :class=“settings {activeColor: isSettings}” but it wipes the whole page clean. What am I doing wrong?

Just class = 'settings' :class = '{...}'
Vue is quite smart!

1 Like

I was confused about using ‘settings’ instead of “settings” in the normal CSS class, but I see it works both ways. I would have thought I should have combined them into one class, but this is actually better for overview. So great on YOU VUE, and thanks valg7711 !

Learning every day.

sorry for the single quotes, it’s just a pythonic habit :stuck_out_tongue_winking_eye:

1 Like