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

XF 1.4 EXTRA.css

Discussion in 'Styling and Customization Questions' started by Valhalla, Oct 2, 2014.

  1. Valhalla

    Valhalla Well-Known Member

    I have various CSS elements in EXTRA.css that would be unnecessary to load on every page.

    By default XenForo only loads the CSS it needs to render the particular page (attachment, title_prefix_edit, etc.)

    How could I achieve the same thing only editing EXTRA.css?

    For example, the following (from my EXTRA.css) is only required on the thread_reply page, nowhere else.

    Code:
    /* thread_reply */
    
    .thread_reply .xenForm .ctrlUnit.surplusLabel
    {
        margin-top: 0px !important;
    }
    
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Whatever you add to EXTRA.css will be included, regardless of how you structure the selectors.

    If you are concerned about only loading CSS on the pages it is required on (and you shouldn't be as it is entirely negligible), edit the relevant CSS template instead.
     
  3. Valhalla

    Valhalla Well-Known Member

    Thanks, Brogan.
     

Share This Page