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

Not a Bug Edited one CSS template, it's not turning red!

Discussion in 'Resolved Bug Reports' started by Etchel, Sep 20, 2013.

  1. Etchel

    Etchel Member

    Whenever you edit a template, it should turn red to know that you modified the file and so you can revert it. but mine is not. Something you want to look at.. I was editing the xenforo_sections.css.

    this is from the 1.2.1 release.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Works for me:
  3. Etchel

    Etchel Member

    Mine is not I edited the subheading part and it's not turning red. I wonder what did I do wrong.

    you can see the difference in my website www.avcsgroup.net then here's the screenshot of my template section. I edited the #subHeading to be accurate. I feel like I have to do manual on mostly all of my suspected edited templates that was not possibly edited.. *cries*[​IMG]
    Last edited: Sep 20, 2013
  4. Mike

    Mike XenForo Developer Staff Member

    You probably edited a style property within the template. Nothing to worry about.
  5. AndyB

    AndyB Well-Known Member

    What is a "style property within the template" ??
  6. AndyB

    AndyB Well-Known Member

    Hi Etchel,

    Did you know that you can avoid editing CSS templates by putting all you CSS code changes into EXTRA.css template.
  7. Chris D

    Chris D XenForo Developer Staff Member

    There's nothing wrong with just editing CSS templates really.

    The template merge system will help you handle any conflicts caused as a result of an upgrade.

    That being said, there's nothing particular wrong with just using EXTRA.css either. My only thought about EXTRA.css is what if you have thousands of lines of CSS where only a subset of that EXTRA.css is actually needed for each page.

    EXTRA.css might contain a hundred lines of CSS for the thread view, but then that is then loaded on every other page too. Seems a little unnecessary to me... albeit probably a small impact on performance.

    Either work fine. At least we have the choice :)
    MagnusB and shenmuee like this.
  8. MagnusB

    MagnusB Well-Known Member

    @Chris Deeming, you also need to calculate the redundant CSS. If you have 900 lines of CSS in extra.css overwriting default css, you basically have 900 lines in the standard templates that are no longer needed. I get the point of extra.css, but in my opinion it should be avoided unless absolutely necessary, or you are adding in things that are not covered by the default templates.
    Chris D likes this.
  9. Etchel

    Etchel Member

    Thank you for all the answers. So @Chris Deeming was correct. I upgraded my forum from 1.1 - 1.2.1 so the result ended up like this. Now I'm transferring all my edited templates on the EXTRA.css to prevent future problems when I upgrade my forum. My only worry is what @MagnusB said. As I'm editing a lot of templates. This could also affect the performance and loading speed of my website. It might not be that big but still we love if the website loads below a second.
  10. Chris D

    Chris D XenForo Developer Staff Member

    No, I think you may have misunderstood Magnus' point.

    What you're doing is now better than using EXTRA.css.

    If you've got all of the default CSS, and let's exaggerate and you change every single CSS property and put it into EXTRA.css, the end result is when pages load all of the default CSS loads then all of the EXTRA.css loads. Each page load is now doing twice the CSS calculations and the CSS is way over twice the size for each page. And to make matters worse, as EXTRA.css is global, you're adding a load of CSS to each page that probably isn't relevant.

    So, you're probably doing the right thing. Just edit all of the default CSS you need to suit.

    The end result is, if XenForo ever changes any of that CSS, your CSS will become outdated and you'll be prompted to merge the changes. Some merging may cause conflicts but they are displayed on the screen and easy to resolve.
    Etchel likes this.
  11. AndyB

    AndyB Well-Known Member

    Even if you put thousands of lines of code into EXTRA.css, the speed difference would be about .001 seconds difference in page load. IMHO it's far better to place all your CSS overrides into EXTRA.css and not deal with template merges at upgrade time.
  12. Brogan

    Brogan XenForo Moderator Staff Member

    There are pros and cons to both approaches.

    Editing the CSS templates means you will be notified of any changes to the templates.
    Using EXTRA.css means you won't.
  13. Jeremy

    Jeremy XenForo Moderator Staff Member

    It might be relatively nominal for you, Andy, but page load speeds are based on many different factors and depending on the browser, editing templates may be more efficient. Both approaches are valid.
  14. Etchel

    Etchel Member

    I prolly would go with EXTRA.css for a much easier upgrade versatility. I don't need to worry with template merges. This is what I learned as I design my forum for the past few weeks.

Share This Page