<span th:style="#{yourProperties or field} != 0 ? 'color: white;' : 'color: white;'" th:text="#{yourProperties or field}"></span>