[Resolved] Should I Move To A Child Theme? Custom CSS Grown To Over 600 Lines

Home Forums Support Should I Move To A Child Theme? Custom CSS Grown To Over 600 Lines

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #896528
    Simon

    Hey Guys,

    Just a really quick question. From what I have read and understood, integrating a child theme seem simple and straightforward. Honestly I don’t see any disadvantage to doing it re performance or anything?

    My custom CSS styles have gradually been growing and I am now looking at over 600 lines of custom CSS in the wordpress “additional css” section under appearance.

    I have a feeling it would be best for me to move this to a child theme now right? There are performance advantages to doing that at this size, if I am not mistaken?

    Thanks in advance.

    Cheers,
    Simon

    #896630
    Tom
    Lead Developer
    Lead Developer

    Hi Simon,

    The main advantage is that the child theme will add a style.css file to your website which can hold your CSS. Since it’s a static file, your browser will cache it. CSS output in the <head> (like Additional CSS) isn’t cached by the browser.

    There shouldn’t be any disadvantages to using a child theme (other than the extra HTTP request).

    #896700
    epickenyan

    Hi Tom. So even CSS in your simple CSS plugin isn’t cached?

    #897028
    Tom
    Lead Developer
    Lead Developer

    Since the CSS is in the database, WordPress caches it. In small amounts, something like Simple CSS is better for performance than an additional HTTP request with minimal CSS.

    #897118
    Simon

    Thanks Tom,

    Moving to the child theme was sooo easy.

    Cheers,
    Simon

    #897213
    epickenyan

    So, Tom, you recommend simple css plugin over the customizer>additional css? But I only have like 150 lines of minified css code.

    #897223
    Leo
    Staff
    Customer Support

    Simple CSS and Additional CSS are basically the same – Simple CSS was created well before WordPress added Additional CSS field.

    I personally still like Simple CSS better as I prefer the editor (colors) over Additional CSS.

    #897787
    FunkyCss

    I am lurker on this topic cause it makes me interested as well ,

    I am puting day by day new CSS to my GP site , and i am thinking of jumping in a Child Theme as well,

    I have seen a BETHEME site ( lol ) that is a child theme , and is Super Fast ! and i am thinking what is the best practise as well for my site .

    #897921
    David
    Staff
    Customer Support

    Hi there,

    Child Themes are only necessary if you’re editing theme templates or adding a lot of CSS or custom functions. If you think you’re going to being doing lots more customizations then yes installing a child theme and moving any CSS or PHP functions to that are the best way forward. We provide details on how to here:

    https://docs.generatepress.com/article/using-child-theme/

    #898234
    epickenyan

    So I assume if CSS in the additional CSS area is not cached, then the css in simple CSS plugin is also not cached as well?

    #898235
    Leo
    Staff
    Customer Support
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.