From b00b319e83e648ee5cf3bf9a882e67e57c7d6707 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sat, 16 Feb 2019 15:05:18 +0000 Subject: [PATCH] Re-arranged some list items to flexbox instead of grid Since flexbox is better supported on a wider range of elements --- resources/assets/sass/_lists.scss | 29 ++++++++++------ resources/assets/sass/_pages.scss | 2 +- resources/views/books/index.blade.php | 2 +- resources/views/books/show.blade.php | 14 ++++---- resources/views/chapters/show.blade.php | 14 ++++---- .../views/components/toggle-switch.blade.php | 2 +- resources/views/pages/delete.blade.php | 34 ++++++++++--------- resources/views/pages/show.blade.php | 14 ++++---- .../partials/entity-list-item-basic.blade.php | 2 +- .../views/partials/view-toggle.blade.php | 10 +++--- .../views/settings/roles/delete.blade.php | 23 ++++++++----- resources/views/settings/roles/edit.blade.php | 2 +- resources/views/settings/roles/form.blade.php | 2 +- resources/views/shelves/index.blade.php | 2 +- resources/views/shelves/show.blade.php | 6 ++-- resources/views/users/profile.blade.php | 6 ++-- 16 files changed, 90 insertions(+), 74 deletions(-) diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scss index d12155962..91522d8bf 100644 --- a/resources/assets/sass/_lists.scss +++ b/resources/assets/sass/_lists.scss @@ -250,19 +250,25 @@ ul.pagination { .entity-list-item, .icon-list-item { padding: $-s $-m; - display: grid; - grid-template-columns: min-content 1fr; - grid-column-gap: $-m; - align-items: top; - > .content { - padding-top: 2px; - } - .icon { - font-size: 1rem; - } + display: flex; + align-items: center; + background-color: transparent; + border: 0; + cursor: pointer; + width: 100%; + position: relative; h4 a { color: #666; } + > span:first-child { + margin-right: $-m; + flex-basis: 1.88em; + flex: none; + } + > span:last-child { + flex: 1; + text-align: left; + } &:hover { text-decoration: none; background-color: #DDD; @@ -278,10 +284,13 @@ ul.pagination { } .entity-list-item-image { + align-self: stretch; width: 140px; background-size: cover; background-position: 50% 50%; border-radius: 3px; + position: relative; + margin-right: $-l; @include smaller-than($m) { width: 80px; } diff --git a/resources/assets/sass/_pages.scss b/resources/assets/sass/_pages.scss index ab16e7fab..a260116c6 100755 --- a/resources/assets/sass/_pages.scss +++ b/resources/assets/sass/_pages.scss @@ -356,7 +356,7 @@ } } -.entity-list-item > .icon, .icon-list-item > .icon { +.entity-list-item > span:first-child, .icon-list-item > span:first-child { font-size: 0.8rem; width: 1.88em; height: 1.88em; diff --git a/resources/views/books/index.blade.php b/resources/views/books/index.blade.php index e21dfc7a8..4eeba10cf 100644 --- a/resources/views/books/index.blade.php +++ b/resources/views/books/index.blade.php @@ -40,7 +40,7 @@
@if($currentUser->can('book-create-all')) - @icon('add') + @icon('add') {{ trans('entities.books_create') }} @endif diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php index ba07ade0a..d29954228 100644 --- a/resources/views/books/show.blade.php +++ b/resources/views/books/show.blade.php @@ -59,7 +59,7 @@