Improve icon to remove investment from ballot

Note we're absolutely positioning the link instead of the icon; that way
keyboard users will be able to focus on the icon. Until now, users would
focus on an empty link.

For the same reason, we couldn't use `click_link` with Capybara, since
it would fail to click an empty link. Now we can.

Co-authored-by: Javi Martín <javim@elretirao.net>
This commit is contained in:
Alberto
2020-05-16 06:07:41 +02:00
committed by Javi Martín
parent 8be7abe5fd
commit 896fee6e99
3 changed files with 13 additions and 25 deletions

View File

@@ -14,22 +14,15 @@
font-style: italic;
}
.remove-investment-project {
display: block;
height: 0;
.remove-budget-investment {
@include has-fa-icon(times, solid);
font-size: rem-calc(20);
position: absolute;
right: rem-calc(6);
top: rem-calc(6);
.icon-x {
color: #9f9f9f;
font-size: rem-calc(24);
line-height: $line-height / 2;
position: absolute;
right: 6px;
text-decoration: none;
top: 6px;
@include breakpoint(medium) {
font-size: $base-font-size;
}
&::before {
margin-right: 0;
}
}
@@ -43,9 +36,5 @@
outline: 0;
text-decoration: none;
}
.remove-investment-project .icon-x {
color: #fff;
}
}
}