diff --git a/stylesheets/components/StoryViewsNRepliesModal.scss b/stylesheets/components/StoryViewsNRepliesModal.scss index 04bcae3f26d..fc7af545d31 100644 --- a/stylesheets/components/StoryViewsNRepliesModal.scss +++ b/stylesheets/components/StoryViewsNRepliesModal.scss @@ -1,6 +1,10 @@ // Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only +$tabs-height: 28px; +$tabs-margin-bottom: 16px; +$footer-height: 36px; + .StoryViewsNRepliesModal { min-width: 320px; overflow: hidden; @@ -8,7 +12,25 @@ &--group { display: flex; flex-direction: column; - min-height: 400px; + flex: 1; + // explicit height prevents height:auto + // while allowing flex to actually size it + height: 0; + + .StoryViewsNRepliesModal__replies { + // at least 400px tall + // but if screen is small, allow it to shrink further + // 75% - (header + header bottom margin + footer) + min-height: min( + calc(75vh - ($tabs-height + $tabs-margin-bottom + $footer-height)), + 400px + ); + } + } + + &__body { + display: flex; + flex-direction: column; } &__replies { @@ -229,7 +251,7 @@ .Tabs.StoryViewsNRepliesModal__tabs { border-bottom: none; justify-content: center; - margin-bottom: 16px; + margin-bottom: $tabs-margin-bottom; } .Tabs__tab.StoryViewsNRepliesModal__tabs__tab {