Welcome to the Treehouse Community
Looking to learn something new?
Is this video out of date?
As someone has pointed out in the answer to another question below, it seems that the method shown here for creating child themes is now out of date. The new method is outlined in the codex here: https://codex.wordpress.org/Child_Themes. I was wondering if Treehouse has any plans to update this video (I've tried following the codex, but as my parent theme has multiple css files, it suggests I need to "maintain all of the Parent Theme dependencies" in a functions.php file. As I don't yet know PHP I have no idea what this means or how to do it!).
Also, I wondered if it is OK to still follow the old method using @import for now, even though the codex is says it is no longer best practice. Are there any implications of doing this that people should be aware of. I haven't found much on Google.
Many thanks! Caroline
Bob Sutherton20,160 Points
Maintaining the parent theme dependencies is just a fancy way of saying to import ALL of the parent's CSS files into your child theme. You said your parent theme has multiple CSS files so you will want to make sure your child theme gets them as well, otherwise your child theme would not have the styles you leave out.
@import is, like you said, not considered a best practice. It appears to have something to do with site speed. Here are some links.
That second link compares @import with the <link> tag which isn't really germane here but I just think it's about pagespeed. So the recommended way is to do it through functions.php as you noted. It's really a good thing to know how to do and not that PHP intensive. Of course, since you don't know PHP it's going to seem confusing but if you follow along with an instructional video you can do it.
In the 'WordPress Theme Development' course Zac does use the new method and in some other places as well such as the Workshop video where he is showing you how to integrate a Zurb Foundation site with WordPress.