CSS optimization

ArmadilloArmadillo Registered Users Posts: 31 Big grins
edited February 11, 2016 in SmugMug Customization
As part of my redesign I have lots of extra CSS, and I'm wondering if there is any benefit in putting all of my CSS into the "theme CSS" which applies to the whole site.
SM seems to use multiple CSS files, so my thinking is all the extra CSS on each page is another file to load. If I can combine all of my CSS into one file it *might* save a few seconds of load time & render time.
Or am I over thinking this?
:dunno

Comments

  • Hikin' MikeHikin' Mike Registered Users Posts: 5,467 Major grins
    edited February 9, 2016
    I put ALL of my custom CSS in my custom theme CSS mainly because I'm just used to working with one file. Having several CSS files does take extra time, although it's more like milliseconds.
  • AllenAllen Registered Users Posts: 10,013 Major grins
    edited February 9, 2016
    You can put all your CSS in "entire site" or theme. But it can become very confusing when you
    start applying to specific areas/widgets. And if you change themes you lose it without transferring
    to new theme and removing CSS rules that affected the old theme.

    I put CSS that applies to every page in "entire site"
    CSS that only applies to folders in "all folders"
    CSS that only applies to galleries in "all galleries"
    Pages are already "Just This Page" so CSS goes in "Just This Page"
    Or any other gallery/folder made "Just This ..." in "Just This ..."
    Homepage CSS goes in "Homepage" CSS

    Makes it a lot easier finding specific rules affecting specific areas.
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • ArmadilloArmadillo Registered Users Posts: 31 Big grins
    edited February 11, 2016
    The more I look at SM code I wish we could edit it directly. I learned html & css back in dial-up days, and I'm amazed at the inefficient and redundant SM code. Empty div's, etc. Heck the Roboto font is loaded even though I'm not using Roboto.
    Back in the day we wrote fast lean code optimized for a 56K connection. Now I sound like a grumpy old man- "Young whipersnappers wasting all that bandwidth, dagnabbit." LoL
Sign In or Register to comment.