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.

              <p>By winning <a href="">week three of seasons 2</a> of the CodePen rodeo, I've won one year of PRO membership. As I already am a PRO member I don't have much need for this. But the guys at CodePen were kind enough to let me give it to another user. So I figured I'd do a little challenge of my own for you to take part in.</p>
<p>The objective is to create a nice looking colour palette that could be part of a styleguide, something like in <a href="" title="'Color Palette' by Bill S Kenney">this awesome Dribbble shot</a>.</p>
<ul class="palette">
  <li class="swatch" title="#4cadeb"></li>
  <li class="swatch" title="#7ac2f0"></li>
  <li class="swatch" title="#a8d7f5"></li>
  <li class="swatch" title="#eb8a4c"></li>
  <li class="swatch" title="#f0a87a"></li>
  <li class="swatch" title="#f5c6a8"></li>
  <li class="swatch" title="#9b9b9b"></li>
  <li class="swatch" title="#b5b5b5"></li>
<p>Make it pretty, make it playful, make it awesome. You can use whatever you want; CSS, JS, jQuery, use what fits you best.</p>
<p>There are some requirements as to what must be included:</p>
<ul class="requirements">
  <li class="requirement">The colours #4cadeb, #7ac2f0, #a8d7f5, #eb8a4c, #f0a87a, #f5c6a8, #9b9b9b, #b5b5b5 (shown above) must be included.</li>
  <li class="requirement">For each colour, the respective RGB, HSL and HEX value must be visible.</li>
<p>Responsive behaviour and fancy animations are entirely optional, but they might give you a little bonus.</p>
<p>Be sure to tag your entry with <b><a href="">pro-007</a></b>. I will pick the winner myself, so it doesn't really matter how many views or hearts you get. You may only have <b>one entry</b> at a time. The challenge <b>ends June 28, 2013</b>.</p>
<p>If you have any questions you can contact me <a href="">on Twitter</a>. Good luck to all of you!</p>
              @import "compass/css3";

@import url(,700);

@mixin keyframes ($name) {
  @-webkit-keyframes $name { @content; }
  @-moz-keyframes $name { @content; }
  @-ms-keyframes $name { @content; }
  @keyframes $name { @content; }

@mixin animation ($value) {
  -webkit-animation: $value;
  -moz-animation: $value;
  -ms-animation: $value;
  animation: $value;

@mixin animation-delay ($value) {
  -webkit-animation-delay: $value;
  -moz-animation-delay: $value;
  -ms-animation-delay: $value;
  animation-delay: $value;

* {
  @include box-sizing(border-box);

%clearfix::after {
  content: "";
  display: table;
  clear: both;

body {
  max-width: 40em;
  padding: 0 3em;
  margin: 3em auto;
  font: 100%/1.5 Roboto Condensed, sans-serif;
  color: #333;
  background-color: #fafafa;

ul {
  margin-top: 0;
  margin-bottom: 1.5em;

a {
  @include transition(color 0.25s ease-in-out, border-bottom-color 0.25s ease-in-out);
  color: #4cadeb;
  border-bottom: 1px solid transparent;
  text-decoration: none;
  &:focus {
    color: lighten(#4cadeb, 10%);
    border-bottom-color: lighten(#4cadeb, 10%);

.palette {
  @extend %clearfix;
  padding: 1.5em;
  margin: 0 -1.5em 1.5em;
  list-style: none;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;

.swatch {
  @include transition(transform 0.25s ease-in-out);
  @include animation(popup 0.5s ease-in-out);
  float: left;
  width: 11.625%;
  padding-bottom: 11.625%;
  margin-right: 1%;
  border-radius: 50%;
  -webkit-backface-visibility: hidden;
  &:last-child {
    margin-right: 0;
  &:hover {
    @include transform(translateY(-10%));

.swatch:nth-child(1) {
  background-color: #4cadeb;

.swatch:nth-child(2) {
  @include animation-delay(0.1s);
  background-color: lighten(#4cadeb, 10%);

.swatch:nth-child(3) {
  @include animation-delay(0.2s);
  background-color: lighten(#4cadeb, 20%);

.swatch:nth-child(4) {
  @include animation-delay(0.3s);
  background-color: adjust_hue(#4cadeb, -180deg);

.swatch:nth-child(5) {
  @include animation-delay(0.4s);
  background-color: lighten(adjust_hue(#4cadeb, -180deg), 10%);

.swatch:nth-child(6) {
  @include animation-delay(0.5s);
  background-color: lighten(adjust_hue(#4cadeb, -180deg), 20%);

.swatch:nth-child(7) {
  @include animation-delay(0.6s);
  background-color: desaturate(#4cadeb, 80%);

.swatch:nth-child(8) {
  @include animation-delay(0.7s);
  background-color: lighten(desaturate(#4cadeb, 80%), 10%);

.requirements {
  padding: 0;
  list-style: none;

.requirement {
  @include background-image(linear-gradient(#fff, #fafafa));
  @include transition(border 0.25s ease-in-out);
  padding: 1em;
  margin-bottom: 0.75em;
  border: 1px solid #e8e8e8;
  border-left-width: 5px;
  border-radius: 3px;
  &:hover {
    border-left-width: 10px;

@include keyframes(popup) {
  50% { @include transform(translateY(-10%)); }
  100% { @include transform(translateY(0)); }
🕑 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.