Skip to content

Commit 88f394e

Browse files
committed
스타일 수정: MemeQuizResult 컴포넌트의 높이 및 마진을 뷰포트 비율에 맞게 조정하여 반응형 디자인 개선
1 parent 57b4bec commit 88f394e

File tree

1 file changed

+51
-4
lines changed

1 file changed

+51
-4
lines changed

apps/web/src/pages/MemeQuizPage/components/MemeQuizResult/MemeQuizResult.styles.ts

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ const ResultCard = styled(motion.div)`
1515
position: relative;
1616
width: calc(100% - 40px);
1717
max-width: ${({ theme }) => theme.breakpoints.mobile};
18-
height: 481px;
19-
margin-top: 4.375rem;
18+
height: 45vh;
19+
min-height: 400px;
20+
max-height: 481px;
21+
margin-top: 10vh;
2022
border-radius: 14px;
2123
background: linear-gradient(
2224
135deg,
@@ -27,6 +29,23 @@ const ResultCard = styled(motion.div)`
2729
flex-direction: column;
2830
align-items: center;
2931
overflow: hidden;
32+
33+
@media screen and (max-height: 700px) {
34+
height: 50vh;
35+
margin-top: 8vh;
36+
min-height: 350px;
37+
}
38+
39+
@media screen and (min-height: 800px) {
40+
height: 40vh;
41+
margin-top: 12vh;
42+
}
43+
44+
@media screen and (min-width: ${({ theme }) => theme.breakpoints.tablet}) {
45+
height: 35vh;
46+
margin-top: 8vh;
47+
max-height: 450px;
48+
}
3049
`;
3150

3251
const BackgroundImage = styled.img`
@@ -55,7 +74,15 @@ const Badge = styled(motion.div)`
5574
padding: 6px 10px;
5675
background-color: ${({ theme }) => theme.palette.common.black};
5776
border-radius: 50px;
58-
margin-top: 150px;
77+
margin-top: 20%;
78+
79+
@media screen and (max-height: 700px) {
80+
margin-top: 15%;
81+
}
82+
83+
@media screen and (min-width: ${({ theme }) => theme.breakpoints.tablet}) {
84+
margin-top: 12%;
85+
}
5986
`;
6087

6188
const BadgeText = styled.span`
@@ -74,11 +101,19 @@ const ResultTitle = styled(motion.h1)`
74101
${({ theme }) => theme.typography.title.display2};
75102
color: ${({ theme }) => theme.palette.common.black};
76103
margin-bottom: 6px;
104+
105+
@media screen and (max-height: 700px) {
106+
${({ theme }) => theme.typography.title.display1};
107+
}
77108
`;
78109

79110
const ResultSubtitle = styled.p`
80111
${({ theme }) => theme.typography.title.subhead1};
81112
color: ${({ theme }) => theme.palette.common.black};
113+
114+
@media screen and (max-height: 700px) {
115+
${({ theme }) => theme.typography.title.subhead2};
116+
}
82117
`;
83118

84119
const ButtonContainer = styled.div`
@@ -88,11 +123,14 @@ const ButtonContainer = styled.div`
88123
right: 0;
89124
width: 100%;
90125
max-width: ${({ theme }) => theme.breakpoints.mobile};
91-
padding: 0 20px 40px;
126+
padding: 0 20px min(40px, 5vh);
92127
margin: 0 auto;
93128
display: flex;
94129
flex-direction: column;
95130
gap: 14px;
131+
z-index: 10;
132+
background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
133+
padding-top: 20px;
96134
`;
97135

98136
const ShareButton = styled(motion.button)`
@@ -108,6 +146,10 @@ const ShareButton = styled(motion.button)`
108146
&:hover {
109147
background-color: ${({ theme }) => theme.palette.gray['gray-8']};
110148
}
149+
150+
@media screen and (max-height: 700px) {
151+
height: 48px;
152+
}
111153
`;
112154

113155
const MoreButton = styled(motion.button)`
@@ -123,6 +165,10 @@ const MoreButton = styled(motion.button)`
123165
&:hover {
124166
background-color: ${({ theme }) => theme.palette.main.pink[40]};
125167
}
168+
169+
@media screen and (max-height: 700px) {
170+
height: 48px;
171+
}
126172
`;
127173

128174
const ToastContainer = styled.div`
@@ -143,6 +189,7 @@ const Toast = styled(motion.div)`
143189
background-color: ${({ theme }) => theme.palette.gray['gray-1']};
144190
border-radius: 50px;
145191
white-space: nowrap;
192+
z-index: 20;
146193
`;
147194

148195
const ToastText = styled.span`

0 commit comments

Comments
 (0)