Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/gradients/conic-gradient-positioning.html

Issue 2908053002: CSS Conic Gradients: do not support unitless 0 angles (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <style> 3 <style>
4 div { 4 div {
5 width: 78px; 5 width: 78px;
6 height: 78px; 6 height: 78px;
7 border: 1px solid grey; 7 border: 1px solid grey;
8 display: inline-block; 8 display: inline-block;
9 margin: 2px; 9 margin: 2px;
10 } 10 }
11 </style> 11 </style>
12 12
13 <body> 13 <body>
14 <script> 14 <script>
15 function appendConicGradient(pos) { 15 function appendConicGradient(pos) {
16 var div = document.createElement('div'); 16 var div = document.createElement('div');
17 17
18 div.setAttribute('style', 'background: conic-gradient(' + pos + ', red, yell ow, lime, aqua, blue, magenta, red)'); 18 div.setAttribute('style', 'background: conic-gradient(' + pos + ', red, yell ow, lime, aqua, blue, magenta, red)');
19 document.body.appendChild(div); 19 document.body.appendChild(div);
20 } 20 }
21 21
22 var pos = [ '25%', 'center', '75%' ]; 22 var pos = [ '25%', 'center', '75%' ];
23 var rot = [ '0', '20deg', '40deg', '60deg', '80deg' ]; 23 var rot = [ '0deg', '20deg', '40deg', '60deg', '80deg' ];
24 24
25 rot.forEach(function(r) { 25 rot.forEach(function(r) {
26 pos.forEach(function(x) { 26 pos.forEach(function(x) {
27 pos.forEach(function(y) { 27 pos.forEach(function(y) {
28 appendConicGradient('from ' + r + ' at ' + x + ' ' + y); 28 appendConicGradient('from ' + r + ' at ' + x + ' ' + y);
29 }); 29 });
30 }); 30 });
31 document.body.appendChild(document.createElement('br')); 31 document.body.appendChild(document.createElement('br'));
32 }); 32 });
33 33
34 </script> 34 </script>
35 </body> 35 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698