I recently got Sass and WAMP up and running on my new PC and started working on a new WordPress-site at my localhost.
But then i noticed that WordPress is loading the .SCSS file even though I have enqueued the CSS-stylesheet like this in my functions.php:
function theme_primary_css() {
wp_enqueue_style( 'theme-styles', get_template_directory_uri().'/css/theme-styles.css' );
}
add_action( 'wp_enqueue_scripts', 'theme_primary_css' );
I can see the theme-style.css is loaded succesfully when I look at the site's source code. But when looking in Web Developer Tools I can see it loads the CSS from the .SCSS file. What's going on?
It may be great for debugging etc. - but I have a problem when using nested styles like this:
h1 {
.entry-title {
margin-top: 0px;
}
}
This style isn't working - probably because it is loading the .scss file - but at the same time my variables set in .scss works fine (even though it loads the .scss and not the .css file - the 30px you see in the picture is actually a variable). I'm pretty confused!
By the way I am using Brackets with an autocompiler installed (which works perfectly).
I hope someone can help me out!
Thanks in advance!