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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                div#place-holder
section#one(style="display:none")
  h1 Column layout
  column-wall
    ul
      li: img(src="http://lorempixel.com/output/animals-h-c-480-640-9.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-c-640-480-6.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-c-640-480-2.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-c-640-480-3.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-c-640-480-4.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-c-640-480-7.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-g-400-400-6.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-c-640-480-6.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-c-640-480-2.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-c-640-480-3.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-h-c-480-640-9.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-c-640-480-4.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-c-640-480-5.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-c-640-480-7.jpg", alt="")
      li: img(src="http://lorempixel.com/output/animals-q-g-400-400-6.jpg", alt="")
    
//- section(style="display:none")
//-   h1 Flex layout
//-   flex-wall
//-     ul
//-       li: img(src="http://lorempixel.com/output/animals-h-c-480-640-9.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-c-640-480-6.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-c-640-480-2.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-c-640-480-3.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-c-640-480-4.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-c-640-480-7.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-g-400-400-6.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-c-640-480-6.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-c-640-480-2.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-c-640-480-3.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-h-c-480-640-9.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-c-640-480-4.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-c-640-480-5.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-c-640-480-7.jpg", alt="")
//-       li: img(src="http://lorempixel.com/output/animals-q-g-400-400-6.jpg", alt="")
              
            
!

CSS

              
                *
  box-sizing border-box

body
  background #eaeaea
  text-align center

#place-holder
  position absolute
  width 50px
  height 50px
  top 50vh
  left 50vw
  transform translate(-50%, -50%)
  text-align center
  background #000
  color white
  mrgin-left -5%
  animation loading 2s steps(120) infinite 
  will-change: transform;

@keyframes loading
  from, to
    transform translate(-100%, -50%) rotate(0) scale(1)
  50%
    transform translate(100%, -50%) rotate(360deg) scale(.5)
section
  margin-bottom 3em

img
  width 100%
  vertical-align top

column-wall,
flex-wall
  display block
  width 100%
  text-align center

column-wall > ul
  columns 4
  column-gap 1em
  column-rule: 1px solid #ddd;
  margin 0
  padding 1em
  
  @media (max-width 40em)
    column-count 2
  
  li
    display inline-block
    break-inside avoid
    background #fff
    text-align center
    margin-bottom 1em
    padding 1vmin

flex-wall
  > ul
    display flex
    flex-direction column
    flex-wrap wrap
    justify-content flex-start
    align-items center
    align-content space-around
    width 100vw
    height 120vh
    list-style-type none
    margin 0
    padding 1em 
    
    @media (max-width 40em)
      height 300vh
  
    > li
      width calc((100% - 3em) / 4)
      height auto
      background #fff
      margin-bottom 1em
      padding 1vmin
        
      @media (max-width 40em)
        width calc((100% - 1em) / 2)

      > img
        vertical-align top
        max-width 100%
              
            
!

JS

              
                var imgLoaded = function() {
  var parent = document.getElementById("one");
  var loading = document.getElementById("place-holder");
  parent.style.display = "block";
  loading.style.display ='none';
};
$(window).on('load', function() {
  imgLoaded();
});

              
            
!
999px

Console