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 trialChaopin Wen
509 Pointsstyle.css question
Why all the code in the style.css sheet below are commented out but is still readable by program?
/* Theme Name: Twenty Thirteen Child Theme URI: http://http://wordpresstreehouse.com// Description: Child theme for the Twenty Thirteen theme Author: Zac Gordon Author URI: http://wp.zacgordon.com/ Template: twentythirteen Version: 1.0 */
4 Answers
Steven Parker
231,269 PointsNone of what you show here is actual CSS code.
I believe you will find the actual code occurs after the comments.
Chaopin Wen
509 PointsWhat I mean is in "how to make child themes" course start from 2:05. Zac talked about creating child theme and I am wondering why the code in style.css file is still readable by program even though it is commented out. Please see the course below.
https://teamtreehouse.com/library/how-to-make-child-themes-2
Steven Parker
231,269 PointsThe actual code is the line that comes after the comments (on line 11):
@import "../twentythirteen/style.css";
This line actually loads in more code from another file.
But while the comments in this file don't affect the CSS itself, they do have meaning to the Wordpress framework. For more information about that aspect of the file see this discussion of the theme stylesheet in the Wordpress documentation, which was suggested by Jason Anello.
Yusuf Sibila
1,068 PointsI'm not sure what you mean?
Chaopin Wen
509 PointsWhat I mean is in "how to make child themes" course start from 2:05. Zac talked about creating child theme and I am wondering why the code in style.css file is still readable by program even though it is commented out. Please see the course below.
https://teamtreehouse.com/library/how-to-make-child-themes-2
Chaopin Wen
509 PointsThank you for your answer, but if is what you say that the actual code comes after the comments, I tried so when I deleted the comments then the child theme will not been created, it will have error.
Steven Parker
231,269 PointsThe comments do have meaning to Wordpress itself. See my addition to my previous answer.
Chaopin Wen
509 PointsThank you! Your addition link answered my question.
Chaopin Wen
509 PointsChaopin Wen
509 PointsWhat I mean is in "how to make child themes" course start from 2:05. Zac talked about creating child theme and I am wondering why the code in style.css file is still readable by program even though it is commented out. Please see the course below.
https://teamtreehouse.com/library/how-to-make-child-themes-2