[Resolved] How to deal with a lot of CSS

Home Forums Support [Resolved] How to deal with a lot of CSS

Home Forums Support How to deal with a lot of CSS

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1611184
    Kevin

    Hi there,

    I have three general questions, all about how to deal with CSS. I hope that’s fine.

    First, I was wondering at which point it is better to use a child theme. I am constantly changing the layout of GP with CSS. Right not it’s about 200-300 lines of CSS code. While this is not that much, it will certainly increase over time. Though, GP’s documentation states: “if all you’ll be doing is adding CSS or PHP, a child theme probably isn’t necessary.” Is this true for any code length?

    Secondly, I created some alert boxes, tables, info boxes… in html. All of these require CSS for styling. Is it good practise to add all of this CSS to “additional CSS”?

    Thirdly, I need some CSS to only apply on a specific page or post. What is good practise here? It probably is not a good idea to put all the CSS in “additional CSS” (which is ecactly what I am doing right now). Is using a metabox like the one offered by the plugin simple CSS the solution? Or perhaps separate CSS files that are loaded into the page?

    Thank you for the support and keep up the good work,
    cheers!

    #1611207
    David
    Staff
    Customer Support

    Hi there,

    200 – 300 lines is not an issue – once you start getting closer to 500 – 600 lines then you may want to consider a Child Theme for the styles.

    As you’re using the Simple CSS plugin then i would suggest you use that for all your CSS, no point having it split in two. This includes the CSS you require for your Custom HTML elements.

    Simple CSS Meta box is the simplest way to go for adding page specific CSS.

    #1612008
    Kevin

    Thanks David, I appreciate your help!

    #1612011
    David
    Staff
    Customer Support

    You’re welcome

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.