Skip to content

Commit

Permalink
Increase pattern modal dimensions when creating a new template (#49722)
Browse files Browse the repository at this point in the history
* Increase pattern modal dimensions

* grid -> flex

* 3 columns on medium, 4 columns on wide

* modal height
  • Loading branch information
jameskoster authored Apr 17, 2023
1 parent a9411c7 commit 0571b73
Showing 1 changed file with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,36 @@
// and height are used instead of max-(width/height).
@include break-small() {
width: calc(100% - #{ $grid-unit-20 * 2 });
height: calc(100% - #{ $header-height * 2 });
height: auto;
}
@include break-medium() {
width: 50%;
width: 95%;
}
@include break-large() {
height: fit-content;
max-height: 95%;
}
}

.edit-site-start-template-options__modal-content .block-editor-block-patterns-list {
display: grid;
display: flex;
flex-wrap: wrap;
gap: $grid-unit-30;
width: 100%;
margin-top: $grid-unit-05;
gap: $grid-unit-30;
grid-template-columns: repeat(auto-fit, minmax(min(100%/2, max(240px, 100%/10)), 1fr));

.block-editor-block-patterns-list__list-item {
break-inside: avoid-column;
margin-bottom: 0;
width: 100%;
aspect-ratio: 3/4;
width: calc(50% - #{ $grid-unit-30 * 1 } / 2);

@include break-medium() {
width: calc(33.333% - #{ $grid-unit-30 * 2 } / 3);
}

@include break-wide() {
width: calc(25% - #{ $grid-unit-30 * 3 } / 4);
}

.block-editor-block-preview__container {
height: 100%;
Expand Down

1 comment on commit 0571b73

@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 0571b73.
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/4719125053
📝 Reported issues:

Please sign in to comment.