You should be adding CSS/LESS to a file named assets/less/main.less
and undo any changes you made regarding main.css
and scripts.php
.
The reason you see a file called assets/css/main.css
is because Roots 7.0’s new Gruntfile.js
specifies two sets of JS/CSS assets for Grunt to build: one set is minified for use on live sites (e.g., main.min.css
and scripts.min.js
) and a second set is not minified for development and debugging purposes (e.g., main.css
and scripts.js
). If you define the WP_ENV
variable as described a few posts up then Roots will use the unminified assets, otherwise it will use the minified assets.
So when you added CSS to main.css
you were adding styles to a file that Grunt is, by default, set to overwrite during its build process.
Your CSS and LESS styles belong in assets/less/main.less
and there is no need to change your scripts.php
at all.