Different degree rendering with and without -webkit- Prefix

-webkit-linear-gradient is counting degrees counterclockwise. 0° is at the left side. linear-gradient is counting degrees clockwise. 0° is at the bottom side. To convert the degrees of the standard linear-gradient to the -webkit-prefix degrees: -webkit-prefix-degrees = (360 - standard-degrees) + 90

by WebCore_IT

HTML

<h1>Different degree rendering with and without -webkit- Prefix</h1>
<div class="with-prefix"><h2>with prefix</h2></div>
<div class="no-prefix"><h2>without prefix</h2></div>

CSS

div {
    text-align: center;
    width: 200px;
    height: 200px;
    float: left;
    margin: 1em;
    border: 1px solid black;
}

div.with-prefix {
	background:
		-webkit-linear-gradient(45deg, hsla(340, 100%, 55%, 1) 0%, hsla(340, 100%, 55%, 0) 70%),
		-webkit-linear-gradient(135deg, hsla(225, 95%, 50%, 1) 10%, hsla(225, 95%, 50%, 0) 80%),
		-webkit-linear-gradient(225deg, hsla(140, 90%, 50%, 1) 10%, hsla(140, 90%, 50%, 0) 80%),
		-webkit-linear-gradient(315deg, hsla(35, 95%, 55%, 1) 100%, hsla(35, 95%, 55%, 0) 70%);	
}
div.no-prefix {    
	background:
		linear-gradient(45deg, hsla(340, 100%, 55%, 1) 0%, hsla(340, 100%, 55%, 0) 70%),
		linear-gradient(135deg, hsla(225, 95%, 50%, 1) 10%, hsla(225, 95%, 50%, 0) 80%),
		linear-gradient(225deg, hsla(140, 90%, 50%, 1) 10%, hsla(140, 90%, 50%, 0) 80%),
		linear-gradient(315deg, hsla(35, 95%, 55%, 1) 100%, hsla(35, 95%, 55%, 0) 70%);
}

JavaScript

// You need Chrome 26+ or Safari 6.1+ to see the difference.

/*
-webkit-linear-gradient is counting degrees counterclockwise. 
0° is at the left side.

linear-gradient is counting degrees clockwise. 
0° is at the bottom side.

To convert the degrees of the standard linear-gradient to the -webkit-prefix degrees: 
-webkit-prefix-degrees = (360 - standard-degrees) + 90
*/