-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dataviews List: Update item layout #63299
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -421,27 +421,47 @@ | |
} | ||
|
||
.dataviews-view-list__item-actions { | ||
position: absolute; | ||
top: $grid-unit-20; | ||
right: 0; | ||
|
||
|
||
> div { | ||
height: $button-size-small; | ||
} | ||
|
||
.components-button { | ||
opacity: 0; | ||
position: fixed; | ||
right: 0; | ||
} | ||
} | ||
|
||
&:has(.dataviews-view-list__fields:empty) { | ||
.dataviews-view-list__item-actions { | ||
top: 50%; | ||
transform: translateY(-50%); | ||
} | ||
} | ||
|
||
&.is-selected, | ||
&.is-hovered, | ||
&:focus-within { | ||
.dataviews-view-list__item-actions { | ||
padding-right: $grid-unit-30; | ||
background: #f8f8f8; | ||
padding-left: $grid-unit-10; | ||
margin-right: $grid-unit-30; | ||
box-shadow: -12px 0 8px 0 #f8f8f8; | ||
|
||
.components-button { | ||
opacity: 1; | ||
position: static; | ||
} | ||
} | ||
} | ||
|
||
.dataviews-view-list__item { | ||
padding-right: 0; | ||
&.is-selected { | ||
.dataviews-view-list__item-actions { | ||
background-color: rgb(247 248 255); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a 'solid' version of |
||
box-shadow: -12px 0 8px 0 rgb(247 248 255); | ||
} | ||
} | ||
|
||
|
@@ -477,7 +497,7 @@ | |
} | ||
|
||
.dataviews-view-list__item { | ||
padding: $grid-unit-20 0 $grid-unit-20 $grid-unit-30; | ||
padding: $grid-unit-20 $grid-unit-30; | ||
width: 100%; | ||
scroll-margin: $grid-unit-10 0; | ||
|
||
|
@@ -494,15 +514,15 @@ | |
} | ||
} | ||
.dataviews-view-list__primary-field { | ||
min-height: $grid-unit-05 * 5; | ||
line-height: $grid-unit-05 * 5; | ||
min-height: $grid-unit-30; | ||
line-height: $grid-unit-30; | ||
overflow: hidden; | ||
} | ||
} | ||
|
||
.dataviews-view-list__media-wrapper { | ||
width: $grid-unit-50; | ||
height: $grid-unit-50; | ||
width: $grid-unit-05 * 13; | ||
height: $grid-unit-05 * 13; | ||
overflow: hidden; | ||
position: relative; | ||
flex-shrink: 0; | ||
|
@@ -533,13 +553,22 @@ | |
background-color: $gray-200; | ||
} | ||
|
||
.dataviews-view-list__field-wrapper { | ||
min-height: $grid-unit-05 * 13; // Ensures title is centrally aligned when all fields are hidden | ||
} | ||
|
||
.dataviews-view-list__fields { | ||
color: $gray-700; | ||
display: flex; | ||
gap: $grid-unit-10; | ||
row-gap: $grid-unit-05; | ||
flex-wrap: wrap; | ||
font-size: 12px; | ||
|
||
&:empty { | ||
display: none; | ||
} | ||
|
||
.dataviews-view-list__field { | ||
&:has(.dataviews-view-list__field-value:empty) { | ||
display: none; | ||
|
@@ -548,12 +577,8 @@ | |
|
||
.dataviews-view-list__field-value { | ||
line-height: $grid-unit-05 * 6; | ||
display: inline-flex; | ||
} | ||
} | ||
.dataviews-view-list__item-actions { | ||
padding-right: $grid-unit-30; | ||
} | ||
|
||
& + .dataviews-pagination { | ||
justify-content: space-between; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we substitute a few variables here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have an outstanding todo item for this gray. It will mean expanding the existing scale a bit, so needs a dedicated PR.
I'm not sure variables really necessary for shadows.