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 committed Apr 11, 2024
1 parent 1f21f61 commit c86e77f
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

1 comment on commit c86e77f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in c86e77f.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/8649875979
📝 Reported issues:

Please sign in to comment.