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

              
                <svg width="0" height="0" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <title>Simple Face</title>
    <defs>
      <symbol id="simple-face-symbol" viewBox="0 0 100 100">
        <g id="Simple-Face">
            <circle id="Oval" class="face" stroke="#000000" fill="#D18949" stroke-width="2"
                     cx="50.5" cy="50.5" r="37.5"></circle>
            <ellipse id="Oval-2" class="eye" stroke="#000000" fill="#4A90E2" cx="63" cy="41" rx="5" ry="4"></ellipse>
            <ellipse id="Oval-2" class="eye" stroke="#000000" fill="#4A90E2" cx="37" cy="41" rx="5" ry="4"></ellipse>
            <path class="mouth" d="M31,69 C49.203776,74.8229167 62.110026,74.8229167 69.71875,69" id="Path-2" stroke="#000000"></path>
            <polygon id="Triangle" class="nose" stroke="#000000" points="50.5 55 53 62 48 62"></polygon>
            <ellipse id="Oval-3" stroke="#000000" stroke-width="0.5" fill="#D18949" cx="37" cy="39" rx="5" ry="2"></ellipse>
            <ellipse id="Oval-3" stroke="#000000" stroke-width="0.5" fill="#D18949" cx="63" cy="39" rx="5" ry="2"></ellipse>
            <path d="M30.9648438,33.4873047 C35.9199219,30.9384766 41.007487,30.9384766 46.2275391,33.4873047" id="Path-3" stroke="#000000"></path>
            <path d="M55,33.9116211 C59.9550781,31.362793 65.0426432,31.362793 70.2626953,33.9116211" id="Path-3" stroke="#000000"></path>
            <ellipse id="Oval-4" fill="#000000" cx="37.5" cy="43" rx="1.5" ry="1"></ellipse>
            <ellipse id="Oval-4" fill="#000000" cx="63.5" cy="43" rx="1.5" ry="1"></ellipse>
        </g>
      </symbol>
    </defs>
</svg>

<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/723053/simple-face-classes.svg" />

<object type="image/svg+xml" data="https://s3-us-west-2.amazonaws.com/s.cdpn.io/723053/simple-face-classes.svg">
</object>

<svg width="100" height="100" viewBox="0 0 100 100">
 <use xlink:href="#simple-face-symbol" x="0" y="0" />
</svg>

<svg width="100" height="100" viewBox="0 0 100 100">
 <use xlink:href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/723053/simple-face-symbol.svg#simple-face-symbol" x="0" y="0" />
</svg>
              
            
!

CSS

              
                $skin-color: #D18949;
$border-color: #000000;
$eye-color: #4A90E2;

$mouth-color: #000000;
$hair-color: #000000;

.face {
  stroke: $border-color;
  fill: $skin-color;
}

.eye {
  fill: $eye-color;
}

.mouth {
  stroke: $mouth-color;
}

.nose {
  fill: #fff;
  stroke: $border-color;
}

.eyebrow {
  stroke: $hair-color;
}
              
            
!

JS

              
                
              
            
!
999px

Console