From fec2559929a91152a9c440b675a2d474564187be Mon Sep 17 00:00:00 2001 From: Tyson Gach Date: Fri, 24 Mar 2017 14:53:08 -0400 Subject: [PATCH] Stop using Sass glob importing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .../stylesheets/administrate/application.scss | 25 ++++++++++++++++--- .../{_data_label.scss => _data-label.scss} | 0 2 files changed, 22 insertions(+), 3 deletions(-) rename app/assets/stylesheets/administrate/library/{_data_label.scss => _data-label.scss} (100%) diff --git a/app/assets/stylesheets/administrate/application.scss b/app/assets/stylesheets/administrate/application.scss index a2e2f8462c..d1ab7a2bc0 100644 --- a/app/assets/stylesheets/administrate/application.scss +++ b/app/assets/stylesheets/administrate/application.scss @@ -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"; diff --git a/app/assets/stylesheets/administrate/library/_data_label.scss b/app/assets/stylesheets/administrate/library/_data-label.scss similarity index 100% rename from app/assets/stylesheets/administrate/library/_data_label.scss rename to app/assets/stylesheets/administrate/library/_data-label.scss