css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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.

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

<svg id="thing" xmlns="http://www.w3.org/2000/svg" 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>
  <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>
  <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" />
  </g>
</svg>

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

<ul>
  <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>
</ul>

<!--<p>This demo accompanies my "Color in the Real World" presentation at SassConf 2014. Slides are at <a href="https://rawgit.com/KatieK2/2014-sassconf/master/index.html">https://rawgit.com/KatieK2/2014-sassconf/master/index.html</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;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console