diff --git a/packages/base-styles/_z-index.scss b/packages/base-styles/_z-index.scss
index cc4a42df98f0aa..37131620338273 100644
--- a/packages/base-styles/_z-index.scss
+++ b/packages/base-styles/_z-index.scss
@@ -186,6 +186,7 @@ $z-layers: (
".edit-site-layout__hub": 3,
".edit-site-layout__header": 2,
".edit-site-page-header": 2,
+ ".edit-site-patterns__header": 2,
".edit-site-layout__canvas-container": 2,
".edit-site-layout__sidebar": 1,
".edit-site-layout__canvas-container.is-resizing::after": 100,
diff --git a/packages/edit-site/src/components/page-patterns/patterns-list.js b/packages/edit-site/src/components/page-patterns/patterns-list.js
index f4fefed4a2d3e0..ba558ab104bddf 100644
--- a/packages/edit-site/src/components/page-patterns/patterns-list.js
+++ b/packages/edit-site/src/components/page-patterns/patterns-list.js
@@ -72,84 +72,89 @@ export default function PatternsList( { categoryId, type } ) {
const description = SYNC_DESCRIPTIONS[ syncFilter ];
return (
-
-
-
-
- { isMobileViewport && (
- {
- // Go back in history if we came from the Patterns page.
- // Otherwise push a stack onto the history.
- if ( location.state?.backPath === '/patterns' ) {
- history.back();
- } else {
- history.push( { path: '/patterns' } );
- }
- } }
- />
+ <>
+
+
+
+ { isMobileViewport && (
+ {
+ // Go back in history if we came from the Patterns page.
+ // Otherwise push a stack onto the history.
+ if (
+ location.state?.backPath === '/patterns'
+ ) {
+ history.back();
+ } else {
+ history.push( { path: '/patterns' } );
+ }
+ } }
+ />
+ ) }
+
+ setFilterValue( value ) }
+ placeholder={ __( 'Search patterns' ) }
+ label={ __( 'Search patterns' ) }
+ value={ filterValue }
+ __nextHasNoMarginBottom
+ />
+
+ { categoryId === USER_PATTERN_CATEGORY && (
+ setSyncFilter( value ) }
+ __nextHasNoMarginBottom
+ >
+ { Object.entries( SYNC_FILTERS ).map(
+ ( [ key, label ] ) => (
+
+ )
+ ) }
+
+ ) }
+
+
+
+ { syncFilter !== 'all' && (
+
+
+ { title }
+
+ { description ? (
+
+ { description }
+
+ ) : null }
+
) }
-
- setFilterValue( value ) }
- placeholder={ __( 'Search patterns' ) }
- label={ __( 'Search patterns' ) }
- value={ filterValue }
- __nextHasNoMarginBottom
+ { hasPatterns && (
+
-
- { categoryId === USER_PATTERN_CATEGORY && (
- setSyncFilter( value ) }
- __nextHasNoMarginBottom
- >
- { Object.entries( SYNC_FILTERS ).map(
- ( [ key, label ] ) => (
-
- )
- ) }
-
) }
-
- { syncFilter !== 'all' && (
-
-
- { title }
-
- { description ? (
-
- { description }
-
- ) : null }
-
- ) }
- { hasPatterns && (
-
- ) }
- { ! isResolving && ! hasPatterns && }
-
+ { ! isResolving && ! hasPatterns && }
+
+ >
);
}
diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss
index d1fbedb141f701..90591b7fc54de5 100644
--- a/packages/edit-site/src/components/page-patterns/style.scss
+++ b/packages/edit-site/src/components/page-patterns/style.scss
@@ -3,6 +3,15 @@
background: none;
margin: $header-height 0 0;
border-radius: 0;
+ padding: 0;
+ overflow-x: auto;
+
+ .edit-site-page-content {
+ height: 100%;
+ position: relative;
+ padding: 0 0 $grid-unit-40;
+ }
+
.components-base-control {
width: 100%;
@include break-medium {
@@ -80,6 +89,18 @@
}
}
+.edit-site-patterns__header {
+ position: sticky;
+ top: 0;
+ background: $gray-900;
+ padding: $grid-unit-40 $grid-unit-40 $grid-unit-20;
+ z-index: z-index(".edit-site-patterns__header");
+}
+
+.edit-site-patterns__section {
+ padding: $grid-unit-20 $grid-unit-40 0;
+}
+
.edit-site-patterns__section-header {
.screen-reader-shortcut:focus {
top: 0;