CSS and Child Themes

This may be a very stupid question...One of my sites runs on a pretty bulky theme. The more I get into CSS in general, the more I like controlling the site via style.css, and the less I enjoy the Theme Options panel of my theme. The problem is that the Child theme CSS contains only an import link from the parent theme. Can I copy/paste the Parent CSS into the child theme, and remove the import link? If so, can I make my style.css override the Theme Options customizations and will whatever changes I make in the child css override the parent css?

  • Ash

    Hello @Josh

    I hope you are well today and thanks for asking the question.

    Can I copy/paste the Parent CSS into the child theme, and remove the import link?

    Yes, you can :slight_smile: But you need not to.

    For example, you have the following in your parent theme:

    p{
    color: red;
    }

    You want to make it green. Then in your child theme css write the following:

    p{
    color: green;
    }

    So, you need to write the same css with your changes. If it still doesn't work, then force it like:

    p{
    color: green !important;
    }

    Just adding "!important".

    You can add this in a child theme, or using a plugin like My Custom CSS.

    If there are small changes, I prefer custom css plugin. If your child theme is active, then you can write css using customizer as well.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.