From 3bad6be810a80e2d56a8af2413a253b31d4c000c Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Thu, 14 Nov 2024 15:39:17 +0300 Subject: [PATCH] Adjust secondary nav css for transition before/after js runs --- app/assets/javascripts/application.js | 3 --- app/assets/stylesheets/common.scss | 8 ++++++-- app/views/layouts/_header.html.erb | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index d0aeedfa77..62387fc330 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -152,9 +152,6 @@ $(document).ready(function () { }); moreItemWidth = $("#compact-secondary-nav").width(); - $("header").removeClass("text-nowrap"); - $("header nav.secondary > ul").removeClass("flex-nowrap"); - updateHeader(); $(window).resize(updateHeader); diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index a29349fe88..4669dbdecb 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -170,7 +170,11 @@ nav.primary { nav.secondary { .nav-link { - padding: 0.3rem; + padding: 0 0.3rem; + } + + > ul { + height: 1.5em; } } @@ -224,7 +228,7 @@ body.small-nav { flex-direction: column; > ul { - justify-content: unset !important; + height: auto; } .user-menu, .login-menu { diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 6234058068..cf00339954 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -28,7 +28,7 @@