Skip to content

Commit

Permalink
Update field spacing in grid layout (#63363)
Browse files Browse the repository at this point in the history
Co-authored-by: jameskoster <[email protected]>
Co-authored-by: jasmussen <[email protected]>
  • Loading branch information
3 people committed Jul 11, 2024
1 parent 63c8ad1 commit 0af53eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dataviews/src/layouts/grid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function GridItem< Item >( {
</HStack>
) }
{ !! visibleFields?.length && (
<VStack className="dataviews-view-grid__fields" spacing={ 3 }>
<VStack className="dataviews-view-grid__fields" spacing={ 1 }>
{ visibleFields.map( ( field ) => {
const renderedValue = field.render( {
item,
Expand Down
7 changes: 7 additions & 0 deletions packages/dataviews/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@

.dataviews-view-grid__field {
align-items: flex-start;
min-height: $grid-unit-30;

&:not(.is-column) {
align-items: center;
Expand All @@ -377,6 +378,12 @@
}
}

&.is-column {
& + .is-row {
margin-top: $grid-unit-05;
}
}

.dataviews-view-grid__field-name {
color: $gray-700;
}
Expand Down

1 comment on commit 0af53eb

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 0af53eb.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9892953914
📝 Reported issues:

Please sign in to comment.