From 3e5039d72cdf09bb5e63c2234c416f11ad065bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 27 Jan 2023 21:00:57 +0100 Subject: [PATCH] Remove usage of the top-bar-title class This class was only there in order to use Foundation's styles, but the amount of styles we were using was equal to the amount of styles we were overwriting. --- app/assets/stylesheets/layout.scss | 14 +++++++++----- app/assets/stylesheets/layout/admin_header.scss | 2 +- app/views/layouts/_header.html.erb | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index a29ac4b59..1f91d2f5b 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -550,6 +550,10 @@ body > header, .top-bar { @include background-with-text-contrast($main-header, [main-header, brand]); + + h1 { + line-height: $line-height; + } } } @@ -563,12 +567,13 @@ body > header, .top-bar { background-color: inherit; - padding: 0; + padding-left: 0; + padding-right: 0; @include breakpoint(medium) { justify-content: flex-start; - .top-bar-title { + h1 { flex-grow: 1; } } @@ -577,9 +582,8 @@ body > header, background: none; } - .top-bar-title { - line-height: $line-height; - margin-right: 0; + h1 { + margin-bottom: 0; a img { height: rem-calc(48); diff --git a/app/assets/stylesheets/layout/admin_header.scss b/app/assets/stylesheets/layout/admin_header.scss index 758f1782a..58d6e9e9b 100644 --- a/app/assets/stylesheets/layout/admin_header.scss +++ b/app/assets/stylesheets/layout/admin_header.scss @@ -16,6 +16,7 @@ .top-bar { height: auto; + padding-bottom: 0; padding-top: $line-height / 2; @include breakpoint(small only) { @@ -52,7 +53,6 @@ h1 { margin-top: $line-height / 2; - margin-bottom: 0; @include breakpoint(medium) { margin-top: 0; diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index bf1884f93..8e35ce79c 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -18,7 +18,7 @@ -

+

<%= link_to root_path, accesskey: "0" do %> <%= image_tag(image_path_for("logo_header.png"), alt: setting["org_name"]) %> <% end %>