Skip to content

Commit 7a18611

Browse files
committed
Fix navigation screen padding
1 parent 78934e1 commit 7a18611

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

packages/block-editor/src/components/content-only-controls/index.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function ContentOnlyControlsScreen( {
158158
}
159159

160160
return (
161-
<div className="block-editor-content-only-controls__screen">
161+
<>
162162
{ isNested && (
163163
<div className="block-editor-content-only-controls__button-panel">
164164
<Navigator.BackButton className="block-editor-content-only-controls__back-button">
@@ -182,7 +182,7 @@ function ContentOnlyControlsScreen( {
182182

183183
return <BlockFields key={ clientId } clientId={ clientId } />;
184184
} ) }
185-
</div>
185+
</>
186186
);
187187
}
188188

@@ -268,15 +268,22 @@ export default function ContentOnlyControls( { rootClientId } ) {
268268

269269
return (
270270
<Navigator initialPath="/">
271-
<Navigator.Screen path="/">
271+
<Navigator.Screen
272+
path="/"
273+
className="block-editor-content-only-controls__screen"
274+
>
272275
<ContentOnlyControlsScreen
273276
rootClientId={ updatedRootClientId ?? rootClientId }
274277
contentClientIds={ contentClientIds }
275278
parentClientIds={ nestedContentClientIds }
276279
/>
277280
</Navigator.Screen>
278281
{ Object.keys( nestedContentClientIds ).map( ( clientId ) => (
279-
<Navigator.Screen key={ clientId } path={ `/${ clientId }` }>
282+
<Navigator.Screen
283+
key={ clientId }
284+
path={ `/${ clientId }` }
285+
className="block-editor-content-only-controls__screen"
286+
>
280287
<ContentOnlyControlsScreen
281288
isNested
282289
rootClientId={ clientId }

packages/block-editor/src/components/content-only-controls/styles.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
@use "./rich-text/styles.scss" as *;
66

77
.block-editor-content-only-controls__screen {
8-
padding-top: $grid-unit-10;
8+
&.components-navigator-screen {
9+
padding: $grid-unit-10 0 0 0;
10+
}
911

1012
// Add border for the entire content controls and remove the similar border
1113
// for tools panel.

0 commit comments

Comments
 (0)