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 trial

WordPress

Chaopin Wen
Chaopin Wen
509 Points

style.css child theme

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 */

What 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

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi Chaopin! I've moved this to the WordPress category as I believe it to be a better match than "General Discussion". :sparkles:

1 Answer

Steven Parker
Steven Parker
231,269 Points

None of what you show here is actual CSS code.

The actual code is the line that comes after the comments (on line 11 in the video):

@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.