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

              
                
![](http://upload.wikimedia.org/wikipedia/commons/0/0d/Lightbulb_icon_vectorized.svg)
<span>Shapely CSS </span><span>Shapes</span>
===============
Here is some text which will nicely wrap around floated elements, but only if you're using the latest Blink/WebKit browsers, which support the new [CSS Shapes Specification, Level 1](http://www.w3.org/TR/css-shapes-1/#shape-margin-property).  CSS Shapes are currently a W3C Candidate Recommendation.  Chrome and Opera now support it prefix-free (so this pen will work), add `-webkit-` to gain support in the latest Safari.

Hover this page to see the actual shapes used to define the area of each float.

Of course, it's not magic, it's web design, so there are plenty of gotchas and complications to work around.  For starters, Chrome's layout algorithm occasionally results in text flowing into the shape area&hellip;

<svg viewBox="-50 0 100 100">
  <path d="M0,5 
           C50,75 45,95 25,95 C 15,95 0,95 0,60
           Q0,90 5,100 H-5 Q0,90 0,60
           C0,95, -15,95 -25,95 C-45,95 -50,75 0,5 Z" stroke="darkred" stroke-width="2"/>
</svg>
<figure>
</figure>

This is filler text; more filler text. Some filler text again. Filler text; more filler text. Filler text; more filler text. Some filler text again. Filler text; more filler text. Filler text; more filler text. Filler text; more filler text. Some filler text again. Filler text; more filler text. Filler text; more filler text. Some filler text again. Filler text; more filler text. Filler text; more filler text. Filler text; more filler text. Some filler text again. Filler text; more filler text. Filler text; more filler text. Filler text; more filler text. Some filler text again. Filler text; more filler text. Filler text; more filler text. Filler text; more filler text. Filler text; more filler text. Filler text; more filler text. Some filler text again. Filler text; more filler text. Filler text; more filler text. Filler text; more filler text. Some filler text again. Filler text; more filler text. Some filler text again. Filler text; more filler text. 

<small>Lightbulb image by [YassineMrabet via Wikimedia Commons](http://commons.wikimedia.org/wiki/File:Lightbulb_icon_vectorized.svg) (CC-BY-SA).</small>
              
            
!

CSS

              
                body {
  max-width:50em;
  margin: 1em auto;
  padding: 0.5em;
  hyphens: auto;
}
p {
  text-align:justify;
  margin:1em;
}
img {
  max-width: calc(100% - 10em);
  min-width: 3em;
  float: left;
  shape-outside: url(http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Lightbulb_icon_vectorized.svg/200px-Lightbulb_icon_vectorized.svg.png);
  
  /* Doesn't work with SVG image mask *
  shape-outside: url(http://upload.wikimedia.org/wikipedia/commons/0/0d/Lightbulb_icon_vectorized.svg);
  /**/
  shape-margin: 0.5em;  
  margin: 0.5em;
}
body:hover img {
  background-image: url(http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Lightbulb_icon_vectorized.svg/200px-Lightbulb_icon_vectorized.svg.png);
  background-size: cover;
}
h1 {
  margin: 0;
  font-size: 250%;
}
h1 span {
  float:right;
  clear:right;
  display:block;
  text-align:right;
  padding:0.25em 0 0.25em 0.5em;
  border-radius: 1em;
  shape-outside: padding-box;
}
h1 span + span {
  margin-top: 1.5em;  
}
body:hover h1 span {
  background: lightgray;
}
svg {
  display: block;
  float: left;
  clear: left;
  width: 10em;
  margin-top: 3em;
  shape-outside: polygon(50% 5%, 90% 75%, 90% 85%, 87% 92%, 80% 95%, 55% 95%, 55% 100%, 0% 100%, 0% 5%) content-box;
  shape-margin: 1%;
}
body:hover svg {
  background: gray;
  -webkit-clip-path: polygon(50% 5%, 90% 75%, 90% 85%, 87% 92%, 80% 95%, 55% 95%, 55% 100%, 0% 100%, 0% 5%);
  clip-path:         polygon(50% 5%, 90% 75%, 90% 85%, 87% 92%, 80% 95%, 55% 95%, 55% 100%, 0% 100%, 0% 5%) content-box;
  
}
figure {
  display: block;
  float: right;
  clear: right;
  width:calc(100% - 15em);
  margin:0;
  margin-left:calc(-100% + 25em);
  height:20em;
  border-radius:50% 0 0 50%;
  background-image:radial-gradient(20em circle at right, navy, lightcyan 40% , aliceblue);
  shape-outside:radial-gradient(20em circle at right, black,transparent 50% );
  shape-image-threshold: 0.15;
}
body:hover figure {
  background-image: radial-gradient(20em circle at right, black,transparent 50% );
}
              
            
!

JS

              
                
              
            
!
999px

Console