[Support request] How can i reduce the size of custom CSS?

Home Forums Support [Support request] How can i reduce the size of custom CSS?

Home Forums Support How can i reduce the size of custom CSS?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1565330
    Gaurav

    Hi,

    I want to reduce the size of custom CSS from the theme.

    Like right now I have added some additional CSS codes from the theme customization option.

    But i want to add these css codes to the theme editor by editing css files of the theme.

    So that it doesn’t affect my website speed.

    Site URL: https://howtechhack.com/

    Thanks.

    #1565358
    Elvin
    Staff
    Customer Support

    Hi,

    You can try either:

    Manually copy the CSS in your Additional CSS in the customizer and then place it back in minified format.

    Or,

    Get a plugin that does that for you. Optimization plugins usually does the job as they minify, aggregate (combine all CSS into 1 file) and cache it.

    #1565369
    Gaurav

    Hi Elvin,

    Thanks for the reply i am already using the optimization plugin and CDN also and minify CSS, js are checked.

    But i don’t want to use additional css instead i directly want to make changes to my theme.

    Is it possible?

    Thanks.

    #1565527
    David
    Staff
    Customer Support

    Hi there,

    i am only seeing a few lines of CSS in your Additional CSS. Moving that inside a stylesheet would have no noticeable performance improvement. If you had 100’s of lines then i would say otherwise.

    Most cache plugins have an option to aggregate inline CSS which would move it into the combined CSS cached file.

    #1565625
    Gaurav

    Hi David,

    Thanks, i got it but can you tell me for the future case if I get a 100’s of line then where to put in the stylesheet and how?

    Thanks

    #1565944
    David
    Staff
    Customer Support

    You would need to install a Child Theme and add your CSS to the child themes style sheet. More info on child themes here:

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

    #1565976
    Gaurav

    okay, thanks for the info.

    #1566016
    David
    Staff
    Customer Support

    You’re welcome

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