Page does not load SCSS file

1

I'm learning web development and I started messing with SCSS in a layout but the browser is not pulling the same. It is being called together with the CSS file that is working normally on the page.

<link href="css/abert_painel.scss" rel="stylesheet">
<link href="../build/css/custom.css" rel="stylesheet">

Since the behavior of SCSS is being null and I get the following error message in the inspector:

Why does this occur? How can I resolve this problem?

    
asked by anonymous 15.06.2018 / 19:01

1 answer

1

In order to compile the .scss file for .css you need to have Ruby installed (this is one of the forms).

1. Check if you have already installed:

ruby -v

If something like:

  

ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]

Continue, otherwise see here how to install ruby .

2.Install the sass:

sudo gem install sass

3. Compiling

3.1 Static Mode:
This way every time you have a .scss change you will have to type the command line below to compile.

sass --update cssfilename.scss

or a directory:

sass --update /directory/

3.2 Dynamic:
That way any changes made in .scss are automatically converted to .css.

sass --watch sass cssfilename.scss

or a directory:

sass --watch /directory/
    
15.06.2018 / 19:35