File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -32,18 +32,18 @@ const Rail = styled.div`
32
32
display: grid;
33
33
grid-column-gap: ${ ( { gap } ) => `${ gap } px` } ;
34
34
position: relative;
35
- transition: left 0.5s cubic-bezier(0.2, 1, 0.3, 1) 0s;
35
+ transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1) 0s;
36
36
grid-template-columns: ${ ( { page } ) => `repeat(${ page } , 100%)` } ;
37
- left : ${ ( { currentPage, gap } ) =>
38
- `calc(${ - 100 * currentPage } % - ${ gap * currentPage } px)` } ;
37
+ transform : ${ ( { currentPage, gap } ) =>
38
+ `translateX( calc(${ - 100 * currentPage } % - ${ gap * currentPage } px) )` } ;
39
39
40
40
@media screen and (max-width: ${ ( { mobileBreakpoint } ) =>
41
41
mobileBreakpoint } px) {
42
42
padding-left: ${ ( { gap } ) => `${ gap } px` } ;
43
43
grid-template-columns: ${ ( { page } ) => `repeat(${ page } , 90%)` } ;
44
44
grid-column-gap: ${ ( { cols, rows, gap } ) =>
45
45
`calc(${ ( cols * rows - 1 ) * 90 } % + ${ cols * rows * gap } px)` } ;
46
- left: 0 ;
46
+ transform: translateX(0) ;
47
47
}
48
48
`
49
49
You can’t perform that action at this time.
0 commit comments