Skip to content

Commit

Permalink
Font Library: Fix modal scrollbar (#60641)
Browse files Browse the repository at this point in the history
* Make footer a fixed height; add margin to modal content

* Remove Spacer from bottom of Library tab content

* Add variable for footer height size

Co-authored-by: mikachan <mikachan@git.wordpress.org>
Co-authored-by: creativecoder <grantmkin@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: jordesign <jordesign@git.wordpress.org>
Co-authored-by: matiasbenedetto <mmaattiiaass@git.wordpress.org>
  • Loading branch information
6 people authored and creativecoder committed May 1, 2024
1 parent f1abd8b commit 25c18ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ function InstalledFonts() {
) ) }
</>
) }
<Spacer margin={ 16 } />
</NavigatorScreen>

<NavigatorScreen path="/fontFamily">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Fixed height for the modal footer.
// Ensures that the footer is always visible when the modal content is scrollable.
$footer-height: 70px;

.font-library-modal {
// @todo: If a new prop is added to the Modal component that constrains
// the content width, we should use that prop instead of this style.
Expand All @@ -15,6 +19,7 @@

.components-modal__content {
padding-top: 0;
margin-bottom: $footer-height;
}

.font-library-modal__subtitle {
Expand All @@ -40,6 +45,7 @@
position: absolute;
bottom: $grid-unit-40;
width: 100%;
height: $footer-height;
background-color: $white;
}
}
Expand Down

0 comments on commit 25c18ac

Please sign in to comment.