diff --git a/blocks/library/gallery/block.scss b/blocks/library/gallery/block.scss index beffdefd70155b..790fac62835b26 100644 --- a/blocks/library/gallery/block.scss +++ b/blocks/library/gallery/block.scss @@ -2,11 +2,6 @@ display: flex; flex-wrap: wrap; - &:not( .components-placeholder ) { - margin-right: -16px; - margin-bottom: -16px; - } - .blocks-gallery-image { flex-grow: 1; margin: 0 16px 16px 0; diff --git a/blocks/library/gallery/index.js b/blocks/library/gallery/index.js index a558a6412f7d99..82db267b5092c4 100644 --- a/blocks/library/gallery/index.js +++ b/blocks/library/gallery/index.js @@ -168,9 +168,10 @@ registerBlockType( 'core/gallery', { save( { attributes } ) { const { images, columns = defaultColumnsNumber( attributes ), align = 'none', imageCrop = true, linkTo = 'none' } = attributes; + return (
- { images.map( ( img ) => ( + { images && images.map( ( img ) => ( ) ) }
diff --git a/blocks/library/gallery/style.scss b/blocks/library/gallery/style.scss index f05c7d74079f47..550a81048e536b 100644 --- a/blocks/library/gallery/style.scss +++ b/blocks/library/gallery/style.scss @@ -1,23 +1,6 @@ -.wp-block-gallery.is-placeholder { - margin: -15px; - padding: 6em 0; - border: 2px solid $light-gray-500; - text-align: center; -} - -.blocks-gallery__placeholder-label { - display: flex; - align-items: center; - justify-content: center; - font-weight: bold; - - .dashicon { - margin-right: 1ch; - } -} - -.blocks-gallery__placeholder-instructions { - margin: 1.8em 0; +.wp-block-gallery:not( .components-placeholder ) { + margin-right: -16px; + margin-bottom: -16px; } .editor-visual-editor__block[data-type="core/gallery"] .editor-visual-editor__block-edit {