Skip to content

Commit 25c18ac

Browse files
mikachancreativecodert-hamanojordesignmatiasbenedetto
authored andcommitted
Font Library: Fix modal scrollbar (#60641)
* 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>
1 parent f1abd8b commit 25c18ac

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/edit-site/src/components/global-styles/font-library-modal/installed-fonts.js

-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ function InstalledFonts() {
181181
) ) }
182182
</>
183183
) }
184-
<Spacer margin={ 16 } />
185184
</NavigatorScreen>
186185

187186
<NavigatorScreen path="/fontFamily">

packages/edit-site/src/components/global-styles/font-library-modal/style.scss

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Fixed height for the modal footer.
2+
// Ensures that the footer is always visible when the modal content is scrollable.
3+
$footer-height: 70px;
4+
15
.font-library-modal {
26
// @todo: If a new prop is added to the Modal component that constrains
37
// the content width, we should use that prop instead of this style.
@@ -15,6 +19,7 @@
1519

1620
.components-modal__content {
1721
padding-top: 0;
22+
margin-bottom: $footer-height;
1823
}
1924

2025
.font-library-modal__subtitle {
@@ -40,6 +45,7 @@
4045
position: absolute;
4146
bottom: $grid-unit-40;
4247
width: 100%;
48+
height: $footer-height;
4349
background-color: $white;
4450
}
4551
}

0 commit comments

Comments
 (0)