Skip to content

Commit

Permalink
commented the CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieCabrera committed Jul 11, 2024
1 parent c57deb1 commit f7844fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
13 changes: 8 additions & 5 deletions packages/block-editor/src/components/inserter/preview-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ function InserterPreviewPanel( { item } ) {
blocks={ blocks }
viewportWidth={ viewportWidth }
minHeight={ previewHeight }
additionalStyles={ [
{
css: `
additionalStyles={
//We want this CSS to be in sync with the one in BlockPreviewPanel.
[
{
css: `
body {
padding: 24px;
min-height:${ Math.round( minHeight ) }px;
Expand All @@ -60,8 +62,9 @@ function InserterPreviewPanel( { item } ) {
}
.is-root-container { width: 100%; }
`,
},
] }
},
]
}
/>
</div>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ const BlockPreviewPanel = ( { name, variation = '' } ) => {
blocks={ blocks }
viewportWidth={ viewportWidth }
minHeight={ previewHeight }
additionalStyles={ [
{
css: `
additionalStyles={
//We want this CSS to be in sync with the one in InserterPreviewPanel.
[
{
css: `
body{
padding: 24px;
min-height:100%;
Expand All @@ -61,8 +63,9 @@ const BlockPreviewPanel = ( { name, variation = '' } ) => {
}
.is-root-container { width: 100%; }
`,
},
] }
},
]
}
/>
</div>
</Spacer>
Expand Down

0 comments on commit f7844fe

Please sign in to comment.