Skip to content

Commit

Permalink
Use icon instead of a carat character
Browse files Browse the repository at this point in the history
The characeter will be read by a screen reader, which is undesirable.
  • Loading branch information
jcoyne committed Oct 24, 2024
1 parent 2f9ce11 commit f16557c
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions app/assets/stylesheets/blacklight/_constraints.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
}

.applied-filter {
--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");

.constraint-value {
cursor: default;
text-overflow: ellipsis;
Expand All @@ -27,19 +29,22 @@
max-width: breakpoint-min(lg) * 0.5;
}

&:hover,
&:active {
background-color: $secondary;
border-color: $secondary;
box-shadow: none;
.filter-name:after {
background-color: var(--bs-btn-color);
content: "";
mask: var(--separator-icon);
mask-repeat: no-repeat;
display: inline-block;
height: 1.1rem;
width: 1.25rem;
vertical-align: text-bottom;
margin-right: -0.4rem;
transition: background-color 0.15s ease-in-out;
}
}

.filter-name:after {
color: $gray-500;
content: "";
font-size: 90%;
padding-left: $caret-width;
&:hover .filter-name:after {
background-color: var(--bs-btn-hover-color);
}
}

.remove {
Expand Down

0 comments on commit f16557c

Please sign in to comment.