Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="sunburst">
	<!-- dashes -->
	<section class="dashes"></section>
	<!-- outer colour -->
	<section class="circle"></section><!--2-->
	<section class="circle"></section>
	<section class="circle"></section>
	<section class="circle"></section>
	<section class="circle"></section>
	<section class="circle"></section>
	
	<!--mid colour -->
	<section class="circle"></section><!--8-->
	<section class="circle"></section>
	<section class="detail"></section><!--10-->
	<section class="circle"></section>
	<section class="circle"></section>
	
	<!-- inner colour -->
	<section class="circle"></section><!--13-->
	<section class="circle"></section>
	<section class="circle"></section>
	<section class="circle"></section>
	<section class="circle"></section>
	<section class="circle"></section>
	<section class="circle"></section>

	<section class="burst"></section><!--20-->
	<section class="burst"></section>
	
</div>
              
            
!

CSS

              
                /* settings */
body {
	--black: #222;
	--pink: #E52F70;
	
	--bk: oldlace;
	--col1: darkkhaki;
	--col2: indianred;
	--col3: lightseagreen;
	--detail: darkgray;
	
	background-color: var(--bk);
}
/* container */
#sunburst {
	border-radius: 50%;
	width: 90vmin; height: 90vmin;
	margin: 5vmin auto;
	
	display: grid;
	grid-template-areas: "chart";
	place-items: center;
}

/* all sections */
section {
	grid-area: chart;
	border-radius: 50%;
	background-repeat: no-repeat;
	background-position: center;
}

/* counts down for each section, means inner is first here */
.circle:nth-of-type(19) {
	width: 18vmin; height: 18vmin;
	border: 1px solid var(--bk);
	
	background-image:
		radial-gradient(circle at center, var(--bk) 70%, transparent 70%),
		conic-gradient(
			var(--bk) 36deg,
			var(--col1) 36deg 110deg, var(--bk) 110deg
		)
	;
	background-size: 15vmin 15vmin, 18vmin 18vmin;
}
.circle:nth-of-type(18) {
	width: 21vmin; height: 21vmin;
	
	background-image:
		conic-gradient(
			var(--bk) 70deg,
			var(--col1) 70deg 250deg, var(--bk) 250deg
		)
	;
}
.circle:nth-of-type(17) {
	width: 24vmin; height: 24vmin;
	
	background-image:
		conic-gradient(
			var(--bk) 190deg,
			var(--col1) 190deg 250deg, var(--bk) 250deg
		)
	;
}
.circle:nth-of-type(16) {
	width: 27vmin; height: 27vmin;
	
	background-image:
		conic-gradient(
			var(--bk) 46deg,
			var(--col1) 46deg 120deg, var(--bk) 120deg 220deg,
			var(--col1) 220deg 260deg, var(--bk) 260deg
		)
	;
}
.circle:nth-of-type(15) {
	width: 30vmin; height: 30vmin;
	border: 1px solid var(--bk);
	
	background-image:
		conic-gradient(
			var(--bk) 180deg,
			var(--col1) 180deg 290deg, var(--bk) 290deg
		)
	;
}
.circle:nth-of-type(14) {
	width: 33vmin; height: 33vmin;
	
	background-image:
		conic-gradient(
			var(--bk) 210deg,
			var(--col1) 210deg 290deg, var(--bk) 290deg
		)
	;
}
.circle:nth-of-type(13) {
	width: 39vmin; height: 39vmin; 
	border: 2px solid var(--detail);
	
	background-image:
		conic-gradient(
			var(--bk) 280deg,
			var(--col1) 280deg 290deg, var(--bk) 290deg
		)
	;
}

/* second group */
.circle:nth-of-type(12) {
	width: 42vmin; height: 42vmin; 
	
	background-image:
		conic-gradient(
			var(--bk) 160deg,
			var(--col2) 160deg 360deg, var(--bk) 360deg
		)
	;
}
.circle:nth-of-type(11) {
	width: 48vmin; height: 48vmin; 
	border: 1px solid var(--bk);

	background-image:
		conic-gradient(
			var(--bk) 200deg,
			var(--col2) 200deg 360deg, var(--bk) 360deg
		)
	;
}
.detail:nth-of-type(10) {
	width: 52vmin; height: 32vmin; 
	border: 2px solid var(--detail);
}
.circle:nth-of-type(9) {
	width: 51vmin; height: 51vmin; 
	
	background-image:
		conic-gradient(
			var(--bk) 300deg,
			var(--col2) 300deg 360deg, var(--bk) 360deg
		) 
	;
}
.circle:nth-of-type(8) {
	width: 57vmin; height: 57vmin; 
	border: 1px solid var(--bk);
	
	background-image:
		conic-gradient(
			var(--bk) 320deg,
			var(--col2) 320deg 360deg, var(--bk) 360deg
		)
	;
}

/* outer part */
.circle:nth-of-type(7) {
	width: 60vmin; height: 60vmin; 
	
	background-image:
		conic-gradient(
			var(--bk) 190deg,
			var(--col3) 190deg 360deg, var(--bk) 360deg
		)
	;
}
.circle:nth-of-type(6) {
	width: 66vmin; height: 66vmin;
	border: 1px solid var(--detail);
	
	background-image:
		conic-gradient(
			var(--bk) 290deg,
			var(--col3) 290deg 360deg, var(--bk) 360deg
		)
	;
}
.circle:nth-of-type(5) {
	width: 72vmin; height: 72vmin; 
	border: 1px solid var(--bk);
	
	background-image:
		conic-gradient(
			var(--bk) 330deg,
			var(--col3) 330deg 360deg, var(--bk) 360deg
		)
	;
}
.circle:nth-of-type(4) {
	width: 75vmin; height: 75vmin; 
	border: 1px solid var(--bk);
	
	background-image:
		conic-gradient(
			var(--bk) 240deg,
			var(--col3) 240deg 360deg, var(--bk) 360deg
		)
	;
}
.circle:nth-of-type(3) {
	width: 78vmin; height:78vmin; 
	
	background-image:
		conic-gradient(
			var(--bk) 310deg,
			var(--col3) 310deg 360deg, var(--bk) 360deg
		)
	;
}
.circle:nth-of-type(2) {
	width: 84vmin; height: 84vmin; 
	border: 1px solid var(--bk);
	
	background-image:
		conic-gradient(
			var(--bk) 340deg,
			var(--col3) 340deg 360deg, var(--bk) 360deg
		)
	;
}

.dashes {
	width: 90vmin; height: 90vmin; 
	
	background-image:
		conic-gradient(
			var(--detail) 0 2deg, var(--bk) 2deg 30deg, 
			var(--detail) 30deg 32deg, var(--bk) 32deg 60deg,
			var(--detail) 60deg 61deg, var(--bk) 61deg 90deg,
			var(--detail) 90deg 92deg, var(--bk) 92deg 120deg,
			var(--detail) 120deg 122deg, var(--bk) 122deg 150deg,
			var(--detail) 150deg 151deg, var(--bk) 151deg 180deg,
			var(--detail) 180deg 182deg, var(--bk) 182deg 210deg,
			var(--detail) 210deg 211deg, var(--bk) 211deg 240deg,
			var(--detail) 240deg 241deg, var(--bk) 241deg 270deg,
			var(--detail) 270deg 272deg, var(--bk) 272deg 300deg,
			var(--detail) 300deg 301deg, var(--bk) 301deg 330deg,
			var(--detail) 330deg 331deg, var(--bk) 331deg 360deg,
		)
	;
	background-size: 90vmin;
}

.burst:nth-of-type(20) {
	width: 62vmin; height: 62vmin;
	
	background-image:
		radial-gradient(circle at center, var(--bk) 50%, transparent 50%),
		conic-gradient(
			transparent 6deg,
			var(--detail) 6deg 12deg, transparent 12deg 158deg,
			var(--detail) 158deg 164deg, transparent 164deg 296deg,
			var(--detail) 296deg 302deg, transparent 302deg
		)
	;
	background-size: 15vmin 15vmin, 62vmin 62vmin;
	opacity: 0.7;
}

.burst:nth-of-type(21) {
	width: 82vmin; height: 82vmin;
	
	background-image:
		radial-gradient(circle at center, var(--bk) 50%, transparent 50%),
		conic-gradient(
			transparent 26deg,
			var(--detail) 26deg 32deg, transparent 32deg 100deg,
			var(--detail) 100deg 106deg, transparent 106deg 246deg,
			var(--detail) 246deg 252deg, transparent 252deg
		)
	;
	background-size: 15vmin 15vmin, 82vmin 82vmin;
	opacity: 0.7;
}

              
            
!

JS

              
                
              
            
!
999px

Console