Skip to content

Commit

Permalink
Data Views: Standardize reduced motion handling using media queries (#…
Browse files Browse the repository at this point in the history
…68422)

* Data Views: Standardize reduced motion handling using media queries

* Data Views: Move container-type property to logical layout grouping

Co-authored-by: Infinite-Null <[email protected]>
Co-authored-by: t-hamano <[email protected]>
  • Loading branch information
3 people authored Jan 13, 2025
1 parent 9641b36 commit d3758ce
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
7 changes: 5 additions & 2 deletions packages/dataviews/src/components/dataviews-footer/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
padding: $grid-unit-15 $grid-unit-60;
border-top: $border-width solid $gray-100;
flex-shrink: 0;
transition: padding ease-out 0.1s;
@include reduce-motion("transition");

@media not (prefers-reduced-motion) {
transition: padding ease-out 0.1s;
}

z-index: z-index(".dataviews-footer");
}

Expand Down
12 changes: 8 additions & 4 deletions packages/dataviews/src/components/dataviews/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
flex-shrink: 0;
position: sticky;
left: 0;
transition: padding ease-out 0.1s;
@include reduce-motion( "transition" );

@media not (prefers-reduced-motion) {
transition: padding ease-out 0.1s;
}
}

.dataviews-no-results,
Expand All @@ -29,8 +31,10 @@
display: flex;
align-items: center;
justify-content: center;
transition: padding ease-out 0.1s;
@include reduce-motion( "transition" );

@media not (prefers-reduced-motion) {
transition: padding ease-out 0.1s;
}
}

@container (max-width: 430px) {
Expand Down
5 changes: 3 additions & 2 deletions packages/dataviews/src/dataviews-layouts/grid/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
margin-bottom: auto;
grid-template-rows: max-content;
padding: 0 $grid-unit-60 $grid-unit-30;
transition: padding ease-out 0.1s;
container-type: inline-size;
@include reduce-motion("transition");

@media not (prefers-reduced-motion) {
transition: padding ease-out 0.1s;
}

.dataviews-view-grid__card {
height: 100%;
Expand Down

0 comments on commit d3758ce

Please sign in to comment.