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

Jake Bunce cat magic - new css file?

Discussion in 'Styling and Customization Questions' started by Morgain, Feb 8, 2013.

  1. Morgain

    Morgain Well-Known Member

    Jake Bunce provided me with a whole lot of excellent code for EXTRA.css which designs the Category bars, and the node titles and background colours within them.
    But it's all rather bulky - lots of sections of code per category.
    I also have some other sections that are bulky and belong all together.

    I would like to move such sections into another css file and use an include.
    But if I use Create Template I don't think that makes a css file?
    So how do I do that?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    Actually, yes, Create Template does allow you to create CSS files.

    You just append the name with .css

    Then, to include it, you would use:

    <xen:require css="yourtemplate.css" />
     
    Jake Bunce likes this.
  3. RobParker

    RobParker Well-Known Member

    Can you not include another CSS file in extra.css?

    I'm sure I read someone (Jake?) saying you could.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    Possibly.

    But when you consider that EXTRA.CSS is invoked on every page load it actually makes a lot of sense to only call the CSS you need on the pages you need.

    So if you have 200 lines of code relating to the thread list, what's the point in loading that on the forum list, member list etc.

    It's all minified and compressed, but the more that's in there the more that has to be processed and cached by the browser.
     

Share This Page