From c673ee5928808e83e60cc32fe6d85b016c8628c1 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Fri, 31 Mar 2023 17:16:52 -0500 Subject: [PATCH] settings-sticky-tabs (#1) - Add sticky positioning for tabs on the Settings panel - Also add sticky position for SpaceSettings --- src/app/organisms/settings/Settings.scss | 13 +++++++++++-- .../organisms/space-settings/SpaceSettings.scss | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/app/organisms/settings/Settings.scss b/src/app/organisms/settings/Settings.scss index a9ddd475..1d686cd7 100644 --- a/src/app/organisms/settings/Settings.scss +++ b/src/app/organisms/settings/Settings.scss @@ -16,8 +16,17 @@ padding: var(--sp-loose) var(--sp-extra-loose); } - & .tabs__content { - padding: 0 var(--sp-normal); + & .tabs { + position: sticky; + top: 0; + z-index: 999; + background-color: var(--bg-surface-low); + box-shadow: 0 -4px 0 var(--bg-surface-low), + inset 0 -1px 0 var(--bg-surface-border); + + &__content { + padding: 0 var(--sp-normal); + } } &__cards-wrapper { diff --git a/src/app/organisms/space-settings/SpaceSettings.scss b/src/app/organisms/space-settings/SpaceSettings.scss index 987f23b8..d1cf9807 100644 --- a/src/app/organisms/space-settings/SpaceSettings.scss +++ b/src/app/organisms/space-settings/SpaceSettings.scss @@ -9,8 +9,17 @@ padding: var(--sp-loose) var(--sp-extra-loose); } - & .tabs__content { - padding: 0 var(--sp-normal); + & .tabs { + position: sticky; + top: 0; + z-index: 999; + background-color: var(--bg-surface-low); + box-shadow: 0 -4px 0 var(--bg-surface-low), + inset 0 -1px 0 var(--bg-surface-border); + + &__content { + padding: 0 var(--sp-normal); + } } &__cards-wrapper { @@ -34,4 +43,4 @@ .space-settings .room-permissions__card, .space-settings .room-members { @extend .space-settings__card; -} \ No newline at end of file +}