In a template I need to assign more than one CSS class to a div.
However, when I try something like the following, the Closure compiler seems to wrap only the first class in quotation marks, resulting in the browser ignoring the rest.
<div class={foreach $cssClass in $cssClasses}{$cssClass} {/foreach}>...</div>
I tried wrapping the whole thing in quotation marks (with and without {literal}
)... didn't do the trick.
Wrap class in quotations
<div class="{foreach $cssClass in $cssClasses}{$cssClass} {/foreach}">...</div>