Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP-SCSS does nothing. No compile. No output. No error. No log. #45

Closed
dmxt opened this issue Oct 5, 2015 · 10 comments
Closed

WP-SCSS does nothing. No compile. No output. No error. No log. #45

dmxt opened this issue Oct 5, 2015 · 10 comments

Comments

@dmxt
Copy link

dmxt commented Oct 5, 2015

I'm using child theme, with directory structure:

child theme directory
└───assets
    ├───css
    └───scss
    │   main.scss

WP-SCSS settings:
Settings

After making changes to main.scss, it doesn't compile or update main.css

What is the problem here?

@crazypinger
Copy link

I'm finding the same behavior in MAMP running php 5.6.2 and WordPress 4.3.1.

The scss file is called site.scss and in the /css folder the site.css has this in it
/*# sourceMappingURL=site.css.map */

@crazypinger
Copy link

Sorry I figured out that I needed to add define('WP_SCSS_ALWAYS_RECOMPILE', true); in my functions file for it to work.

Thanks for the plug-in

@timbotcom
Copy link

I believe that causes the scss to recompile every time the page is loaded. Not a viable solution other than in dev.

From what I understand from the documentation, its supposed to know to recompile every time there's a change to any of the scss files in the sass folder...

@gavin310
Copy link

My theme doesn't use WordPress's standard head functions, so I had to edit the plugin. In wp-scss.php in the plugin's root folder, I changed:

add_action('wp_head', 'wp_scss_needs_compiling');

to

add_action( 'wp_loaded', 'wp_scss_needs_compiling' );

@shanecarmody
Copy link

@gavin310 solution worked for me, is this change going to be made in the plugin?

@brrn
Copy link
Collaborator

brrn commented Apr 9, 2018

We can look into this. Would wp_loaded be a better hook for the plugin to use by default?

@garrettw
Copy link
Contributor

garrettw commented Apr 9, 2018

Based on what I see here, I wonder if setup_theme might actually be the ideal hook to use. But of course, enqueueing stylesheets needs to go elsewhere.

@brrn
Copy link
Collaborator

brrn commented Apr 9, 2018

@garrettw that looks promising. It would ensure that the function fires every time, while also keeping it before theme load. We'll test this.

@smontoro
Copy link

Sorry I figured out that I needed to add define('WP_SCSS_ALWAYS_RECOMPILE', true); in my functions file for it to work.

Thanks for the plug-in

That worked for me too! Thanks!

@mdarmanin
Copy link

Guys, since recent update, my SCSS wasn't compiling anymore so after loads of time wasting trying to find out why, I found out that define('WP_SCSS_ALWAYS_RECOMPILE', true); was required for me too. Try to prevent this in future releases or at least add a setting in plugin to turn this on without searching half the net. Rigid testing may also help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants