Skip to content

Commit fcb4930

Browse files
committed
Colored when not hovered
1 parent 92c2e0c commit fcb4930

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

_includes/robot-card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<a href="{{site.url}}{{site.baseurl}}/{{robot.page}}" class="robot-link">
66
<figure class="image is-5by4" style="background-image: url({{robot.image}});">
77
<div class="overlay">
8-
<h2 class="has-text-primary has-text-weight-bold is-size-3">{{ robot.year }}</h2>
8+
<h2 class="has-text-weight-bold is-size-3">{{ robot.year }}</h2>
99
<p class="has-text-white-ter has-text-weight-normal">{{ robot.name }}</p>
1010
</div>
1111
</figure>

assets/css/style.scss

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -239,18 +239,17 @@
239239
// upon hover, make image color
240240
.robot-link:hover .image {
241241
filter: grayscale(0%);
242-
color: transparent;
243242
}
244243

245-
&::after {
246-
h2 {
247-
color: var(--primary) !important; // text is accent color
248-
z-index: 2; // text on top
249-
}
250-
251-
p {
252-
z-index: 2; // text on top
253-
}
244+
h2 {
245+
color: var(--primary) !important; // text is accent color
246+
z-index: 2; // text on top
247+
position: relative;
248+
}
249+
250+
p {
251+
z-index: 2; // text on top
252+
position: relative;
254253
}
255254
}
256255
}

0 commit comments

Comments
 (0)