Are there any caveats to compiling all of my theme's SCSS into the style.css file in the theme root?
I work in WordPress development and I've always been told by more seasoned WP devs to compile my theme SCSS into a separate style.css
file, typically into a sub-directory like assets/css/style.css
.
Today however I read an interesting article on SitePoint where they talk about compiling their SCSS directly into the style.css
file in the theme root directory (ensuring cssnano preserves the opening block comment meta), removing the need to enqueue a separate CSS file.
Additionally, on the WordPress Codex page for Theme Development it reads:
In addition to CSS style information for your theme, style.css provides details about the Theme in the form of comments.
There is no mention in the entire codex page about needing to separate your styles into another CSS file and enqueuing it via functions.php
.
My question: Are there any caveats to compiling all of my theme's SCSS into the style.css
file in the theme root?
Topic sass wp-enqueue-style theme-development Wordpress
Category Web