[Resolved] Excluding CSS Code in Additional CSS

Home Forums Support [Resolved] Excluding CSS Code in Additional CSS

Home Forums Support Excluding CSS Code in Additional CSS

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1399211
    Rizki

    Hi team,

    I have 2 questions,

    1. I use a child theme, and if I wanted to add custom CSS code, I would write it in Appearance > Customize > Additional CSS. Is it already correct ?

    2. If I want to exclude that custom CSS code in a plugin, what CSS file name / URL should I write ?

    Thanks.

    #1399336
    Leo
    Staff
    Customer Support

    Hi there,

    1. That would work. Or you can use the style.css file in the child theme since you are already using one:
    Adding CSS: https://docs.generatepress.com/article/adding-css/

    2. Not sure if I fully understand but it doesn’t sound like it’s theme related.

    You’d basically need to use the CSS selector to exclude your CSS from applying to certain plugin elements.

    #1399438
    Rizki

    Hi Leo,

    1. Which is the best, adding in the style.css file in the child theme or in the additional css section? Or is it the same?

    2. When I logged in, the css codes that I made were still http://prntscr.com/tyizy8. When I logged out & the cache plugin worked, the css code was missing ( ctrl + u ) / minified / something like that ( check my site URL ).

    I use Swift Performance Lite. I’ve done the configuration, and the results are quite good. But I have a problem with custom css code that I made. So I think the solution is to exclude some of that CSS code http://prntscr.com/tyj1lr. Is that the correct idea?

    Or how do I exclude it ? Because only some css code doesn’t work. For example this :

    .site-footer {
    margin-top: 30px;
    }

    The code works on the front page, but doesn’t work on articles and pages.

    #1399453
    Leo
    Staff
    Customer Support

    1. I would go with style.css in the child theme if you are already using it.

    2. So everything works without Swift Performance? If so have you checked with the plugin support?

    Am I missing something here?

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