Open DrRogg opened 12 years ago
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?
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
@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' );
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?
You only need to enqueue a single sass file as an entry point, then you would import your other sass partials from wherever you want them.
To be honest unless you're using the features like variable filtering I'd probably go with grunt / gulp / something built in to a code editor these days. On Sun, 16 Apr 2017 at 15:48, ankitsingh101 notifications@github.com wrote:
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?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/roborourke/wp-sass/issues/3#issuecomment-294355587, or mute the thread https://github.com/notifications/unsubscribe-auth/AABbeVWhSvCU_700Z0ynyIMYVBhl7_poks5rwipVgaJpZM4AHGMv .
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?