This would be nicer: <div class="icon{% if os == "mac-os-x" %}-selected{% endif %}">