From 4f068d4fcc4d134fcbd56faa8f39c608dd343417 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 28 Mar 2024 15:00:57 +0100 Subject: [PATCH] Fix logo pushing header buttons out of view on certain conditions in mobile layout (#29787) --- app/javascript/styles/mastodon/components.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 48998097a..3961db50d 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -2612,6 +2612,7 @@ a.account__display-name { } $ui-header-height: 55px; +$ui-header-logo-wordmark-width: 99px; .ui__header { display: none; @@ -2627,6 +2628,10 @@ $ui-header-height: 55px; &__logo { display: inline-flex; padding: 15px; + flex-grow: 1; + flex-shrink: 1; + overflow: hidden; + container: header-logo / inline-size; .logo { height: $ui-header-height - 30px; @@ -2637,7 +2642,7 @@ $ui-header-height: 55px; display: none; } - @media screen and (width >= 320px) { + @container header-logo (min-width: #{$ui-header-logo-wordmark-width}) { .logo--wordmark { display: block; } @@ -2654,6 +2659,7 @@ $ui-header-height: 55px; gap: 10px; padding: 0 10px; overflow: hidden; + flex-shrink: 0; .button { flex: 0 0 auto;