Lukas W. Well-known member Oct 19, 2017 #1 Is there a way to access style properties in html templates?
Mike XenForo developer Staff member Oct 19, 2017 #2 The property template function. As an example: Code: <xf:if is="property('metaThemeColor')"> <meta name="theme-color" content="{{ property('metaThemeColor') }}" /> </xf:if>
The property template function. As an example: Code: <xf:if is="property('metaThemeColor')"> <meta name="theme-color" content="{{ property('metaThemeColor') }}" /> </xf:if>
Lukas W. Well-known member Oct 19, 2017 #4 @Mike is there a way to enforce color properties to be printed as hex values instead of rbg(a)?
Mike XenForo developer Staff member Oct 19, 2017 #5 Short answer is no, you'd likely need to expose something custom to do that. There are some helper methods in XF\Util\Color that you can use.
Short answer is no, you'd likely need to expose something custom to do that. There are some helper methods in XF\Util\Color that you can use.
Lukas W. Well-known member Oct 19, 2017 #6 Unfortunate. I'll see if I can utilize them then. Thanks for the hint!