Skip to content

Commit 826c167

Browse files
authored
Merge pull request #6758 from Lakshay-Pareek/mobile-view
Fixing Image Aspect Ratio & Font Scaling on Mobile
2 parents dd86543 + 6acaff1 commit 826c167

1 file changed

Lines changed: 15 additions & 26 deletions

File tree

src/sections/Kanvas/Kanvas-design/Kanvas_Mobile_swiper/mobile-swiper.style.js

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
import styled from "styled-components";
2-
32
const SwiperContainer = styled.div`
43
@media (min-width: 768px) {
54
display: none;
65
}
7-
86
.swiper-slide {
97
border-radius: 20px;
108
}
11-
129
.card.one {
1310
background: linear-gradient(222deg, #077165 2.76%, #1D2827 117.91%);
1411
}
@@ -24,19 +21,15 @@ const SwiperContainer = styled.div`
2421
.card.four {
2522
background: linear-gradient(180deg, #202020 -32.18%, #18433F 52.35%, #0B7E71 106.65%, #00B39F 142.23%);
2623
}
27-
2824
.card {
2925
/* box-shadow: rgb(38, 57, 77, 0.5) 0px 20px 30px -10px; */
3026
/* box-shadow: none; */
31-
3227
/* background: linear-gradient(
3328
266.65deg,
3429
#00b39f 40.19%,
3530
#477e96 74.31%,
3631
#3c494f 92.89%
37-
3832
); */
39-
4033
height: 70vh;
4134
padding: 1rem;
4235
border-radius: 20px;
@@ -46,7 +39,7 @@ const SwiperContainer = styled.div`
4639
justify-content: center;
4740
}
4841
.card img {
49-
height: 40%;
42+
height: 50%;
5043
width: 100%;
5144
/* margin-left: 1.5rem; */
5245
}
@@ -69,32 +62,30 @@ const SwiperContainer = styled.div`
6962
height: 60vh;
7063
}
7164
.card img {
72-
height: 30%;
65+
height: 40%;
7366
width: auto;
7467
}
7568
}
76-
7769
@media (max-width: 577px) {
7870
.card {
7971
width: 62vw;
8072
}
8173
h2 {
82-
font-size: 1.4rem;
74+
font-size: 1.1rem;
8375
}
8476
p {
85-
font-size: 1rem;
77+
font-size: 0.9rem;
8678
}
8779
}
88-
8980
@media (max-width: 520px) {
9081
.card {
9182
height: 55vh;
9283
}
9384
h2 {
94-
font-size: 1.2rem;
85+
font-size: 1rem;
9586
}
9687
p {
97-
font-size: 0.8rem;
88+
font-size: 0.85rem;
9889
}
9990
}
10091
@media (max-width: 490px) {
@@ -114,7 +105,7 @@ const SwiperContainer = styled.div`
114105
padding: 0.5rem;
115106
}
116107
.card img {
117-
height: 30%;
108+
height: 40%;
118109
}
119110
p {
120111
line-height: 19px;
@@ -126,16 +117,16 @@ const SwiperContainer = styled.div`
126117
padding: 0.7rem;
127118
}
128119
.card img {
129-
height: 25%;
120+
height: 35%;
130121
}
131122
}
132123
@media (max-width: 380px) {
133124
width: 65vw;
134125
h2 {
135-
font-size: 0.9rem;
126+
font-size: 0.95rem;
136127
}
137128
p {
138-
font-size: 0.7rem;
129+
font-size: 0.75rem;
139130
line-height: 18px;
140131
}
141132
.card {
@@ -152,30 +143,28 @@ const SwiperContainer = styled.div`
152143
width: 64vw;
153144
padding: 0.7rem;
154145
}
155-
156-
p {
146+
.card h2 {
147+
font-size: 0.9rem; /* Added specific targeting */
148+
}
149+
.card p {
150+
font-size: 0.7rem; /* Added specific targeting */
157151
line-height: 16px;
158152
}
159153
}
160-
161154
margin-top: 10%;
162155
border-radius: 20px;
163156
width: 57vw;
164157
text-align: center;
165-
166158
.swiper {
167159
width: 100%;
168160
height: 100%;
169161
}
170-
171162
h1 {
172163
text-align: center;
173164
}
174-
175165
h2 {
176166
margin: 0 0 1rem 0;
177167
}
178-
179168
h6 {
180169
margin: 10px 0 2.5rem 0;
181170
}

0 commit comments

Comments
 (0)