Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

Save Automatically?

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

              
                <!-- solids -->
<svg viewbox="0 0 44 44" class="swatch">
  <circle class="fill-pool" cx="22" cy="22" r="20" />
</svg>
<svg viewbox="0 0 44 44" class="swatch">
  <circle class="fill-grass" cx="22" cy="22" r="20" />
</svg>
<svg viewbox="0 0 44 44" class="swatch">
  <circle class="fill-cherry" cx="22" cy="22" r="20" />
</svg>
<svg viewbox="0 0 44 44" class="swatch">
  <circle class="fill-sunshine" cx="22" cy="22" r="20" />
</svg>

<!-- stripes -->
<svg viewBox="0 0 44 44" class="swatch">
	<g class="fill-pool">
    <path d="M6.802,5h26.396C29.675,1.897,25.064,0,20,0S10.325,1.897,6.802,5z"/>
    <path d="M0.656,15h38.689c-0.458-1.774-1.145-3.452-2.042-5H2.697C1.801,11.548,1.113,13.226,0.656,15z"/>
    <path d="M0.656,25h38.689C39.757,23.399,40,21.73,40,20H0C0,21.73,0.243,23.399,0.656,25z"/>
		<path d="M6.802,35h26.396c1.624-1.43,3.013-3.116,4.104-5H2.698C3.789,31.884,5.177,33.57,6.802,35z"/>
	</g>
  <g class="fill-grass">
    <path d="M2.697,10h34.605c-1.092-1.884-2.48-3.57-4.104-5H6.802C5.177,6.43,3.789,8.116,2.697,10z"/>
    <path d="M2.698,30h34.605c0.897-1.548,1.584-3.226,2.042-5H0.656C1.113,26.774,1.801,28.452,2.698,30z"/>
    <path d="M0,20h40c0-1.73-0.243-3.399-0.656-5H0.656C0.243,16.601,0,18.27,0,20z"/>
		<path d="M20,40c5.064,0,9.675-1.897,13.198-5H6.802C10.325,38.103,14.936,40,20,40z"/>
	</g>
</svg>
<svg viewBox="0 0 44 44" class="swatch">
	<g class="fill-sunshine">
    <path d="M6.802,5h26.396C29.675,1.897,25.064,0,20,0S10.325,1.897,6.802,5z"/>
    <path d="M0.656,15h38.689c-0.458-1.774-1.145-3.452-2.042-5H2.697C1.801,11.548,1.113,13.226,0.656,15z"/>
    <path d="M0.656,25h38.689C39.757,23.399,40,21.73,40,20H0C0,21.73,0.243,23.399,0.656,25z"/>
		<path d="M6.802,35h26.396c1.624-1.43,3.013-3.116,4.104-5H2.698C3.789,31.884,5.177,33.57,6.802,35z"/>
	</g>
  <g class="fill-grass">
    <path d="M2.697,10h34.605c-1.092-1.884-2.48-3.57-4.104-5H6.802C5.177,6.43,3.789,8.116,2.697,10z"/>
    <path d="M2.698,30h34.605c0.897-1.548,1.584-3.226,2.042-5H0.656C1.113,26.774,1.801,28.452,2.698,30z"/>
    <path d="M0,20h40c0-1.73-0.243-3.399-0.656-5H0.656C0.243,16.601,0,18.27,0,20z"/>
		<path d="M20,40c5.064,0,9.675-1.897,13.198-5H6.802C10.325,38.103,14.936,40,20,40z"/>
	</g>
</svg>

<!-- stars -->
<svg viewBox="0 0 40 40" class="swatch">
  <circle class="fill-pool" cx="20" cy="20" r="20"/>
  <g class="fill-grass">
    <polygon points="14.762,11.717 13.502,9.163 12.242,11.717 9.423,12.126 11.463,14.114 10.981,16.921 13.502,15.595 
      16.022,16.921 15.541,14.114 17.58,12.126 	"/>
    <polygon points="28.537,26.049 29.019,23.242 26.498,24.568 23.978,23.242 24.459,26.049 22.42,28.037 25.238,28.446 
      26.498,31 27.758,28.446 30.577,28.037 	"/>
  </g>
</svg>
<svg viewBox="0 0 40 40" class="swatch">
  <circle class="fill-cherry" cx="20" cy="20" r="20"/>
  <g class="fill-sunshine">
    <polygon points="14.762,11.717 13.502,9.163 12.242,11.717 9.423,12.126 11.463,14.114 10.981,16.921 13.502,15.595 
      16.022,16.921 15.541,14.114 17.58,12.126 	"/>
    <polygon points="28.537,26.049 29.019,23.242 26.498,24.568 23.978,23.242 24.459,26.049 22.42,28.037 25.238,28.446 
      26.498,31 27.758,28.446 30.577,28.037 	"/>
  </g>
</svg>

<!-- rainbow stripe -->
<svg viewBox="0 0 40 40" class="swatch">
<g>
		<path class="fill-cherry" d="M20,0c-5.064,0-9.675,1.897-13.198,5h26.396C29.675,1.897,25.064,0,20,0z"/>
	  <path class="fill-sunshine" d="M2.697,10c-0.897,1.548-1.584,3.226-2.042,5h38.689c-0.458-1.774-1.145-3.452-2.042-5H2.697z"/>
  <path class="fill-grass" d="M0.656,25h38.689C39.757,23.399,40,21.73,40,20H0C0,21.73,0.243,23.399,0.656,25z"/>
  <path class="fill-pool" d="M6.802,35h26.396c1.624-1.43,3.013-3.116,4.104-5H2.698C3.789,31.884,5.177,33.57,6.802,35z"/>
</g>
	<g class="fill-gray">
		<path d="M33.198,5H6.802c-1.624,1.43-3.013,3.116-4.104,5h34.605C36.211,8.116,34.823,6.43,33.198,5z"/>
		<path d="M0,20h40c0-1.73-0.243-3.399-0.656-5H0.656C0.243,16.601,0,18.27,0,20z"/>
		<path d="M2.698,30h34.605c0.897-1.548,1.584-3.226,2.042-5H0.656C1.113,26.774,1.801,28.452,2.698,30z"/>
		<path d="M20,40c5.064,0,9.675-1.897,13.198-5H6.802C10.325,38.103,14.936,40,20,40z"/>
</g>
</svg>
<svg viewBox="0 0 40 40" class="swatch">
<g>
		<path class="fill-cherry" d="M20,0c-5.064,0-9.675,1.897-13.198,5h26.396C29.675,1.897,25.064,0,20,0z"/>
	  <path class="fill-sunshine" d="M2.697,10c-0.897,1.548-1.584,3.226-2.042,5h38.689c-0.458-1.774-1.145-3.452-2.042-5H2.697z"/>
  <path class="fill-grass" d="M0.656,25h38.689C39.757,23.399,40,21.73,40,20H0C0,21.73,0.243,23.399,0.656,25z"/>
  <path class="fill-pool" d="M6.802,35h26.396c1.624-1.43,3.013-3.116,4.104-5H2.698C3.789,31.884,5.177,33.57,6.802,35z"/>
</g>
	<g class="fill-ivory">
		<path d="M33.198,5H6.802c-1.624,1.43-3.013,3.116-4.104,5h34.605C36.211,8.116,34.823,6.43,33.198,5z"/>
		<path d="M0,20h40c0-1.73-0.243-3.399-0.656-5H0.656C0.243,16.601,0,18.27,0,20z"/>
		<path d="M2.698,30h34.605c0.897-1.548,1.584-3.226,2.042-5H0.656C1.113,26.774,1.801,28.452,2.698,30z"/>
		<path d="M20,40c5.064,0,9.675-1.897,13.198-5H6.802C10.325,38.103,14.936,40,20,40z"/>
</g>
</svg>

<!-- dots -->
<svg viewBox="0 0 40 40" class="swatch">
<circle class="fill-ivory" cx="20" cy="20" r="20"/>
<g class="fill-grass">
	<path d="M15.319,1.936c-0.99,0-1.792,0.802-1.792,1.792c0,0.99,0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		C17.111,2.738,16.309,1.936,15.319,1.936z"/>
	<path d="M25.212,1.936c-0.99,0-1.792,0.802-1.792,1.792c0,0.99,0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		C27.005,2.738,26.202,1.936,25.212,1.936z"/>
	<path d="M15.319,35.202c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S16.309,35.202,15.319,35.202z"/>
	<path d="M25.212,35.202c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S26.202,35.202,25.212,35.202z"/>
	<path d="M15.319,12.905c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S16.309,12.905,15.319,12.905z"/>
	<path d="M4.574,12.905c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S5.563,12.905,4.574,12.905z"/>
	<path d="M25.212,12.905c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S26.202,12.905,25.212,12.905z"/>
	<path d="M20.696,7.42c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S21.685,7.42,20.696,7.42z"/>
	<path d="M9.951,7.42c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792c0.99,0,1.792-0.802,1.792-1.792
		S10.94,7.42,9.951,7.42z"/>
	<path d="M30.589,7.42c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S31.579,7.42,30.589,7.42z"/>
	<path d="M20.696,19.07c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S21.685,19.07,20.696,19.07z"/>
	<path d="M9.951,19.07c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792c0.99,0,1.792-0.802,1.792-1.792
		S10.94,19.07,9.951,19.07z"/>
	<path d="M30.589,19.07c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S31.579,19.07,30.589,19.07z"/>
	<path d="M20.696,30.469c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S21.685,30.469,20.696,30.469z"/>
	<path d="M9.951,30.469c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792c0.99,0,1.792-0.802,1.792-1.792
		S10.94,30.469,9.951,30.469z"/>
	<path d="M30.589,30.469c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S31.579,30.469,30.589,30.469z"/>
	<path d="M35.426,16.489c0.99,0,1.792-0.802,1.792-1.792s-0.802-1.792-1.792-1.792s-1.792,0.802-1.792,1.792
		S34.437,16.489,35.426,16.489z"/>
	<path d="M15.319,25.236c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S16.309,25.236,15.319,25.236z"/>
	<path d="M4.574,25.236c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S5.563,25.236,4.574,25.236z"/>
	<path d="M25.212,25.236c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S26.202,25.236,25.212,25.236z"/>
	<path d="M35.426,25.236c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S36.416,25.236,35.426,25.236z"/>
</g>
</svg>
<svg viewBox="0 0 40 40" class="swatch">
<circle class="fill-cherry" cx="20" cy="20" r="20"/>
<g class="fill-sunshine">
	<path d="M15.319,1.936c-0.99,0-1.792,0.802-1.792,1.792c0,0.99,0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		C17.111,2.738,16.309,1.936,15.319,1.936z"/>
	<path d="M25.212,1.936c-0.99,0-1.792,0.802-1.792,1.792c0,0.99,0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		C27.005,2.738,26.202,1.936,25.212,1.936z"/>
	<path d="M15.319,35.202c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S16.309,35.202,15.319,35.202z"/>
	<path d="M25.212,35.202c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S26.202,35.202,25.212,35.202z"/>
	<path d="M15.319,12.905c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S16.309,12.905,15.319,12.905z"/>
	<path d="M4.574,12.905c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S5.563,12.905,4.574,12.905z"/>
	<path d="M25.212,12.905c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S26.202,12.905,25.212,12.905z"/>
	<path d="M20.696,7.42c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S21.685,7.42,20.696,7.42z"/>
	<path d="M9.951,7.42c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792c0.99,0,1.792-0.802,1.792-1.792
		S10.94,7.42,9.951,7.42z"/>
	<path d="M30.589,7.42c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S31.579,7.42,30.589,7.42z"/>
	<path d="M20.696,19.07c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S21.685,19.07,20.696,19.07z"/>
	<path d="M9.951,19.07c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792c0.99,0,1.792-0.802,1.792-1.792
		S10.94,19.07,9.951,19.07z"/>
	<path d="M30.589,19.07c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S31.579,19.07,30.589,19.07z"/>
	<path d="M20.696,30.469c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S21.685,30.469,20.696,30.469z"/>
	<path d="M9.951,30.469c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792c0.99,0,1.792-0.802,1.792-1.792
		S10.94,30.469,9.951,30.469z"/>
	<path d="M30.589,30.469c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S31.579,30.469,30.589,30.469z"/>
	<path d="M35.426,16.489c0.99,0,1.792-0.802,1.792-1.792s-0.802-1.792-1.792-1.792s-1.792,0.802-1.792,1.792
		S34.437,16.489,35.426,16.489z"/>
	<path d="M15.319,25.236c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S16.309,25.236,15.319,25.236z"/>
	<path d="M4.574,25.236c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S5.563,25.236,4.574,25.236z"/>
	<path d="M25.212,25.236c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S26.202,25.236,25.212,25.236z"/>
	<path d="M35.426,25.236c-0.99,0-1.792,0.802-1.792,1.792s0.802,1.792,1.792,1.792s1.792-0.802,1.792-1.792
		S36.416,25.236,35.426,25.236z"/>
</g>
</svg>

              
            
!

CSS

              
                .swatch {
  height: 40px;
  width: 40px;
}

.fill-pool {
  fill: blue;
}

.fill-cherry {
  fill: red;
}

.fill-grass {
  fill: green;
}

.fill-sunshine {
  fill: yellow;
}

.fill-gray {
  fill: gray;
}

.fill-ivory {
  fill: #dddddd;
}
              
            
!

JS

              
                
              
            
!
999px

Console