Enqueue SCSS file in wordpress

I’m trying to enqueue a .scss file to my wordpress theme. I know nothing about SCSS. The reason here why I’m using a .scss file is, I needed to add some hovering animations in a css collection called ihover.

Its documentation says, if you need to include it in the production (Single effect or customized) just use necessary .scss files.

Read More

So, I tried to enqueue it just like normally enqueuing CSS files, but looks like it’s not working.

So, is there any special way to do it ?

And can I covert those SCSS to normal CSS ?

Thanks!

Related posts

1 comment

  1. SCSS is used by Sass (it’s a CSS preprocessor). You will need to compile the SCSS into CSS. There are a number of utilities to do that.

    For iHover specifically, you probably should use the CSS in the src folder (https://github.com/gudh/ihover/blob/gh-pages/src/ihover.css).

    Basically, the client > styles folder is if you need to edit the styles/override with your own or make your own.

    If you need a compiler tool, you can download ones like http://koala-app.com/ or http://mhs.github.io/scout-app/.

    Navigate to client > styles and load the ihover.scss in to be compiled and that will compile all of the effects through @import. Anything else that is referenced to be imported in those scss files will also compile.

    There are WP plugins to do this (https://wordpress.org/plugins/wp-scss/), but I prefer compiling locally.

Comments are closed.