Css calc not working in IE11 with linear gradient

Viewed 3124

*{
  margin:0; padding: 0;
}
body {
 background-color: orangered;
}
.content {
  margin-top: 200px;
  height: 100vh;
  background-color: #fdfdff;
}
.tilt {
  position: relative;
}
.tilt:before {
  content: '';
    padding-top: 8.74887%;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    background-image: linear-gradient(5deg, #fdfdff calc(50% - 1px), transparent 50%);
}
<div class="content tilt">

</div>

It seems that IE11 has some problems understanting calc() css property.

I am using calc with linear-gradient in this way:

background-image: linear-gradient(5deg, #fdfdff calc(50% - 1px), transparent 50%);

But when I use it as this:

background-image: linear-gradient(5deg, #fdfdff, transparent 50%);

It works without problems.

And there is one more thing that I don't understand. When I inspect that property in IE11, turn it off and back on it works.

The whole point of using calc(50% - 1px) is that angle looks smoother, that is it.

Any suggestions?

1 Answers
Related