2

I am using Netbeans 8.0 to edit my HTML, PHP, and CSS. Just today I have installed SASS and enabled it within Netbeans. I am developing on Ubuntu, and Ruby and Sass are both available in the repositories, so I installed them and Netbeans found the SASS executable with the click of a button. So, I assume it's all working.

I have created a file called style.scss, and put in some test colour variables and a dummy #test id.

My understanding was that when I saved the .scss file that it would get processed and a .css file with the same name, in this case style.css, would get created. Or updated if it already existed.

Is this not the case? I did see other SASS and .css file generation questions here on Stack Overflow, but I didn't see one specific to Netbeans, so I'm not sure if there's something I haven't set up correctly in my environment. Also, I don't need to upload to a server when saving, I am just testing and developing locally.

How do I actually generate a .css file from my .scss in Netbeans 8.0?

Questioner
  • 7,133
  • 16
  • 61
  • 94
  • I've removed my answer (sorry, I seriously misread your question). If you've followed all the steps in the documentation and you still don't get CSS files in the output directory, I'm out of ideas. – Álvaro González Apr 29 '14 at 10:39
  • Editing the bat file helped me get NetBeans to compile SCSS: https://stackoverflow.com/a/49887849/470749 – Ryan Mar 28 '20 at 15:23

1 Answers1

4

Right click on the project -> Properties -> CSS Preprocessors

You have to set an input folder, for example /scss, and an output folder like /css

And there is a checkbox "Compile Sass files on save".

For Compiler options " --style compact " can be useful.

This was working for me in NB7.4, but in 8, something happened... The plugin page says, it's currently incompatible with 8.

http://plugins.netbeans.org/plugin/34929

UPDATE: My scss folder was wrong... So it's working in NB8. Look @ the project settings, and separate your .scss and .css files in two folder, the default folders are /scss and it converts files to /css folder

Tommy at LIW
  • 864
  • 6
  • 4
  • I've discovered that you can keep them in the same folder if you want, by specifying the same path in both the input and output fields. Also, side note, what was tripping me up before was not realising that one had to specify paths at all. Since the default folder names in the Sass options are `/scss` and `/css`, I thought those fields were for specifying file extensions, and that it would then look for all `.scss` files in the project. I just didn't notice they had forward slashes on them, indicating they were directories. – Questioner May 07 '14 at 03:12