Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve modal and fullscreen/starter content view #55525

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/block-library/src/template-part/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@

.block-library-template-part__selection-search {
background: $white;
box-shadow: 0 -$grid-unit-10 0 6px $white; // Fill in the space around the search.
position: sticky;
top: 0;
padding: $grid-unit-20 0;
padding: $grid-unit-10 0;
z-index: z-index(".block-library-template-part__selection-search");
}

Expand Down
17 changes: 8 additions & 9 deletions packages/components/src/modal/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
right: 0;
bottom: 0;
left: 0;
background-color: rgba($black, 0.35);
background-color: rgba($black, 0.4);
z-index: z-index(".components-modal__screen-overlay");
display: flex;
// backdrop-filter: blur($grid-unit);
Expand Down Expand Up @@ -45,8 +45,8 @@
max-height: none;
}
@include break-medium() {
width: calc(100% - #{ $grid-unit-50 * 2 });
height: calc(100% - #{ $grid-unit-50 * 2 });
width: calc(100% - #{ $header-height * 2 + $border-width });
height: calc(100% - #{ $header-height * 2 + $border-width });
max-width: none;
}
}
Expand Down Expand Up @@ -91,13 +91,12 @@
// modal screen).
.components-modal__header {
box-sizing: border-box;
border-bottom: $border-width solid transparent;
padding: $grid-unit-30 $grid-unit-40 $grid-unit-10;
padding: 0 $grid-unit-40;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: $header-height + $grid-unit-15;
height: $header-height + $grid-unit-10;
width: 100%;
z-index: z-index(".components-modal__header");
position: absolute;
Expand All @@ -120,7 +119,7 @@
}

.components-modal__content.has-scrolled-content:not(.hide-header) & {
border-bottom-color: $gray-300;
box-shadow: 0 0 0 1px rgba($black, 0.13);
}

& + p {
Expand Down Expand Up @@ -149,9 +148,9 @@
// Modal contents.
.components-modal__content {
flex: 1;
margin-top: $header-height + $grid-unit-15;
margin-top: $header-height + $grid-unit-10;
// Small top padding required to avoid cutting off the visible outline when the first child element is focusable.
padding: $grid-unit-05 $grid-unit-40 $grid-unit-40;
padding: $grid-unit-05 * 0.5 $grid-unit-40 $grid-unit-40;
overflow: auto;

&.hide-header {
Expand Down
19 changes: 13 additions & 6 deletions packages/edit-post/src/components/start-page-options/style.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
// 2 column masonry layout.
.edit-post-start-page-options__modal-content .block-editor-block-patterns-list {
column-count: 2;
column-gap: $grid-unit-30;

@include break-medium() {
column-count: 3;
@include break-small() {
column-count: 2;
column-gap: $grid-unit-30;
}

@include break-wide() {
column-count: 4;
column-count: 3;
column-gap: $grid-unit-40;
}

.block-editor-block-patterns-list__list-item {
break-inside: avoid-column;
margin-bottom: $grid-unit-30;

@include break-small() {
margin-bottom: $grid-unit-40;
}

.block-editor-block-patterns-list__item-title {
display: none;
}

.block-editor-block-preview__container {
min-height: 100px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,19 @@ $actions-height: 92px;

.edit-site-start-template-options__modal-content .block-editor-block-patterns-list {
column-count: 2;
column-gap: $grid-unit-30;

@include break-medium() {
column-count: 3;
}
column-gap: $grid-unit-40;

@include break-wide() {
column-count: 4;
column-count: 3;
}

.block-editor-block-patterns-list__list-item {
break-inside: avoid-column;
margin-bottom: $grid-unit-30;

@include break-small() {
margin-bottom: $grid-unit-40;
}

.block-editor-block-patterns-list__item-title {
display: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $vertical-tabs-width: 160px;
.interface-preferences__tabs {
.components-tab-panel__tabs {
position: absolute;
top: $header-height + $grid-unit-30;
top: $header-height + $grid-unit-10;
// Aligns button text instead of button box.
left: $grid-unit-20;
width: $vertical-tabs-width;
Expand Down
Loading