Skip to content
This repository was archived by the owner on Apr 7, 2025. It is now read-only.

Commit 930a059

Browse files
committed
feat: responsive styles for homepage collections
1 parent 0d09907 commit 930a059

File tree

1 file changed

+33
-16
lines changed

1 file changed

+33
-16
lines changed

src/components/HomepageCollection.module.scss

+33-16
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,6 @@
1111
transform: skewY(-2deg) translateY(-55px);
1212
z-index:-1;
1313
}
14-
15-
// &:after {
16-
// background-image: linear-gradient(0deg, var(--color-neutrals-100) 70%, rgba(255,255,255, 0));
17-
// content: '';
18-
// position: absolute;
19-
// left: 0;
20-
// right: 0;
21-
// transform: skewY(-2deg) translateY(-250px);
22-
// display: block;
23-
// height: 200px;
24-
// }
2514
}
2615

2716
.title {
@@ -31,16 +20,17 @@
3120
font-family: var(--secondary-font-family);
3221
text-align: center;
3322
line-height: 25px;
34-
margin-bottom: 6px;
23+
margin-bottom: 4px;
3524
font-weight: 400;
3625
}
3726

3827
.description {
3928
position: relative;
4029
z-index:100;
4130
margin: 0 0 30px 0;
31+
padding: 0 28px;
4232
font-size: 16px;
43-
line-height: 19px;
33+
line-height: 24px;
4434
color: var(--color-neutrals-600);
4535
text-align: center;
4636

@@ -81,14 +71,15 @@
8171
height: 105px;
8272
flex-shrink: 0;
8373
margin-right: 20px;
84-
animation-duration: 50s;
74+
animation-duration: 60s;
8575
animation-name: project-slide;
8676
animation-iteration-count: infinite;
8777
animation-direction: alternate;
8878
animation-timing-function: linear;
8979
position: relative;
9080
z-index: 100;
9181
box-shadow: 0px 0.913195px 0.802504px rgba(4, 22, 22, 0.00562291), 0px 2.19453px 1.92853px rgba(4, 22, 22, 0.00807786), 0px 4.13211px 3.63125px rgba(4, 22, 22, 0.01), 0px 7.37098px 6.47753px rgba(4, 22, 22, 0.0119221), 0px 13.7866px 12.1155px rgba(4, 22, 22, 0.0143771), 0px 33px 29px rgba(4, 22, 22, 0.02);
82+
pointer-events: none;
9283

9384
&:last-child {
9485
margin-right: 0;
@@ -98,7 +89,7 @@
9889
filter: blur(4px);
9990
animation-play-state: paused;
10091
opacity: .6;
101-
}
92+
}
10293
}
10394

10495
@keyframes project-slide {
@@ -119,9 +110,11 @@
119110
transition: transform .2s ease-out, opacity .2s;
120111
box-shadow: 0px 1.85406px 2.60122px rgba(5, 35, 39, 0.0562291), 0px 4.45557px 6.2511px rgba(5, 35, 39, 0.0807786), 0px 8.38944px 11.7703px rgba(5, 35, 39, 0.1), 0px 14.9653px 20.9961px rgba(5, 35, 39, 0.119221), 0px 27.991px 39.271px rgba(5, 35, 39, 0.143771);
121112
opacity: 0;
122-
113+
pointer-events: none;
114+
123115
.projects-hovered & {
124116
opacity: 1;
117+
pointer-events: inherit;
125118
transform: translate(-50%, 35px);
126119
transition: transform .08s ease-out;
127120

@@ -133,4 +126,28 @@
133126
transform: translate(-50%, 36px);
134127
}
135128
}
129+
}
130+
131+
// ==============================================================
132+
// Responsive styles
133+
// ==============================================================
134+
135+
@media screen and (max-width: 900px) {
136+
.projects-container:before,
137+
.projects-container:after {
138+
display: none;
139+
}
140+
}
141+
142+
@media screen and (max-width: 600px) {
143+
.project h4 {
144+
max-width: 19ch;
145+
white-space: nowrap;
146+
}
147+
}
148+
149+
@media screen and (max-width: 480px) {
150+
.project {
151+
animation-duration: 30s;
152+
}
136153
}

0 commit comments

Comments
 (0)