When combining a vertical-gradient and a box-shadow on a vertical centered element it displays a white line between the element and the shadow (at certain sizes).
To be able to show the problem the code snippet forces a size where this problem occurs, in the real case example the heigh scales with the viewport.
This issue happens on Chrome Version 71.0.3578.98 (Safari renders well, didn't test any other browser).
Is there any workarounds that could solve this issue apart of dropping the gradient?
.center {
height: 96px;
display: inline-flex;
}
.box {
width: 50px;
height: 61%;
margin: auto 0;
margin-right: 5px;
background-color: blue;
box-shadow: navy 0 20px 0;
}
.box--grad {
background: radial-gradient(circle at top, #207ee2 60%, #90bded 150%);
}
<div class="center">
<div class="box"></div>
<div class="box box--grad"></div>
</div>