XF 2.1 include css template from one style in another?

electrogypsy

Well-known member
Is it possible to include the extra.less css from one style into another? seems like you could link css from one template to another in the same style but not across styles?
 
boy, it would be great to get some input on this, seems like it shouldn't be that complicated.

when i write css in the parent theme, it carries to the child theme. once i start editing the child theme (for css that is to ONLY appear in that child theme, not the parent) i get errors in my admincp stating that the templates need to be merged.

the only way to prevent this is to literally update the child theme every time i make edits to the parent theme's css, which seems to defeat the purpose of the parent/child theme structure.
 
Create a blank template: extrachild.less in the parent

Extra.less, top line on parent:
Code:
<xf:include template="extrachild.less" />

Edit the extrachild.less template only on the child style to apply edits directly to that, this way you'll never have that template shown as outdated since you won't touch it on a parent level.
 
Create a blank template: extrachild.less in the parent

Extra.less, top line on parent:
Code:
<xf:include template="extrachild.less" />

Edit the extrachild.less template only on the child style to apply edits directly to that, this way you'll never have that template shown as outdated since you won't touch it on a parent level.

that is a super awesome fix. worked perfectly. thank you for posting that, it's a huge help!
 
Top Bottom