WordPress WordPress Theme Development Working with CSS and JS in WordPress Themes Adding CSS to a Theme Via the functions.php File

Debby Beachy
PRO
Debby Beachy
Pro 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
Pro 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.