Skip to content

Commit

Permalink
GalleryBlock: remove unused CSS and cleanup front-end. (#2291)
Browse files Browse the repository at this point in the history
Remove unused CSS and cleanup front-end. Prevent aligncenter classes (often defined with themes) from removing flex.
  • Loading branch information
mtias committed Aug 10, 2017
1 parent ca1eeda commit a6cf4e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 26 deletions.
8 changes: 2 additions & 6 deletions blocks/library/gallery/block.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
.wp-block-gallery {
.wp-block-gallery,
.wp-block-gallery.aligncenter {
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;
Expand Down
23 changes: 3 additions & 20 deletions blocks/library/gallery/style.scss
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit a6cf4e3

Please sign in to comment.