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

              
                <section class="blue">Blue</section>
<section class="green">Green</section>
<section class="yellow">Yellow</section><section class="orange">Orange</section>
<section class="red">Red</section>
<br/>
<section class="blue green">Blue + Green</section>
<section class="green yellow">Green + Yellow</section>
<section class="yellow orange">Yellow + Orange</section>
<section class="orange red">Orange + Red</section>
<section class="blue yellow">Blue + Yellow</section>
<section class="green orange">Green + Orange</section>
<section class="yellow red">Yellow + Red</section>
<section class="blue orange">Blue + Orange</section>
<section class="green red">Green + Red</section>
<section class="blue red">Blue + Red</section>
<br/>
<section class="blue green yellow">Blue + Green + Yellow</section>
<section class="green yellow orange">Green + Yellow + Orange</section>
<section class="green orange red">Green + Orange + Red</section>
<section class="yellow orange red">Yellow + Orange + Red</section>
<section class="blue green orange">Blue + Green + Orange</section>
<section class="green yellow red">Green + Yellow + Red</section>
<section class="blue green red">Blue + Green + Red</section>
<section class="blue yellow orange">Blue + Yellow + Orange</section>
<section class="blue yellow red">Blue + Yellow + Red</section>
<section class="blue orange red">Blue + Orange + Red</section>
<br/>

<section class="blue green yellow orange">Blue + Green + Yellow + Orange</section>

<section class="blue green yellow red">Blue + Green + Yellow + Red</section>
<section class="blue green orange red">Blue + Green + Orange + Red</section>
<section class="blue yellow orange red">Blue + Yellow + Orange + Red</section>
<section class="green yellow orange red">Green + Yellow + Orange + Red</section>

<br/>
<section class="blue green yellow orange red">Blue + Green + Yellow + Orange + Red</section>
              
            
!

CSS

              
                @blue: #3366CC;
@green: #00AF89;
@yellow: #FFCC33;
@orange: #FF6D22;
@red: #DD3333;

body{
  font-family: sans-serif;
}

section {
 padding: 10px;  
}

.blue{
  background-color: tint(@blue, 70%);
}

.green {
  background-color: tint(@green, 70%);
}
.yellow {
  background-color: tint(@yellow, 70%);
}
.orange {
  background-color: tint(@orange, 70%);
}
.red {
  background-color: tint(@red, 70%);
}

//Mixing 2 colors: tint(average(_,_),50%);
.blue.green {
  background-color: tint(average(@blue, @green),50%);
}

.green.yellow {
  background-color: tint(average(@green, @yellow),50%);
}

.yellow.orange {
  background-color: tint(average(@yellow, @orange),50%);
}

.orange.red {
  background-color: tint(average(@orange, @red),50%);
}

.blue.yellow {
  background-color: tint(average(@blue, @yellow),50%);
}

.green.orange {
  background-color: tint(average(@green, @orange),50%);
}

.yellow.red {
  background-color: tint(average( @yellow, @red),50%);
}

.blue.orange {
  background-color: tint(average( @blue, @orange),50%);
}


.green.red {
  background-color: tint(average( @green, @red),50%);
}

.blue.red {
  background-color: tint(average( @blue, @red),50%);
}

//Mixing 3 colors:
.blue.green.yellow {
  background-color: tint(mix(@blue,average( @green, @yellow),33%),30%);  
}
.green.yellow.orange {
  background-color: tint(mix(@green,average( @yellow, @orange),33%),30%);  
}
.green.orange.red {
  background-color: tint(mix(@green,average( @orange, @red),33%),30%);  
}

.yellow.orange.red {
  background-color: tint(mix(@yellow,average( @orange, @red),33%),30%);  
}
.blue.green.orange {
  background-color: tint(mix(@blue,average( @green, @orange),33%),30%);  
}
.green.yellow.red {
  background-color: tint(mix(@green,average( @yellow, @red),33%),30%);  
}

.blue.green.red {
  background-color: tint(mix(@blue,average( @green, @red),33%),30%);  
}


.blue.yellow.orange {
  background-color: tint(mix(@blue,average( @yellow, @orange),33%),30%);  
}

.blue.yellow.red {
  background-color: tint(mix(@blue,average( @yellow, @red),33%),30%);  
}
.blue.orange.red {
  background-color: tint(mix(@blue,average( @orange, @red),33%),30%);  
}

//Mixing 4 colors:
.blue.green.yellow.orange {
  background-color: tint(mix(@blue,mix(@green,average( @yellow, @orange),25%),25%),25%);  
}

.blue.green.yellow.red {
  background-color: tint(mix(@blue,mix(@green,average( @yellow, @red),25%),25%),25%);  
}

.blue.green.orange.red {
  background-color: tint(mix(@blue,mix(@green,average( @orange, @red),25%),25%),25%);  
}

.blue.yellow.orange.red {
  background-color: tint(mix(@blue,mix(@yellow,average( @orange, @red),25%),25%),25%);  
}

.green.yellow.orange.red {
  background-color: tint(mix(@green,mix(@yellow,average( @orange, @red),25%),25%),25%);  
}

//Mixing 5 colors:
.blue.green.yellow.orange.red {
  background-color: tint(mix(@blue,mix(@green,mix(@yellow,average( @orange, @red),20%),20%),20%),15%);  
}
              
            
!

JS

              
                
              
            
!
999px

Console