CKTIS / CSS
repeating-conic-gradient() — repeating angular sectors
`repeating-conic-gradient()` creates a conic image whose segment between the first and last stop repeats around the center.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
repeating-conic-gradient( <conic-gradient-syntax> )repeating-conic-gradient() creates a conic image whose segment between the first and last stop repeats around the center.
Example repeating-conic-gradient(red 0deg 30deg, blue 30deg 60deg) gives pixel 255,0,0,255 at 15°, 0,0,255,255 at 45°, and 255,0,0,255 again at 75°; image support is true. This proves the 60-degree period is rendered rather than merely parsed.
Grammar: repeating-conic-gradient( <conic-gradient-syntax> ).
0deg is at the top and angles increase clockwise through 360deg. from rotates the whole gradient, at moves its center, and double-position stops create hard sectors. Stop percentages map the full turn, while an optional interpolation method chooses the color space; the current default is Oklab. The gradient has no intrinsic size and fills its image area.
Examples
const gradient='repeating-conic-gradient(red 0deg 30deg, blue 30deg 60deg)';
const svg='<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100" height="100"><div xmlns="http://www.w3.org/1999/xhtml" style="width:100px;height:100px;background:'+gradient+'"></div></foreignObject></svg>';
const image=new Image();image.src='data:image/svg+xml;charset=utf-8,'+encodeURIComponent(svg);await image.decode();const canvas=document.createElement('canvas');canvas.width=canvas.height=100;const context=canvas.getContext('2d');context.drawImage(image,0,0);const pixel=(x,y)=>[...context.getImageData(x,y,1,1).data].join(',');
console.log('15deg='+pixel(60,11)+'; 45deg='+pixel(78,22)+'; 75deg='+pixel(89,40)+'; supported='+CSS.supports('background-image',gradient));Result
15deg=255,0,0,255; 45deg=0,0,255,255; 75deg=255,0,0,255; supported=true
`repeating-conic-gradient()` creates a conic image whose segment between the first and last stop repeats around the center.