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 WordPress Theme Development Working with CSS and JS in WordPress Themes Adding CSS to a Theme Via the functions.php File

Debby Beachy
PLUS
Debby Beachy
Courses Plus Student 2,096 Points

Why is styles.css not in the css folder?

I'm not sure why the style.css is outside the css folder in which we created? We have the other css files in the folder such as foundation.css and normalize.css why not style.css? Normally I would put all my css files in the folder.

Agustin Grube
Agustin Grube
39,278 Points

Styles.css is used by WordPress to override styles in the CSS. Wordpress also uses that file to find the name of the theme. It is one of the two min files required in a wordpress theme.

If you do all your work in the css files, then you will not really use that file other than providing WordPress with meta of your theme. If you plan to do sites for clients, then you will be / should be doing child themes and thats when this file will be handy.

Debby Beachy
Debby Beachy
Courses Plus Student 2,096 Points

Okay thanks Agustin for answering my question. I don't know if it was mentioned in the videos and I missed it or if I just didn't understand. Cheers db

1 Answer

Agustin Grube
Agustin Grube
39,278 Points

Styles.css is used by WordPress to override styles in the CSS. Wordpress also uses that file to find the name of the theme. It is one of the two min files required in a wordpress theme.

If you do all your work in the css files, then you will not really use that file other than providing WordPress with meta of your theme. If you plan to do sites for clients, then you will be / should be doing child themes and thats when this file will be handy.