Skip to content

Commit

Permalink
Merge pull request #56 from themoment-team/feature/UpdateCSS
Browse files Browse the repository at this point in the history
Update CSS
  • Loading branch information
frorong authored Apr 16, 2024
2 parents 5d92f3d + 8ee0565 commit bcc1b42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/components/Slide/PC/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ export const VectorWrapper = styled.div<{ isRight?: boolean }>`
export const Cards = styled.div`
width: 71rem;
height: 21.5625rem;
position: relative;
overflow: hidden;
`;

export const MoveContainer = styled.div<{ slideIndex: number }>`
display: flex;
gap: 1.75rem;
position: absolute;
left: -${({ slideIndex }) => slideIndex * 72.75}rem;
transform: translateX(-${({ slideIndex }) => slideIndex * 72.75}rem);
transition: ease-in-out 0.3s;
`;

Expand Down
11 changes: 5 additions & 6 deletions src/components/Slide/Tablet/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@ export const Cards = styled.div`
76vw + 1.75rem
); // 한페이지의 카드 width * 카드 개수 + 카드 사이 gap
height: calc(76vw + 1.75rem);
position: relative;
overflow: hidden;
`;

export const Slider = styled.div<{ slideIndex: number }>`
position: absolute;
left: ${({ slideIndex }) =>
`calc(${slideIndex * -76}vw + ${
slideIndex * -3.5
}rem)`}; // 한페이지의 카드 width * 카드 개수 + 카드 사이 gap * 2
transform: translateX(
${({ slideIndex }) =>
`calc(${slideIndex * -76}vw + ${slideIndex * -3.5}rem)`}
);
// 한페이지의 카드 width * 카드 개수 + 카드 사이 gap * 2
transition: ease-in-out 0.3s;
`;

Expand Down
1 change: 1 addition & 0 deletions src/styles/GlobalStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export function GlobalStyle() {
max-width: 100vw;
overflow-x: hidden;
background-color: ${theme.gray[0]};
transition: background-color 0.3s ease-in-out;
}
@media all and (min-width: 1150px) and (min-height: 1000px) {
Expand Down

0 comments on commit bcc1b42

Please sign in to comment.