Skip to content

Commit

Permalink
Always show "new gallery item" below the gallery
Browse files Browse the repository at this point in the history
Added `has-add-item-button` class to the corresponding `li` element.
Added `has-add-item-button` class css for the desired effect.
  • Loading branch information
caxco93 committed Jun 24, 2018
1 parent b299f4f commit 010a6d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core-blocks/gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class GalleryEdit extends Component {
</li>
) ) }
{ isSelected &&
<li className="blocks-gallery-item">
<li className="blocks-gallery-item has-add-item-button">
<FormFileUpload
multiple
isLarge
Expand Down
7 changes: 7 additions & 0 deletions core-blocks/gallery/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@
}
}

// Apply max-width to gallery item that contains the add new gallery item button
.blocks-gallery-item {
&.has-add-item-button {
width: 100%;
}
}

// Apply max-width to floated items that have no intrinsic width
[data-align="left"] &,
[data-align="right"] &,
Expand Down

0 comments on commit 010a6d4

Please sign in to comment.