Skip to content

Commit 6399ec0

Browse files
authored
Merge pull request #3409 from projectblacklight/browse-hover-main
Browse hover main
2 parents 0dece92 + 760fc7c commit 6399ec0

File tree

3 files changed

+26
-33
lines changed

3 files changed

+26
-33
lines changed

app/assets/stylesheets/spotlight/_browse.scss

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,42 +54,38 @@ $image-overlay-max-height: 300px;
5454
}
5555

5656
.image-overlay {
57-
border: 2px solid $gray-600;
58-
border-radius: $border-radius-lg;
57+
border: var(--bs-border-width) solid var(--bs-border-color-translucent);
58+
border-radius: var(--bs-border-radius);
5959
max-height: 240px;
6060
min-height: 140px;
6161
overflow: hidden;
6262
position: relative;
6363

6464
.img-responsive {
65-
transition: all 0.5s ease;
6665
width: 100%;
67-
68-
&:hover {
69-
filter: brightness(70%);
70-
}
7166
}
7267
}
7368

7469
.text-overlay {
7570
position: absolute;
7671
bottom: 0;
7772
left: 0;
73+
height: 100%;
7874
width: 100%;
79-
background: linear-gradient(
80-
0deg,
81-
rgba(46, 45, 41, 0.7) 70%,
82-
rgba(46, 45, 41, 0) 100%
83-
);
75+
background: linear-gradient(0deg, rgba(46, 45, 41, 0.7) 45%, rgba(46, 45, 41, 0) 100%);
8476
color: $white;
85-
padding: 50px 20px 20px 20px;
86-
text-align: center;
77+
padding: 5%;
78+
display: flex;
79+
flex-direction: column;
80+
justify-content: flex-end;
8781

88-
// prevents potential blur caused by the vertical-align technique
89-
transform-style: preserve-3d;
82+
&:hover {
83+
background: linear-gradient(rgba(46, 45, 41, 0.7), 0%, rgba(46, 45, 41, 0.7) 100%);
84+
}
9085

9186
.browse-category-title {
9287
font-size: $h3-font-size;
88+
text-align: center;
9389

9490
.category-subtitle {
9591
display: block;

app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,33 @@ $xl-sidebar-five-tile-width: ($container-xl-sidebar * 0.2) - $tile-margin;
5656
background-size: cover;
5757
background-position: center;
5858
background-repeat: no-repeat;
59-
border: 2px solid $featured-browse-category-border-color;
60-
border-radius: $border-radius-lg;
59+
border: var(--bs-border-width) solid var(--bs-border-color-translucent);
60+
border-radius: var(--bs-border-radius);
6161
position: relative;
6262

6363
.category-caption {
6464
bottom: 0px;
6565
color: $featured-browse-category-caption-color;
6666
position: absolute;
6767
text-align: center;
68+
height: 100%;
6869
width: 100%;
69-
padding: 35px 15px 15px;
70-
background: linear-gradient(0deg, rgba(46, 45, 41, 0.7) 70%, rgba(46, 45, 41, 0) 100%);
71-
border-radius: $border-radius-lg;
70+
padding: 5%;
71+
background: linear-gradient(0deg, rgba(46, 45, 41, 0.7) 45%, rgba(46, 45, 41, 0) 100%);
72+
border-radius: var(--bs-border-radius);
73+
display: flex;
74+
flex-direction: column;
75+
justify-content: flex-end;
76+
77+
&:hover {
78+
background: linear-gradient(rgba(46, 45, 41, 0.7), 0%, rgba(46, 45, 41, 0.7) 100%);
79+
}
7280
}
7381

7482
.category-title {
7583
font-size: $h4-font-size;
7684
line-height: 1.2;
85+
text-align: center;
7786
margin: 0;
7887
padding: $spacer * 0.25;
7988

app/assets/stylesheets/spotlight/browse_group_categories_block.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,6 @@
88
.category-caption {
99
z-index: 100;
1010
}
11-
12-
.hover-overlay {
13-
height: 100%;
14-
position: absolute;
15-
width: 100%;
16-
}
17-
18-
&:hover {
19-
.hover-overlay {
20-
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
21-
}
22-
}
2311
}
2412

2513
.spotlight-flexbox.browse-categories .box {

0 commit comments

Comments
 (0)