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

Hooking the stylesheets #3

Open
DrRogg opened this issue Aug 15, 2012 · 5 comments
Open

Hooking the stylesheets #3

DrRogg opened this issue Aug 15, 2012 · 5 comments

Comments

@DrRogg
Copy link

DrRogg commented Aug 15, 2012

I couldn't work out why my scss files weren't getting processed, until I realized WP-SASS hooks into init, while my stylesheets were using wp_enqueue_scripts (and arriving too late). How would I compile the stylesheets if I kept using wp_enqueue_scripts?

@roborourke
Copy link
Owner

That's odd. It sets itself up on init and adds a filter that should be doing the processing at the point the style tag is being output. Can't get much later than that so I'm not sure what's up.. Does it work if you register the styles on init and then just enqueue in wp_enqueue_scripts?

@ankitsingh101
Copy link

ankitsingh101 commented Mar 29, 2017

i download file as a zip and unextract it plugin and downloaded phpsass file and paste it in phpsass folder

and

function wp_enqueue_sass_style(){
	wp_enqueue_style( 'style', get_stylesheet_directory_uri() . 'style.scss' );
}
add_action( 'init', 'wp_enqueue_sass_style');

in theme direcotry i created a new file style.scss
and keep the .css file

in function.php it's not working

@roborourke
Copy link
Owner

@ankitsingh101 if all the plugin dependencies are there then from your code it just looks like you're missing a slash before style.scss eg.

wp_enqueue_style( 'style', get_stylesheet_directory_uri() . '/style.scss' );

@ankitsingh101
Copy link

What if i want to put my sass files in my assets folder and generate my css file in root directory how can i achieve this?

@roborourke
Copy link
Owner

roborourke commented Apr 17, 2017 via email

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

3 participants