Adding condition to Class will concatenate them , I have added spaces but still the same

uchizenmarux
Tourist
8 1 0

I have created an announcement bar but I have a checkbox in case it needed a marquee effect. The problem is that if I add the condition to add the class, it will not put space, the 2 class will just concatenate together. I tried adding a spacebar either way but still not working. 

<section    class="tm-annoucement-bar  {%- if section.settings.is_scrolling -%}  scroll-effect{% endif %}">
	{
	"type": "checkbox",
        "id": "is_scrolling",
        "label": "Scrolling Animation?"
	}



The final output will be just like this

<section class="tm-annoucement-barscroll-effect">

 

Reply 1 (1)
Jayvin
Shopify Partner
270 40 74

Hi,

Try it like this :

<section class="tm-annoucement-bar  {% if section.settings.is_scrolling %}  scroll-effect{% endif %}">