I'm just working with linear-gradient in css, btw the generated gradient effect isn't same as the designs. I have never faced this problem in any Android, iOS, React Native or HTML5 canvas yet, but only on css.
.gradient {
background-image: linear-gradient(to right top, red, blue);
}
I have made a fiddle for showing the differences between css's linear-gradient and canvas's create createLinearGradient.
Please check this fiddle link.

The upper is css gradient and lower is canvas one.
As you can see the canvas's createLinearGradient working well as expected, but on the css the same-color-line(yellow line in above pic) isn't vertical of the gradient's direction, rather looks as the another diagonal of the element.
Is there any reason why is it in css?