Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/dataviews/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Bug Fixes

- DataViews: Fix incorrect documentation for `defaultLayouts` prop. [#71334](https://github.com/WordPress/gutenberg/pull/71334)
- DataViews: Fix mismatched padding on mobile viewports for grid layout [#71455](https://github.com/WordPress/gutenberg/pull/71455)

## 7.0.0 (2025-08-20)

Expand Down
12 changes: 9 additions & 3 deletions packages/dataviews/src/dataviews-layouts/grid/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
padding: 0 $grid-unit-60 $grid-unit-30;
container-type: inline-size;
/**
* Breakpoints were adjusted from media queries breakpoints to account for
* the sidebar width. This was done to match the existing styles we had.
* Match the padding applied to other DataViews components at the same
* max-width.
*/
@container (max-width: 480px) {
@container (max-width: 430px) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh interesting, I wonder why the discrepancy was introduced? I believe the 480px value was reached from some calculation based on the gutenberg media queries with the site editor sidebar width. I can't find any explanation for where the 430 value comes from but I see it's also used in edit-site.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't find a reason. The container query originally had some grid related css in it, so maybe the styles were more focused on the gird.

padding-left: $grid-unit-30;
padding-right: $grid-unit-30;
}
Expand Down Expand Up @@ -162,4 +162,10 @@
color: $gray-900;
margin: 0 0 $grid-unit-10 0;
padding: 0 $grid-unit-60;
container-type: inline-size;

@container (max-width: 430px) {
padding-left: $grid-unit-30;
padding-right: $grid-unit-30;
}
}
Loading