about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-05-06 21:40:49 +0200
committerGitHub <noreply@github.com>2022-05-06 21:40:49 +0200
commit5a448d0d7143475dabe315e6038ec27b59e9e6b5 (patch)
treed8d67e523ac7f6b70ea0b96555c59351b720b244
parenta53003c6f18cd5b4177810e118b158290131b6ec (diff)
Fix floating action button obscuring last element (#18332)
Fixes #18331

Add some padding below the last element of scrollable lists when the FAB is
shown in order for users to always be able to fully see the last element.
-rw-r--r--app/javascript/mastodon/features/ui/components/columns_area.js2
-rw-r--r--app/javascript/styles/mastodon/components.scss4
2 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/ui/components/columns_area.js b/app/javascript/mastodon/features/ui/components/columns_area.js
index db047f5f0..e665f4447 100644
--- a/app/javascript/mastodon/features/ui/components/columns_area.js
+++ b/app/javascript/mastodon/features/ui/components/columns_area.js
@@ -234,7 +234,7 @@ class ColumnsArea extends ImmutablePureComponent {
             </div>
           </div>
 
-          <div className='columns-area__panels__main'>
+          <div className={`columns-area__panels__main ${floatingActionButton && 'with-fab'}`}>
             <TabsBar key='tabs' />
             {content}
           </div>
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss
index 472fa9407..b53648ead 100644
--- a/app/javascript/styles/mastodon/components.scss
+++ b/app/javascript/styles/mastodon/components.scss
@@ -2469,6 +2469,10 @@ a.account__display-name {
   .columns-area__panels__pane--compositional {
     display: none;
   }
+
+  .with-fab .scrollable .item-list:last-child {
+    padding-bottom: 5.25rem;
+  }
 }
 
 @media screen and (min-width: 600px + (285px * 1) + (10px * 1)) {