summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2017-07-26 09:28:28 +0000
committerazul <azul@riseup.net>2017-07-26 09:28:28 +0000
commit38ce3a14652aca9b3b8d8ad42f9968cfbcc44478 (patch)
treed5632fcf5c65331f48b2d0ccc1edaff03c6adf3f
parente78c74af0f04e05b26dd6695ef7a7571185744ea (diff)
parentd939562360377dad4dfd8ab1520b15f85fc0a730 (diff)
Merge branch 'fix/sass-load-path' into 'master'
Fix/sass load path Closes #8794 See merge request !40
-rw-r--r--app/assets/stylesheets/application.scss12
-rw-r--r--app/assets/stylesheets/custom/head-import.scss1
-rw-r--r--app/assets/stylesheets/custom/tail-import.scss1
-rw-r--r--config/initializers/customization.rb1
4 files changed, 10 insertions, 5 deletions
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index f42044b..1fed154 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -1,7 +1,9 @@
//
-// import custom scss, content to be set in deployment.
+// This will in turn import config/customization/stylesheets/head
+// It is a workaround for sass-rails defaulting to relative imports.
+// https://0xacab.org/leap/webapp/issues/8794
//
-@import "head";
+@import "custom/head-import";
// First import journal variables
// @import "bootswatch/cerulean/variables";
@@ -22,6 +24,8 @@
// @import "bootswatch/cerulean/bootswatch";
//
-// import custom scss, content to be set in deployment.
+// This will in turn import config/customization/stylesheets/tail
+// It is a workaround for sass-rails defaulting to relative imports.
+// https://0xacab.org/leap/webapp/issues/8794
//
-@import "tail";
+@import "custom/tail-import";
diff --git a/app/assets/stylesheets/custom/head-import.scss b/app/assets/stylesheets/custom/head-import.scss
new file mode 100644
index 0000000..c097d8d
--- /dev/null
+++ b/app/assets/stylesheets/custom/head-import.scss
@@ -0,0 +1 @@
+@import "head";
diff --git a/app/assets/stylesheets/custom/tail-import.scss b/app/assets/stylesheets/custom/tail-import.scss
new file mode 100644
index 0000000..3a61253
--- /dev/null
+++ b/app/assets/stylesheets/custom/tail-import.scss
@@ -0,0 +1 @@
+@import "tail";
diff --git a/config/initializers/customization.rb b/config/initializers/customization.rb
index 2b5301e..6d9c741 100644
--- a/config/initializers/customization.rb
+++ b/config/initializers/customization.rb
@@ -21,7 +21,6 @@ customization_directory = APP_CONFIG["customization_directory"]
#
Rails.application.config.assets.paths.unshift "#{customization_directory}/images"
Rails.application.config.assets.paths.unshift "#{customization_directory}/stylesheets"
-Rails.application.config.sass.load_paths.unshift "#{customization_directory}/stylesheets"
#
# Copy files to public
#