Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.