Skip to content

Commit

Permalink
Use grid layout for thumbnail view wrapper
Browse files Browse the repository at this point in the history
The current float-based layout for image thumbnails results in
irregular gaps due to the variability in image caption height.
  • Loading branch information
youngjames committed Feb 6, 2024
1 parent 17a38a1 commit d628eac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions PortalApp/app/view/ThumbnailView.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Ext.define('SpWebPortal.view.ThumbnailView', {
extend: 'Ext.view.View',
xtype: 'spthumbnail',
alias: 'widget.thumbnail',
cls: 'tv-wrap',

//localizable text...
emptyText: 'No images to display',
Expand Down
5 changes: 5 additions & 0 deletions PortalApp/resources/css/thumb-view.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,8 @@
padding: 0.5rem 0.5rem 1rem;
display: table-cell;
}

.tv-wrap {
display: grid;
grid-template-columns: repeat(auto-fill, 207px);
}

0 comments on commit d628eac

Please sign in to comment.