Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialknut2
1,735 PointsWhat is the difference of child theme with @import ../ and child theme with function.php?
Hi on the link to the video "how to make a child theme" the link in teachers notes http://codex.wordpress.org/Child_Themes ( an explanation of child themes on the wordpress codex) has an added step then shows in the video...
It would be nice to have some note from the team house tree to explain the difference... Is it possible to explain what the difference between the two methods are and why they are used?
2 Answers
Nattapol Kamolbal
15,528 PointsThis video isn't updated. Now, the codex said that "@import" is no longer the best practice so you should enqueue the parent css with function..php instead.
I think that the reason to use enqueue code is for more efficiency. For importing, browser will need to finish downloading the first css and then it said that you need to download the second. For enqueuing, browser can download two files at the same time so it is faster.
knut2
1,735 PointsThank you!