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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <!-- 
Recreating SVG Masks

This demo is part of the SketchMaster.com course ‘SVG Workflows in Sketch’.
Designed by Peter Nowell  @pnowelldesign  @pnowelldesign
-->


<!-- Version A: Recreated using boolean ("combine") operations instead of a mask -->
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
	<circle cx="50" cy="50" r="50" fill="#6FE7ED"/>
	<path fill="#24B4D7" d="M29.76 95.74c-5.67-2.52-10.8-6.06-15.12-10.38C5.6 76.3 0 63.8 0 50 0 22.4 22.4 0 50 0c13.8 0 26.3 5.6 35.36 14.64 4.32 4.33 7.86 9.45 10.38 15.12L29.76 95.74z"/>
	<path fill="#3783E6" d="M4.8 71.43C1.74 64.93 0 57.67 0 50 0 22.4 22.4 0 50 0c7.67 0 14.94 1.73 21.43 4.8L4.8 71.44z"/>
	<path fill="#C9FFFB" d="M81.72 11.34c3.67 3.02 6.9 6.55 9.6 10.48L86 27.15c-1.36-2.07-3.24-3.73-5.68-5-2.45-1.25-5.23-1.88-8.35-1.88-2.96 0-5.43.4-7.4 1.17-1.96.78-3.53 1.78-4.72 3-1.18 1.22-2.02 2.54-2.5 3.95-.48 1.4-.72 2.7-.72 3.8 0 3.3.96 5.9 2.9 7.6 1.92 1.8 4.3 3.22 7.16 4.33 2.8 1.1 5.9 2.1 9.3 3 3.4.9 6.5 2.12 9.3 3.72s5.2 3.72 7.1 6.43c1.92 2.7 2.9 6.45 2.9 11.2 0 .83-.06 1.65-.1 2.45-3.9 8.4-10.1 15.52-17.75 20.6-3 .86-6.17 1.3-9.5 1.3-5.06 0-9.84-.9-14.36-2.67S45.7 86 43 82.3l8.1-8.1c1.9 2.86 4.96 5.3 7.9 6.64 3 1.4 6.1 2.05 9.3 2.05 1.8 0 3.6-.3 5.48-.8 1.9-.56 3.6-1.4 5.1-2.5s2.76-2.5 3.7-4.1c.97-1.6 1.46-3.5 1.46-5.67 0-3.04-.97-5.36-2.9-6.95-1.92-1.6-4.3-2.93-7.17-4-2.86-1.1-5.98-2.1-9.35-3.1s-6.5-2.4-9.35-4.2c-2.86-1.74-5.25-4.13-7.2-7.13-1.92-3-2.9-7.06-2.9-12.18 0-2.3.5-4.77 1.5-7.36 1-2.6 2.6-4.94 4.7-7.1 2.2-2.14 4.9-3.94 8.3-5.4 3.4-1.43 7.46-2.15 12.2-2.15 3.35 0 6.6.34 9.73 1.06z"/>
</svg>


<!-- Version B: Transformed ("rotated") layers cropped by a circular mask -->
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" xmlns:xlink="http://www.w3.org/1999/xlink">
  <defs>
    <circle id="a" cx="50" cy="50" r="50"/>
  </defs>
  <g fill="none">
    <mask id="b" fill="#fff">
      <use xlink:href="#a"/>
    </mask>
    <use fill="#C4C8CC" xlink:href="#a"/>
    <path fill="#6FE7ED" d="M-2 0h104v100H-2z" mask="url(#b)" transform="rotate(45 50 50)"/>
    <path fill="#24B4D7" d="M3-12h70V88H3z" mask="url(#b)" transform="rotate(45 38 38)"/>
    <path fill="#3783E6" d="M8-24h35V76H8z" mask="url(#b)" transform="rotate(45 25.5 26)"/>
    <path fill="#C9FFFB" d="M94.3 18.83c-2.88-3.4-6.2-5.65-9.97-6.8-3.93-1.18-8.05-1.77-12.35-1.77-4.74 0-8.8.72-12.17 2.17-3.3 1.44-6.1 3.24-8.2 5.4-2.1 2.14-3.7 4.5-4.7 7.1-1 2.6-1.5 5.05-1.5 7.35 0 5.12 1 9.17 2.9 12.18 1.9 3 4.3 5.4 7.2 7.17 2.85 1.78 5.97 3.17 9.34 4.17s6.5 2.04 9.35 3.1c2.85 1.1 5.24 2.42 7.17 4.02 1.93 1.6 2.9 3.9 2.9 6.95 0 2.15-.5 4.04-1.45 5.67s-2.2 3-3.7 4.1c-1.52 1.13-3.2 1.96-5.06 2.52-1.86.55-3.67.83-5.45.83-3.2 0-6.3-.7-9.3-2.1-2.97-1.4-6-3.8-7.9-6.7l-8.1 8.1c2.65 3.7 6.1 6.12 10.6 7.9 4.5 1.8 9.3 2.7 14.3 2.7 3.8 0 7.36-.57 10.7-1.68 3.33-1.1 6.23-2.7 8.67-4.8 2.46-2.07 4.4-4.62 5.85-7.66 1.46-3.04 2.18-6.45 2.18-10.23 0-4.75-.95-8.48-2.9-11.18-1.9-2.7-4.3-4.87-7.15-6.46-2.9-1.6-6-2.84-9.4-3.73-3.36-.9-6.47-1.9-9.33-3-2.87-1.14-5.26-2.6-7.2-4.37-1.96-1.8-2.9-4.32-2.9-7.66 0-1.2.2-2.5.7-3.9.5-1.4 1.3-2.73 2.5-3.95 1.2-1.2 2.76-2.2 4.73-3 1.95-.78 4.42-1.17 7.38-1.17 3.16 0 5.9.64 8.4 1.9 2.43 1.26 4.3 2.9 5.65 5l8.3-8.3z" mask="url(#b)"/>
  </g>
</svg>


<p class="footnote">Note: Version B (which uses a mask) breaks because there is also a rotate transform on each of its elements. Although optimized, the markup shown here is effectively what Sketch exports. The masked version could be corrected if the mask attribute was on the group rather than each element—but regardless, masks are often unnecessary and can make an SVG less reliable.</p>
            
          
!

CSS

            
              body {
	flex-direction: row;
}
svg {
	width: 25vmin;
	height: 25vmin;
	margin: 5px 10px;
}
            
          
!

JS

            
              
            
          
!
999px

Console