Skip to content

Commit 9e2bbfe

Browse files
authored
Merge pull request #3401 from projectblacklight/hover-visibility
Use icon instead of a carat character
2 parents e23bb49 + 8bbe476 commit 9e2bbfe

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

app/assets/stylesheets/blacklight/_constraints.scss

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
}
66

77
.applied-filter {
8+
--separator-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor'%3e%3cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");
9+
810
.constraint-value {
911
cursor: default;
1012
text-overflow: ellipsis;
@@ -27,19 +29,23 @@
2729
max-width: breakpoint-min(lg) * 0.5;
2830
}
2931

30-
&:hover,
31-
&:active {
32-
background-color: $secondary;
33-
border-color: $secondary;
34-
box-shadow: none;
32+
.filter-name:after {
33+
background-color: var(--bs-btn-color);
34+
content: "";
35+
mask: var(--separator-icon);
36+
mask-repeat: no-repeat;
37+
display: inline-block;
38+
height: 1.1rem;
39+
width: 1.25rem;
40+
vertical-align: text-bottom;
41+
margin-right: -0.2rem;
42+
margin-left: 0.25rem;
43+
transition: background-color 0.15s ease-in-out;
3544
}
36-
}
3745

38-
.filter-name:after {
39-
color: $gray-500;
40-
content: "";
41-
font-size: 90%;
42-
padding-left: $caret-width;
46+
&:hover .filter-name:after {
47+
background-color: var(--bs-btn-hover-color);
48+
}
4349
}
4450

4551
.remove {

0 commit comments

Comments
 (0)