Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you know what line contains a SCSS error when using @import in rails application manifest?

I am using Rails 4, sass-rails 4.0.2 and my application.css.scss file looks like:

@import 'foundation_and_overrides';
@import "font-awesome";
@import "vendors/*";
@import "layout";
@import "modules/*";

However, I am getting an undefined mixin error as follows:

Undefined mixin 'box-shadow'.
(in C:/Rails/austin_residence/app/assets/stylesheets/application.css.scss:4)

The problem is I do not know how to debug this since the error is reporting css lines from the application manifest file instead of the actual @import file containing the error. How do people deal with this?

like image 594
user3009816 Avatar asked Apr 13 '14 18:04

user3009816


People also ask

How to find error in scss file?

A quick way to find errors in CSS code is to install the Web Developer tool bar add-on and use the validator through the tools drop down.

What does __ mean in SCSS?

The underscore lets Sass know that the file is only a partial file and that it should not be generated into a CSS file. Sass partials are used with the @import directive.


1 Answers

Start commenting out the @imports in your application file. When you don't see the error anymore, its probably in the file you stopped importing.

like image 181
Jesse Avatar answered Oct 08 '22 17:10

Jesse