Skip to content

Commit 7529921

Browse files
committed
another one
1 parent ac663f5 commit 7529921

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

assets/css/style.scss

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -204,25 +204,21 @@
204204
}
205205
}
206206
}
207-
208207
#robots {
209208
#robot-card {
210209
position: relative;
210+
211211
.image {
212212
position: relative;
213213
background-size: cover;
214214
background-position: center;
215-
// rounded corners
216215
border-radius: 10px;
217-
// hide any image which goes outside the corner radius
218216
overflow: hidden;
219-
// black and white image with a nice fade to color
220217
transition: filter 0.5s ease, transform 0.5s ease;
221218
filter: grayscale(100%);
222-
z-index: 1;
223219
}
220+
224221
.overlay {
225-
// for text on top of the image
226222
position: absolute;
227223
top: 0;
228224
left: 0;
@@ -235,30 +231,32 @@
235231
background-color: rgba(0, 0, 0, 0.5);
236232
text-align: center;
237233
pointer-events: none;
238-
z-index: 2;
234+
transition: opacity 0.5s ease;
239235
}
240236

241-
// upon hover, make image color
242237
.robot-link:hover .image {
243238
filter: grayscale(0%);
244239
}
245-
240+
246241
.robot-link:hover .overlay {
247242
opacity: 0;
248243
}
249244

250-
h2 {
251-
color: var(--primary) !important; // text is accent color
252-
}
253-
254245
h2, p {
246+
color: var(--primary) !important;
255247
z-index: 2;
256248
position: relative;
257249
transition: opacity 0.5s ease;
250+
pointer-events: none; /* Ensure text isn't interactable */
251+
}
252+
253+
.robot-link:hover h2, .robot-link:hover p {
254+
opacity: 0;
258255
}
259256
}
260257
}
261258

259+
262260
#blog {
263261
.hero-body {
264262
padding: 3rem 0.25rem 1rem 0.25rem;

0 commit comments

Comments
 (0)