Jekyll and Scss having undefined variables on imported files

Viewed 673

Upon running bundle exec jekyll serve I get the error

Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss':
                Undefined variable: "$grey-color". on line 17

In my main.scss file, $grey-color is defined

--- snip ---

$grey-color:       #37474F;
$grey-color-light: #fefefe;
$grey-color-dark:  #5e5e5e;

--- snip ---

/ Import partials from `sass_dir` (defaults to `_sass`)
@import
    "base",
    "cards",

--- snip ---

and at the bottom of the file, imports _base.scss from the _sass folder, where it errors out at line 17 which is background-color: $grey-color; I know it's erroring out because if I change it to a hex color (ex #FFFFFF) it errors out on the next variable usage.

Why aren't my imports getting access to the variables defined in main.scss?

0 Answers
Related