Pen Settings



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


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


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.


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.


                h1 Scroll horizontally
    - 8.times do |n|
      .column #{n+1}


                @import ''

$color-gray: #9DA0B0
$color-bg: #7B7CFF
$tile-size: 80px

=centerer($horizontal:true, $vertical:true)
  position: absolute
  display: block
  @if $horizontal and $vertical
    top: 50%
    left: 50%
    transform: translate(-50%, -50%)
  @else if $horizontal
    left: 50%
    transform: translate(-50%, 0)
  @else if $vertical
    top: 50%
    transform: translate(0, -50%)

=grad($direction: left)
  $oposite-direction: right
  @if $direction == right
    $oposite-direction: left
  $color: mix($color-bg, black, 50%)
  $opacity: .8
  background: -moz-linear-gradient(#{$direction},  rgba($color, $opacity) 0%, rgba($color, 0) 100%)
  background: -webkit-linear-gradient(#{$direction},  rgba($color, $opacity) 0%,rgba($color, 0) 100%)
  background: linear-gradient(to #{$oposite-direction},  rgba($color, $opacity) 0%,rgba($color, 0) 100%)

*, *:before, *:after
  box-sizing: border-box

html, body
  height: 100%
  margin: 0
  padding: 0
  font-family: Arial, sans-serif
  background: $color-bg

  top: calc(50% - #{$tile-size*1.5}) !important
  line-height: 1.4em
  font-family: 'Gloria Hallelujah', sans-serif
  text-align: center
  color: white

  width: 300px
  height: $tile-size
  border-radius: 10px
  border: 4px solid mix(black, $color-bg, 30%)
  font-size: 0
  background: #f7f9f9
  box-shadow: 0 15px 24px rgba(black, 0.22), 0 19px 76px rgba(black, 0.3)
    width: 100%
    height: 100%
    position: absolute
    top: 0
    left: 0
    pointer-events: none
    border-radius: 5px
    overflow: hidden
    & > div
      width: 55px
      max-width: 55px
      height: 100%
      position: absolute
      top: 0
      transition: all .125s ease
      // width: 0px
      opacity: 0
      left: 0
      right: 0
    width: auto
    height: 100%
    border-radius: 10px
    overflow: hidden
    overflow-x: scroll
    overflow-y: hidden
    white-space: nowrap
      width: $tile-size
      height: 100%
      line-height: $tile-size
      font-size: 40px
      text-align: center
      display: inline-block
      vertical-align: middle
      border-right: 1px solid #EAEDF0
      color: #A6ACB0
      background: white


                var elem = document.querySelector('.row');


function addGrad(elem) {
  var fadeScrollOffset = 10;
  var elemParent = elem.parentNode;
  if(elem.scrollWidth > elemParent.offsetWidth) {
    var divElem = document.createElement('div');
    divElem.className = "shadows";
    var divShadows =
      '<div class="shadow__left"></div>' +
      '<div class="shadow__right"></div>';
    divElem.innerHTML = divShadows;
    elem.insertBefore(divElem, elem.firstChild);
    var divShaLeft = document.querySelector('.shadow__left');
    var divShaRight = document.querySelector('.shadow__right');

    elem.onscroll = function() {
      if(this.scrollLeft > fadeScrollOffset) { = 1; = "55px";
      else { = 0; = "0px";
      if(this.scrollWidth - this.clientWidth - this.scrollLeft < fadeScrollOffset) { = 0; = "0px";
      else { = 1; = "55px";