CSS placement

jjespjjesp Registered Users Posts: 21 Big grins
edited August 5, 2016 in SmugMug Customization
As fairly new to CSS customization on SmugMug, just a little question.

Where is the best way to place your CSS code? At first I just put my CSS in a placeholder on the entire site. Now I have moved it to the theme instead. Is this fine?

I think that every customization regarding UI should be placed in the theme? And other more site specific on the entire site (and page specific code on the individual pages).

Are there any pros and cons?

Thanks in advance.
Jan Jespersen Photography
http://www.janjespersenphotography.dk

Comments

  • Hikin' MikeHikin' Mike Registered Users Posts: 5,467 Major grins
    edited August 4, 2016
    I put mine in my theme's mainly because I'm used to customizing WordPress...that's how they do it. I have some CSS that I've placed into "Just this page" for my tutorials.
  • pilotdavepilotdave Registered Users Posts: 785 Major grins
    edited August 4, 2016
    jjesp wrote: »
    As fairly new to CSS customization on SmugMug, just a little question.

    Where is the best way to place your CSS code? At first I just put my CSS in a placeholder on the entire site. Now I have moved it to the theme instead. Is this fine?

    I think that every customization regarding UI should be placed in the theme? And other more site specific on the entire site (and page specific code on the individual pages).

    Are there any pros and cons?

    Thanks in advance.

    There's no single answer but I'd recommend putting it where it's most applicable and easiest to find. It's easy to lose code when it's all lumped together in one place.

    For me, code that applies to the entire site goes into the theme, but code that is applicable to galleries goes into a CSS content block in all galleries. Same with all folders, etc. Code only applicable to a particular page goes in a content block on that page.

    The other reason to use CSS content blocks instead of theme CSS is it's a lot quicker to get to. It takes a lot more clicks to get to theme CSS. I have continually moved code out of there over time because of that annoyance.

    Dave
  • jjespjjesp Registered Users Posts: 21 Big grins
    edited August 5, 2016
    Thank you Dave and Mike! I agree with you. Just curious if there were some traps when placing the css.
    Jan Jespersen Photography
    http://www.janjespersenphotography.dk
Sign In or Register to comment.