From fef39cad243f0d820544845bde1777b7030be8a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 2 May 2022 15:00:51 +0200 Subject: [PATCH] Move banner styles to their own stylesheet Since we've already got a banner component, we follow the convention of using one CSS file per component. We also reduce the number of lines in the huge layout.scss file. Now the sections in layout.scss from "17" to "19", just like they jump from "08" to "10". --- app/assets/stylesheets/application.scss | 1 + app/assets/stylesheets/banner.scss | 23 ++++++++++++++++++++ app/assets/stylesheets/layout.scss | 28 ------------------------- 3 files changed, 24 insertions(+), 28 deletions(-) create mode 100644 app/assets/stylesheets/banner.scss diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 47fc5d7bb..38dadae41 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -21,6 +21,7 @@ @import "advanced_search"; @import "annotator_overrides"; @import "autocomplete_overrides"; +@import "banner"; @import "datepicker_overrides"; @import "layout"; @import "participation"; diff --git a/app/assets/stylesheets/banner.scss b/app/assets/stylesheets/banner.scss new file mode 100644 index 000000000..d0cc55a2b --- /dev/null +++ b/app/assets/stylesheets/banner.scss @@ -0,0 +1,23 @@ +.banner { + @include full-width-background; + + .debates-list &::before, + .proposals-list &::before, + .admin &::before { + content: none; + } + + a > * { + padding: 0 rem-calc(16); + + &:empty { + display: none; + } + } + + + .budget-header, + + .budgets-index > .budget-header, + + .jumbo { + margin-top: 0; + } +} diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 46036acb7..6bd62a730 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -16,7 +16,6 @@ // 15. Comments // 16. Flags // 17. Activity -// 18. Banners // 19. Recommendations // 20. Documents // 21. Related content @@ -2135,33 +2134,6 @@ table { } } -// 18. Banners -// ----------- - -.banner { - @include full-width-background; - - .debates-list &::before, - .proposals-list &::before, - .admin &::before { - content: none; - } - - a > * { - padding: 0 rem-calc(16); - - &:empty { - display: none; - } - } - - + .budget-header, - + .budgets-index > .budget-header, - + .jumbo { - margin-top: 0; - } -} - // 19. Recommendations // -------------------