Skip to content

Commit c078998

Browse files
authored
Merge pull request #3344 from projectblacklight/img-responsive
Change style on browse thubmnail design hover
2 parents 14d40f5 + 8d60576 commit c078998

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

app/assets/stylesheets/spotlight/_browse.scss

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $image-overlay-max-height: 300px;
4242
margin-bottom: $spacer;
4343

4444
.nav-link {
45-
margin-bottom: $spacer * .75;
45+
margin-bottom: $spacer * 0.75;
4646
}
4747
}
4848

@@ -61,8 +61,13 @@ $image-overlay-max-height: 300px;
6161
overflow: hidden;
6262
position: relative;
6363

64-
img {
64+
.img-responsive {
65+
transition: all 0.5s ease;
6566
width: 100%;
67+
68+
&:hover {
69+
filter: brightness(70%);
70+
}
6671
}
6772
}
6873

@@ -71,7 +76,11 @@ $image-overlay-max-height: 300px;
7176
bottom: 0;
7277
left: 0;
7378
width: 100%;
74-
background: linear-gradient(0deg, rgba(46, 45, 41, 0.7) 70%, rgba(46, 45, 41, 0) 100%);
79+
background: linear-gradient(
80+
0deg,
81+
rgba(46, 45, 41, 0.7) 70%,
82+
rgba(46, 45, 41, 0) 100%
83+
);
7584
color: $white;
7685
padding: 50px 20px 20px 20px;
7786
text-align: center;
@@ -93,10 +102,6 @@ $image-overlay-max-height: 300px;
93102
text-transform: uppercase;
94103
}
95104
}
96-
97-
&:hover {
98-
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
99-
}
100105
}
101106

102107
@media screen and (max-width: breakpoint-max("sm")) {
@@ -106,19 +111,29 @@ $image-overlay-max-height: 300px;
106111
max-height: $image-overlay-max-height;
107112
max-width: 350px;
108113
}
109-
.text-overlay .browse-category-title {font-size: $h3-font-size;}
114+
.text-overlay .browse-category-title {
115+
font-size: $h3-font-size;
116+
}
110117
}
111118
@media screen and (min-width: breakpoint-min("sm")) and (max-width: breakpoint-max("md")) {
112119
$image-overlay-max-height: 240px;
113-
.image-overlay {max-height: $image-overlay-max-height;}
120+
.image-overlay {
121+
max-height: $image-overlay-max-height;
122+
}
114123
}
115124
@media screen and (min-width: breakpoint-min("md")) and (max-width: breakpoint-max("lg")) {
116125
$image-overlay-max-height: 250px;
117-
.text-overlay .browse-category-title {font-size: $h4-font-size;}
118-
.image-overlay {max-height: $image-overlay-max-height;}
126+
.text-overlay .browse-category-title {
127+
font-size: $h4-font-size;
128+
}
129+
.image-overlay {
130+
max-height: $image-overlay-max-height;
131+
}
119132
}
120133
@media screen and (min-width: breakpoint-min("lg")) {
121-
.image-overlay {max-height: $image-overlay-max-height;}
134+
.image-overlay {
135+
max-height: $image-overlay-max-height;
136+
}
122137
}
123138
}
124139

0 commit comments

Comments
 (0)