• i’ve previously edited the style.css of my wp theme (blaskan) to modify my blog, but now i’m learning how to use a child theme so that i can do these modifications correctly after updating the theme.

    i’ve created a child theme as directed on the codex but i don’t understand then how to incorprate my modifications ? i have tried copying the entire parent style.css file into the child theme and modifying it but i understand that this increases load time and sort of defeats the object of having a child theme.

    what i don’t understand is that if i’m only supposed to include the modified lines of the parents style.css in my child style.css how much of that code is needed ? i think i’m smart enough to know that just copying over the signle lines will not be enough … but don’t know how much i need for each change … please could someone help me or point me to a clear explanation for newbies ?

    thanks !

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey there markwebstar,

    How are you doing today?

    This is pretty simple with styles and child themes. What happens there is your child theme style.css is loaded after your parent theme style.css if that makes sense.

    Due to how CSS loading work (being loaded from top to bottom) unless there is more specificity in the selector or unless !important is being used, styles with same selectors that are being added at the end of the file will be the ones that will be displayed on your site. This basically means anything you add in your child theme style.css will work/override parent style.css code (if you just copy it and add different properties).

    I’ve also found a nice simple post for rules in CSS that you can find here: https://www.htmlhelp.com/reference/css/structure.html

    Hope this helps and happy holidays!

    Cheers,
    Bojan – WPMU DEV

    Thread Starter markwebstar

    (@markwebstar)

    Thanks for your help Bojan

    I finally seem to have worked it out through trial and error. It’s amazing how little clear information there is online regarding child themes for beginners. A big question for me was how much of each “instruction” is needed in the child theme for it to be effective – and it seems that it’s very little.

    Happy to hear that you’ve managed to set it up and glad I could help ??

    Cheers,
    Bojan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to edit style.css of child theme’ is closed to new replies.