WordPress.org

Ready to get started?Download WordPress

Forums

modifying plugins stylesheet (4 posts)

  1. staceyzav
    Member
    Posted 2 years ago #

    Hi -
    I know the proper way to modify a theme's stylesheet is via a child theme. What is the best practice for modifying a plug-ins styleheet? I have tried to modify the style on the child's themes style sheet but the changes don't take. I don't want to modify the plugin's styleheet as the changes will get overwritten in an update.

    Thanks!

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Ideally, you would need to choose your CSS selectors carefully, so that your theme's CSS over-rides the plugin's. If that still fails, use the !important rule.

  3. staceyzav
    Member
    Posted 2 years ago #

    The plug in always chooses the selectors, I think.

    I've been told the !important rule is not best practice (is that true)? Is there a way to override the style sheet with my main theme's sheet, like I do with the child theme style sheet?

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    The plug in always chooses the selectors, I think.

    Sorry? I don't follow. You can add whatever CSS you want to your child theme's stylesheet.

    (is that true)

    Generally, yes but it's there for exactly the kinds of situations, so it wouldn't be contrary to best practice here.

Topic Closed

This topic has been closed to new replies.

About this Topic