Skip to content

Commit

Permalink
Stop using Sass glob importing
Browse files Browse the repository at this point in the history
Glob importing is a feature of sass-rails. It makes for cleanly and
easily importing lots of partials, but it completely hides Sass errors.

For example, when you miss a semicolon and your Sass doesn't compile,
using glob imports with sass-rails you simply see an application error:
"We're sorry, but something went wrong."

But when using standard Sass imports, this error is an actual syntax
error, which provides helpful messaging ("Invalid CSS after…"), and
traces back to the source where the error was introduced.
  • Loading branch information
tysongach committed Mar 27, 2017
1 parent fe1c03b commit fec2559
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions app/assets/stylesheets/administrate/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@
@import "selectize";
@import "datetime_picker";

@import "library/**/*";
@import "base/**/*";
@import "components/**/*";
@import "library/data-label";
@import "library/variables";

@import "base/forms";
@import "base/layout";
@import "base/lists";
@import "base/tables";
@import "base/typography";

@import "components/app-container";
@import "components/attributes";
@import "components/buttons";
@import "components/cells";
@import "components/field-unit";
@import "components/flashes";
@import "components/form-actions";
@import "components/header";
@import "components/main-content";
@import "components/pagination";
@import "components/search";
@import "components/sidebar";
@import "components/table";

0 comments on commit fec2559

Please sign in to comment.