• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Define Style Properties within templates based on other style properties

Erik

Well-known member
#1
Basically, what I am trying to do is create the ability to allow users of my theme to select a simple color choice (Red, Orange, Blue, Green, etc.) which will then color the entire theme without needing to adjust the color palette manually or even use the hue slider.

Is there a way to set or define Style Properties within the templates? For example, I want to do something like:
Code:
<xen:if is="@myStyleProperty">
<xen:set @primaryMedium="rgb(0,50,0)" />
<xen:set @primaryLighter="rgb(0,100,0)" />
etc...
</xen:if>
Is there any way to do this? As I mentioned above, the end goal is to allow theme users to be able to pick preset colors of the theme through Style Properties, or choose a "custom" color and adjust the color pallet directly. :)
 

Mike

XenForo developer
Staff member
#2
No, that's not possible. In theory, you could probably do something like that with an addon.

You're probably better off creating child styles that customize only the color properties (or whatever properties you want), and have people install them as children of the base style.