From 0846766dd62e2eaefe2fa2e2374f1dec553bce7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 16 May 2021 12:27:15 +0200 Subject: [PATCH 1/3] Load leaflet CSS before our styles This way we don't have to use the `!important` flag to override styles. --- app/assets/stylesheets/application.scss | 2 +- app/assets/stylesheets/layout.scss | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 380278a1a25..36df2cd69f1 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -3,6 +3,7 @@ @import "fonts"; @import "font-awesome-sprockets"; @import "font-awesome"; +@import "leaflet"; @import "icons"; @import "mixins/*"; @import "admin"; @@ -29,7 +30,6 @@ @import "jquery-ui/autocomplete"; @import "autocomplete_overrides"; @import "jquery-ui/sortable"; -@import "leaflet"; @import "sticky_overrides"; @import "tags"; @import "admin/**/*"; diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 52a559a08ac..e4fd19f45b6 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -2596,25 +2596,25 @@ table { .leaflet-bar a { &.leaflet-disabled { - color: #525252 !important; + color: #525252; } } .leaflet-container { .leaflet-control-attribution { - background: rgba(255, 255, 255, 0.9) !important; + background: rgba(255, 255, 255, 0.9); } a { - color: $link !important; + color: $link; } } .leaflet-bottom, .leaflet-pane, .leaflet-top { - z-index: 4 !important; + z-index: 4; } // 24. Homepage From 4d70f50a5f878594a9136770dd163790b1721ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 16 May 2021 12:33:33 +0200 Subject: [PATCH 2/3] Fix order loading custom styles We have to load the custom styles last so they actually override what we do. --- app/assets/stylesheets/application.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 36df2cd69f1..f535666a9c4 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -20,7 +20,6 @@ @import "notification_item"; @import "community"; @import "stats"; -@import "custom"; @import "c3"; @import "annotator.min"; @import "amsify.suggestags"; @@ -38,3 +37,5 @@ @import "sdg_management/*"; @import "sdg_management/**/*"; @import "widgets/**/*"; + +@import "custom"; From b549eb444a8be01d3f34af5a4942229510782b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 16 May 2021 12:34:46 +0200 Subject: [PATCH 3/3] Allow several custom stylesheets So other institutions customizing CONSUL can organize their custom code as they wish to. We're also updating the comments in the `custom.scss` file, since it was referencing files which no longer exist. --- app/assets/stylesheets/application.scss | 1 + app/assets/stylesheets/custom.scss | 7 +++---- app/assets/stylesheets/custom/.gitkeep | 0 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 app/assets/stylesheets/custom/.gitkeep diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index f535666a9c4..a09eb69977a 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -39,3 +39,4 @@ @import "widgets/**/*"; @import "custom"; +@import "custom/**/*"; diff --git a/app/assets/stylesheets/custom.scss b/app/assets/stylesheets/custom.scss index 090eb0342f6..d124a23424f 100644 --- a/app/assets/stylesheets/custom.scss +++ b/app/assets/stylesheets/custom.scss @@ -1,5 +1,4 @@ -// Overrides and adds customized styles in this file -// Read more on documentation: -// * English: https://github.com/consul/consul/blob/master/CUSTOMIZE_EN.md#css -// * Spanish: https://github.com/consul/consul/blob/master/CUSTOMIZE_ES.md#css +// Override and add customized styles in this file. // +// You can also create SCSS files in the app/assets/stylesheets/custom/ +// folder and they will be loaded automatically. diff --git a/app/assets/stylesheets/custom/.gitkeep b/app/assets/stylesheets/custom/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d