Interestingly, your first example works, I would not expect that ... good to know, I think!
. , position:relative, absolute, , , top:[50% - half the height, rounded]. :
.fancy-strikethrough {
color: green;
position: relative;
}
.fancy-strikethrough::after {
content: '';
position: absolute;
left: 0;
top: 50%;
height: 1px;
width: 100%;
background: red;
}
<a class="fancy-strikethrough">test</a>
Hide result, .