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

Benefits of using EXTRA.css for everything?

Discussion in 'Styling and Customization Questions' started by Luxus, Jun 18, 2012.

  1. Luxus

    Luxus Well-Known Member

    While working with TMS I had to search multiple times for CSS classes to find out in what templates they are. I'm thinking of putting all CSS modifications I made into this one EXTRA.css file, but I would like to know if this might be a bad idea because this file would get really really big I suppose?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That's not a problem.
     
  3. Luxus

    Luxus Well-Known Member

    So do you recommend to have css files untouched and only work with the EXTRA.css?
     
  4. CyclingTribe

    CyclingTribe Well-Known Member

    The benefit of putting your changes into EXTRA.css is that it isn't changed during upgrades - so unlike template changes, which can be overwritten (or need re-applying) - your changes in EXTRA.css will stick. (y)
     
  5. Russ

    Russ Well-Known Member

    For my personal styles I use extra.css for just about everything. I try to use the style properties as much as Ican too but I've found the amount of detail I put into certain things the style properties can be limited.
     
    Shelley likes this.
  6. Luxus

    Luxus Well-Known Member

    But I am using TMS, which means my modifications won't be overwritten by updates anyway.
     
  7. Russ

    Russ Well-Known Member

    TMS I use directly for non-css edits, then for actual css changes I use extra.css // style properties. I guess either way works
     
  8. Luxus

    Luxus Well-Known Member

    Lets say my EXTRA.css is 10MB big (just hypothetically) and browser caching disabled. This means that on ANY page visit that has CSS modifications the whole 10MB of the EXTRA.css is downloaded automatically, right?
     
  9. Chris D

    Chris D XenForo Developer Staff Member

    EXTRA.css would never be 10MB big. No point even considering it hypothetically.

    The total sum of the XenForo CSS files is no more than 1MB so even if you replaced every CSS class there is in EXTRA.css you'll only add an extra 1MB onto the size.
     
  10. Luxus

    Luxus Well-Known Member

    So it would download the whole 10MB, rather than only pick up the CSS rules that are needed for the current page?
     
  11. Chris D

    Chris D XenForo Developer Staff Member

    Technically, if it was 10MB, then yes.

    If this concerns you then consider creating your own CSS files and then call them in your template modifications.
     
  12. Luxus

    Luxus Well-Known Member

    Nah, I'll stick with TMS edits then. It's a bit more work, but this way only needed CSS files are downloaded, preventing for instance guests from downloading the CSS for the quick reply box and other things that they are not supposed to see.
     
  13. CyclingTribe

    CyclingTribe Well-Known Member

    The size/impact would be minimal - why create extra work for yourself? And what harm is there in guests seeing CSS values?
     
  14. Luxus

    Luxus Well-Known Member

    Because I am an optimatization whore :p
     
  15. Panupat

    Panupat Well-Known Member

    What TMS?

    Most other templates you'll have to revert them when you upgrade. Which resets every modification you've made. I've done it in the past for the same reason - optimization. But after 3-4 upgrades . . . you know the story.
     
  16. Shelley

    Shelley Well-Known Member

    EXTRA.css is my home when I style. :p There are some stuff in the style properties I make use of but like yourself the extra.css template is where I make 99% of my alterations for the exact same reason you just mentioned.
     
    Russ likes this.
  17. Russ

    Russ Well-Known Member


    Best resource out there to date :), check the resource manager, it handles all of your template modifications as if you're doing them through an addon, as in you're not directly editing the templates :)
     
    Panupat likes this.

Share This Page