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

              
                <h1>Main title</h1>
<h2>Title</h2>
<h3>Subtitle</h3>
<p><a href="#">Link</a> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse auctor vehicula tincidunt. Praesent faucibus, est ut bibendum consequat, felis libero tristique mi, vitae imperdiet neque mauris vitae erat. Vivamus suscipit dictum lorem ut accumsan. <a href="#">Check me out</a> Praesent hendrerit accumsan orci, in lobortis leo hendrerit a. Maecenas elementum sapien nec justo fermentum egestas. Aenean ac pharetra ligula. Mauris porta orci id auctor aliquam. Integer aliquet vitae urna sit amet ullamcorper. Suspendisse vitae interdum ante. Integer id scelerisque velit. Cras mattis mauris justo, ut convallis quam consequat eu. Fusce vestibulum eget eros tristique sodales. Etiam in purus id tortor ullamcorper malesuada. Vestibulum porta sed magna quis lacinia. Ut a felis a dui placerat feugiat.</p>

<button class="inline">CLICK ME!</button>
<button class="inline">ME TOO!</button>
<button class="block">I'M BLOCK</button>

<input type="text" placeholder="I'm an input!"/>
<input type="range" />

<p>You can do some nice fancy stuff with this new method: <code>code.prototype.badass()</code>. Yeah it's pretty neat.</p>

<pre><code>function resetGrid() {
  for (var y = 0; y < grid.length; y++) {
    for (var x = 0; x <= grid.length; x++) {
      grid[y][x] = 0;
    }
  }
  renderGrid();
}</code></pre>
              
            
!

CSS

              
                /*IMPORTS*/

@import 'https://fonts.googleapis.com/css?family=Open+Sans:300,400|Roboto:400,400i,500|Lobster:400|Source+Code+Pro:400';

/*MAIN*/

html,
body {
  margin: 0px;
  padding: 0px;
}

body {
  padding: 45px;
}

* {
  box-sizing: border-box;
  font-family: 'Roboto';
  font-weight: 400;
  color: dimgrey;
}


/*HEADERS AND TEXT*/

h1,
h2,
h3 {
  margin: 15px 0;
  font-family: 'Open Sans';
  font-weight: 300;
}

h1 {
  font-weight: 400;
  font-family: 'Lobster';
  font-size: 45px;
  letter-spacing: 3px;
  color: crimson;
  border-bottom: 1px dashed crimson;
}

h2 {
  font-size: 30px;
  letter-spacing: 2px;
  //text-transform: uppercase;
}

h3 {
  font-size: 25px;
  letter-spacing: 1px;
}

p {
  margin: 10px 0;
  color: dimgrey;
}

span {
  color: dimgrey;
}

code {
  font-family: 'Source Code Pro';
  color: black;
  background: lighten(lightgrey, 10%);
  padding: 0px 5px 0px 5px;
}

pre {
  padding: 5px;
  overflow: auto;
  background: lighten(lightgrey, 10%);
  code {
    padding: 0px;
  }
}

img {
  width: auto;
  max-width: 100%;
  max-height: 500px;
  display: block;
  margin: 1em auto;
}


/*INPUT METHODS*/

button,
.btn,
{
  padding: 15px;
  margin: 0 10px 10px 0;
  display: inline-block;
  border: 0px solid dimgrey;
  background: dimgrey;
  color: whitesmoke;
  outline: none;
  transition: all 0.25s, transform 0.1s;
  &:hover {
    background: crimson;
    color: whitesmoke;
  }
  &:active {
    background: crimson;
    transform: scale(0.8);
  }
}

input[type='text'], input[type='number'], select {
  padding: 15px;
  margin: 0 10px 10px 0px;
  border: 0px solid dimgrey;
  background: dimgrey;
  color: whitesmoke;
  outline: none;
  transition: all 0.25s;
  &:hover {
    background: grey;
  }
  &:focus {
    background: crimson;
    color: whitesmoke;
    &::-webkit-input-placeholder {
      color: whitesmoke;
    }
    &::-moz-placeholder {
      color: whitesmoke;
    }
    &:-ms-input-placeholder {
      color: whitesmoke;
    }
    &:-moz-placeholder {
      color: whitesmoke;
    }
  }
}

a {
  box-sizing: border-box;
  color: crimson;
  text-decoration: none;
  font-weight: 500;
  &:hover {
    // border-bottom: 1px solid crimson;
    // border-top: 1px solid crimson;
    text-decoration: underline;
  }
}


/*MISC*/

.inline {
  display: inline-block;
}

.block {
  display: block;
}

.hidden {
  display: none;
}


/*SCROLLBAR*/

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  &-button {
    width: 0px;
    height: 0px;
  }
  &-thumb {
    background: crimson;
    border-radius: 0px;
    &:hover {
      background: darken(crimson, 2%);
    }
    &:active {
      box-shadow: inset 0px 0px 5px darken(crimson, 25%);
    }
  }
  &-track {
    background: lightgrey;
    border: 0px none darkgrey;
    border-radius: 0px;
    box-shadow: inset 0px 0px 5px dimgrey;
    &:hover {
      background: lightgrey;
    }
    &:active {
      box-shadow: inset 0px 0px 8px dimgrey;
    }
  }
  &-corner {
    background: transparent;
  }
}


/*RANGE*/

input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  margin: 6px 0;
}
input[type=range]:focus {
  outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;
  background: #dc143c;
  border-radius: 20.1px;
  border: 0px solid #ffffff;
}
input[type=range]::-webkit-slider-thumb {
  box-shadow: 0px 0px 0px #333333, 0px 0px 0px #404040;
  // border: 2px solid #dcdcdc;
  height: 20px;
  width: 20px;
  border-radius: 20px;
  background: #696969;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
}
input[type=range]:focus::-webkit-slider-runnable-track {
  background: #dc143c;
}
input[type=range]::-moz-range-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;
  background: #dc143c;
  border-radius: 20.1px;
  border: 0px solid #ffffff;
}
input[type=range]::-moz-range-thumb {
  box-shadow: 0px 0px 0px #333333, 0px 0px 0px #404040;
  // border: 2px solid #dcdcdc;
  height: 20px;
  width: 20px;
  border-radius: 20px;
  background: #696969;
  cursor: pointer;
}
input[type=range]::-ms-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  color: transparent;
}
input[type=range]::-ms-fill-lower {
  background: #dc143c;
  border: 0px solid #ffffff;
  border-radius: 40.2px;
  box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;
}
input[type=range]::-ms-fill-upper {
  background: #dc143c;
  border: 0px solid #ffffff;
  border-radius: 40.2px;
  box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;
}
input[type=range]::-ms-thumb {
  box-shadow: 0px 0px 0px #333333, 0px 0px 0px #404040;
  // border: 2px solid #dcdcdc;
  height: 20px;
  width: 20px;
  border-radius: 20px;
  background: #696969;
  cursor: pointer;
  height: 8px;
}
input[type=range]:focus::-ms-fill-lower {
  background: #dc143c;
}
input[type=range]:focus::-ms-fill-upper {
  background: #dc143c;
}
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  margin: 6px 0;
}
input[type=range]:focus {
  outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;
  background: #dc143c;
  border-radius: 20.1px;
  border: 0px solid #ffffff;
}
input[type=range]::-webkit-slider-thumb {
  box-shadow: 0px 0px 0px #333333, 0px 0px 0px #404040;
  // border: 2px solid #dcdcdc;
  height: 20px;
  width: 20px;
  border-radius: 20px;
  background: #696969;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
}
input[type=range]:focus::-webkit-slider-runnable-track {
  background: #dc143c;
}
input[type=range]::-moz-range-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;
  background: #dc143c;
  border-radius: 20.1px;
  border: 0px solid #ffffff;
}
input[type=range]::-moz-range-thumb {
  box-shadow: 0px 0px 0px #333333, 0px 0px 0px #404040;
  // border: 2px solid #dcdcdc;
  height: 20px;
  width: 20px;
  border-radius: 20px;
  background: #696969;
  cursor: pointer;
}
input[type=range]::-ms-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  color: transparent;
}
input[type=range]::-ms-fill-lower {
  background: #dc143c;
  border: 0px solid #ffffff;
  border-radius: 40.2px;
  box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;
}
input[type=range]::-ms-fill-upper {
  background: #dc143c;
  border: 0px solid #ffffff;
  border-radius: 40.2px;
  box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;
}
input[type=range]::-ms-thumb {
  box-shadow: 0px 0px 0px #333333, 0px 0px 0px #404040;
  // border: 2px solid #dcdcdc;
  height: 20px;
  width: 20px;
  border-radius: 20px;
  background: #696969;
  cursor: pointer;
  height: 8px;
}
input[type=range]:focus::-ms-fill-lower {
  background: #dc143c;
}
input[type=range]:focus::-ms-fill-upper {
  background: #dc143c;
}
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  margin: 6px 0;
}
input[type=range]:focus {
  outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;
  background: #dc143c;
  border-radius: 20.1px;
  border: 0px solid #ffffff;
}
input[type=range]::-webkit-slider-thumb {
  box-shadow: 0px 0px 0px #333333, 0px 0px 0px #404040;
  // border: 2px solid #dcdcdc;
  height: 20px;
  width: 20px;
  border-radius: 20px;
  background: #696969;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
}
input[type=range]:focus::-webkit-slider-runnable-track {
  background: #dc143c;
}
input[type=range]::-moz-range-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;
  background: #dc143c;
  border-radius: 20.1px;
  border: 0px solid #ffffff;
}
input[type=range]::-moz-range-thumb {
  box-shadow: 0px 0px 0px #333333, 0px 0px 0px #404040;
  // border: 2px solid #dcdcdc;
  height: 20px;
  width: 20px;
  border-radius: 20px;
  background: #696969;
  cursor: pointer;
}
input[type=range]::-ms-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  color: transparent;
}
input[type=range]::-ms-fill-lower {
  background: #dc143c;
  border: 0px solid #ffffff;
  border-radius: 40.2px;
  box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;
}
input[type=range]::-ms-fill-upper {
  background: #dc143c;
  border: 0px solid #ffffff;
  border-radius: 40.2px;
  box-shadow: 0px 0px 0px #000000, 0px 0px 0px #0d0d0d;
}
input[type=range]::-ms-thumb {
  box-shadow: 0px 0px 0px #333333, 0px 0px 0px #404040;
  // border: 2px solid #dcdcdc;
  height: 20px;
  width: 20px;
  border-radius: 20px;
  background: #696969;
  cursor: pointer;
  height: 8px;
}
input[type=range]:focus::-ms-fill-lower {
  background: #dc143c;
}
input[type=range]:focus::-ms-fill-upper {
  background: #dc143c;
}


/*LAYOUT*/

.box {
  display: block;
  width: 100%;
  
  &::after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: '';
    clear: both;
    height: 0;
  }
  
  > div {
    display: inline-block;
    width: 50%;
    overflow: auto;
    float: left;
    
    &:nth-child(odd) {padding-right: .5em;}
    &:nth-child(even) {padding-left: .5em;}
  }
}


/*MEDIA*/

@media only screen and (max-width: 720px) {
  body {
    padding: 15px;
  }
  
  .box > div {
    display: block;
    width: 100%;
    padding: 0 0 !important;
    float: none;
  }
}
              
            
!

JS

              
                //ninivert, July 2016
              
            
!
999px

Console