Pen Settings



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


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


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.


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.


                <h1>Mix Your Palette: Mountain Highlights</h1>

<svg id="thing" xmlns="" version="1.1" width="550px" height="250px">
  <g class="shadow">
    <polygon points="3,233 133,98 263,233" />
    <polygon points="133,233 263,8 393,233" />
    <polygon points="263,233 393,118 523,233" />
  <g class="highlight">
    <polygon class="peak1" points="9,237 139,102 269,237" />
    <polygon class="peak2" points="139,237 269,12 399,237" />
    <polygon class="peak3" points="269,237 399,122 529,237" />
  <g class="main">
    <polygon class="peak1" points="5,235 135,100 265,235" />
    <polygon class="peak2" points="135,235 265,10 395,235" />
    <polygon class="peak3" points="265,235 395,120 525,235" />

<p>Comment and un-comment blocks in the .scss to see different versions of the highlights on the mountains:</p>

  <li>Block 1 shows white and black highlights.</li>
  <li>Block 2 shows higlights mixed with the mountain's colors.</li>
  <li>Block 3 shows lovely pink highlights.</li>
  <li>Block 4 shows sunset-orange highlights.</li>

<!--<p>This demo accompanies my "Color in the Real World" presentation at SassConf 2014. Slides are at <a href=""></a> but may be of limited value without having seen the talk.</p>-->


                $mountain-color: #686;
/* Block 1
$highlight: white;
$shadow: black;
/* Block 2
$highlight: mix($mountain-color, white, 40%);
$shadow: mix($mountain-color, black, 40%);
/* Block 3
$highlight-base: #C6538C;
$highlight: mix($mountain-color, lighten(#C6538C, 10%), 50%);
$shadow: mix($mountain-color, darken(#C6538C, 25%), 70%);
/* Block 4 */
$highlight-base: #FF5F00;
$highlight: mix($mountain-color, lighten($highlight-base, 20%), 20%);
$shadow: mix($mountain-color, darken($highlight-base, 20%), 20%);

g.highlight {
  fill: transparent;
  stroke-linejoin: round;
  stroke-width: 5;
  stroke: $highlight;

g.shadow {
  stroke: $shadow;
  @extend g.highlight;

.peak1 {
  fill: darken($mountain-color, 10%);

.peak2 {
  fill: $mountain-color;

.peak3 {
  fill: lighten($mountain-color, 10%);

/* set up styles ---------------------------- */

body {
  background-color: rgb(128,128,128);

h1, h2, p, svg {
  margin: 1rem;