How to Resolve Thymeleaf th:Styleappend tag is taking as Sting. I'm able to see styleappend tag in html

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to Resolve Thymeleaf th:Styleappend tag is taking as Sting. I'm able to see styleappend tag in html

Bhavana
From Thymeleaf I have processing style elements dynamically

Ex:<attr sel=".emailFontFamily" th:if="${theme} != null"
   th:styleappend="'color:'+ ${theme.buttonColor}+';'" /> ..like this

In Html code:
 <span class="unsubscribeText customContentCls buttonLinkColor p lineHeight emailFontFamily" style="color: #2780cb; margin: 0px; font-size:14px; font-family:Arial, Helvetica, sans-serif;" if="true" styleappend="color:#4eae49;"> Unsubscribe </span>

So after processing in thymeleaf in html I'm getting ("if="true" styleappend="color:#4eae49;")..Because of it that particular color is not applying.