Browse Source

Prevent FAB from overlapping paginators on mobile

pull/7000/head
Thomas Kaul 2 days ago
parent
commit
c01317fd1b
  1. 6
      apps/client/src/styles.scss
  2. 18
      libs/ui/src/lib/fab/fab.component.scss
  3. 11
      libs/ui/src/lib/page-tabs/page-tabs.component.scss

6
apps/client/src/styles.scss

@ -495,12 +495,6 @@ ngx-skeleton-loader {
@media (min-width: 576px) { @media (min-width: 576px) {
padding: 2rem 0; padding: 2rem 0;
} }
// Reserve space so a floating action button does not overlap trailing content
&:has(gf-fab) {
padding-bottom: calc(env(safe-area-inset-bottom) + 6rem);
padding-bottom: calc(constant(safe-area-inset-bottom) + 6rem);
}
} }
} }

18
libs/ui/src/lib/fab/fab.component.scss

@ -1,14 +1,32 @@
:host { :host {
display: block;
// Reserve space so a floating action button does not overlap trailing content
height: calc(constant(safe-area-inset-bottom) + 7rem);
height: calc(env(safe-area-inset-bottom) + 7rem);
@media (min-width: 576px) {
height: calc(constant(safe-area-inset-bottom) + 5rem);
height: calc(env(safe-area-inset-bottom) + 5rem);
}
.mat-mdc-fab {
bottom: calc(constant(safe-area-inset-bottom) + 2rem); bottom: calc(constant(safe-area-inset-bottom) + 2rem);
bottom: calc(env(safe-area-inset-bottom) + 2rem); bottom: calc(env(safe-area-inset-bottom) + 2rem);
position: fixed; position: fixed;
right: 2rem; right: 2rem;
z-index: 999; z-index: 999;
} }
}
:host-context(gf-page-tabs) { :host-context(gf-page-tabs) {
@media (max-width: 575.98px) { @media (max-width: 575.98px) {
height: calc(constant(safe-area-inset-bottom) + 6rem);
height: calc(env(safe-area-inset-bottom) + 6rem);
.mat-mdc-fab {
bottom: calc(constant(safe-area-inset-bottom) + 5rem); bottom: calc(constant(safe-area-inset-bottom) + 5rem);
bottom: calc(env(safe-area-inset-bottom) + 5rem); bottom: calc(env(safe-area-inset-bottom) + 5rem);
} }
} }
}

11
libs/ui/src/lib/page-tabs/page-tabs.component.scss

@ -21,17 +21,6 @@
@media (max-width: 575.98px) { @media (max-width: 575.98px) {
padding: 1rem 0; padding: 1rem 0;
} }
// Reserve space so a floating action button does not overlap trailing content
&:has(gf-fab) {
padding-bottom: calc(env(safe-area-inset-bottom) + 6rem);
padding-bottom: calc(constant(safe-area-inset-bottom) + 6rem);
@media (max-width: 575.98px) {
padding-bottom: calc(env(safe-area-inset-bottom) + 7.5rem);
padding-bottom: calc(constant(safe-area-inset-bottom) + 7.5rem);
}
}
} }
} }

Loading…
Cancel
Save