desert flower

Being a newbie, there has been some head banging frustrations along the way, but with every obstacle there is always light at the end of the tunnel.

Common Causes of Sass Compiling Problems

I had to stop the server and restart it when…

Blank Element or Property

Leaving a property will cause the compiling to stop with or without an error. Error: Blank element

Blank Elements Commenting out property Empty property

Solution:

Comment the property entirely or delete.

Remove or comment out entire element

Syntax Error

Any CSS or Sass syntax error will stop the compiling process, so don’t forget the semicolons.

Solution:

Install Prettier to help with small and common mistakes.

@import partials

Importing as been a bit confusing for me but as I have learned the wrong and right way to handling partials in Jekyll and in a simple setup with just VS Code.

Visual Studio Code

Extension Install Requirements:

Error:

When using Live Server to preview your work in a browser and you also want to use Sass. The Live Sass Compiler extension is very helpful. A mistake that I had made when working with partials is that I didn’t have the underscore before the partial file.

Solution:

What I was trying to do is make a partial Sass with the header CSS (./sass/partials/header.scss) and then importing it into the homepage Sass file (./sass/homepage.scss).

When you are importing a file into another you must have a ‘_’ (underscore) in front of the partial file.

Jekyll Sass File Stucture Importing into another file

Note: the file extension is not necessary.

Another Example:

_base.scss imported into _header.scss files (note: base and header files are in the same folder).

Imporing one file into another that are not in the same folder

Conclusion:

To be continue…