Pen Settings

HTML

CSS

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

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

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.

HTML

              
                .grid
  .grid-cell.grid-33
    .square.two.square-100
      .title
        %h2 Colour series: tweaking your palette
        
  .grid-cell.grid-33
    .square.four.square-100
      .title
        %h2 Colour series: picking your palette
  .grid-cell.grid-33
    .square.three.square-100
      .title
        %h2 Feature detection with CSS
        
.grid
  .grid-cell.grid-25
    .square.one.square-100
      .title
        %h2 11 resources for colour inspiration
  .grid-cell.grid-25
    .square.two.square-100
      .title
        %h2 Browse content efficiently with toggling horizontal scrolling
  .grid-cell.grid-25
    .square.three.square-100
      .title
        %h2 A year in writing – 2015
  .grid-cell.grid-25
    .square.four.square-100
      .title
        %h2 Colour series: adding new colours & tips
              
            
!

CSS

              
                html {
  box-sizing: border-box; }

*, *:before, *:after { 
  box-sizing: inherit; }

.row {
  display: flex; 
  justify-content: space-between; }

.square {
  height: 0; }

.square-25 {
  width: 25%;
  padding-bottom: 25%; }

.square-33 {
  width: 33.333333%;
  padding-bottom: 33.333333%; }

.square-50 {
  width: 50%;
  padding-bottom: 50%; }

.square-100 {
  width: 100%;
  padding-bottom: 100%; }

// Styling
.square {
  position: relative;
  display: inline-block;
  vertical-align: top;
  background-color: #eee; }

.grid {
  display: block;
  padding: 0;
  margin: 0 -6px 12px;
  text-align: left;
  font-size: 0; }

.grid-cell {
  display: inline-block;
  margin: 0;
  padding: 0 6px;
  text-align: left;
  vertical-align: top;
  width: 100%;
  font-size: 16px; }

.grid-25 { width: 25%; }
.grid-33 { width: 33.333333%; }
.grid-50 { width: 50%; }

// Styles that are specific to this demo
body {
  background: #353B6E;
  padding: 5%;
  font-size: 0; }

.square {
  overflow: hidden;
  border-radius: 8px;
  background-size: cover;
  box-shadow: 0 3px 12px rgba(#252243, .9); }
  
.one {
  background-image: url(https://assets.iamsteve.me/placeholder/1.jpg); }
 
.two {
  background-image: url(https://assets.iamsteve.me/placeholder/2.jpg); }

.three {
  background-image: url(https://assets.iamsteve.me/placeholder/3.jpg); }

.four {
  background-image: url(https://assets.iamsteve.me/placeholder/4.jpg); }

.title h2 {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px rgba(black, .6);
  background: linear-gradient(rgba(#252243, 0), rgba(#252243, .8));
  
  margin: 0;
  padding: 36px 12px 12px;
  
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0; }
              
            
!

JS

              
                
              
            
!
999px

Console