Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div id="wrap">
<div id="logo"></div>
<div id="text"><span></span><span></span><span></span><span></span></div>
</div>
            
          
!
            
              @import "nib"

bit = 125px
bit2 = 12px
color1 = #fff

g(lg)
  linear-gradient(lg, lg)
set(x, y)
  (bit * x) (bit * y)
set2(x, y)
  (bit2 * x) (bit2 * y)


html
    background #000
div#wrap
    margin 40px auto
    width 600px

div#logo
    display inline-block
    margin 0 0 0 15px
    width 370px
    height 500px
    background-image g(transparent), g(color1), g(color1), g(color1), linear-gradient(-45deg, color1 50%, transparent 50%)
    background-position 0 0, set(1.4, 0), set(1.4, 1.5), set(1.4, 2.5), set(0, 2.5)
    background-size bit bit, bit bit*1.5, bit*1.5 bit, bit bit*1.5, bit*1.5 bit*1.5
    background-repeat no-repeat

div#text
    display inline-block
    margin 0
    width 140px

div#text span:nth-child(1)
    display block
    margin 5px
    width 120px
    height 120px
    background-image g(color1), g(color1), g(color1), g(color1), g(color1), g(color1), g(color1), linear-gradient(-45deg, transparent 42%, color1 42%, color1 60%, transparent 60%), linear-gradient(45deg, transparent 42%, color1 42%, color1 60%, transparent 60%)
    background-position 0 0, set2(4.5,1), set2(0,2.5), set2(0,3.5), set2(0,5.5), set2(9,3.5), set2(4.5,6), set2(0,6), set2(5,6)
    background-size bit2*10 bit2, bit2 bit2*1.5, bit2*10 bit2, bit2 bit2*2, bit2*10 bit2, bit2 bit2*2, bit2 bit2*4, bit2*5 bit2*4, bit2*5 bit2*4
    background-repeat no-repeat

div#text span:nth-child(2)
    display block
    margin 5px
    width 120px
    height 120px
    background-image g(color1), g(color1), g(color1), g(color1), g(color1), g(color1), g(color1), g(color1), g(color1), g(color1)
    background-position 0 0, set2(3,1), set2(6,1), set2(0,2.5), set2(0,3.5), set2(0,5.5), set2(9,3.5), set2(3,6), set2(6,6), set2(0,9)
    background-size bit2*10 bit2, bit2 bit2*1.5, bit2 bit2*1.5, bit2*10 bit2, bit2 bit2*2, bit2*10 bit2, bit2 bit2*2, bit2 bit2*3, bit2 bit2*3, bit2*10 bit2
    background-repeat no-repeat

div#text span:nth-child(3)
    display block
    margin 5px
    width 120px
    height 120px
    background-image g(color1), g(color1), g(color1), g(color1), g(color1), g(color1), g(color1), g(color1), g(color1), g(color1)
    background-position 0 0, set2(4.5,1), set2(0,1.3), set2(0,2.5), set2(0,3.5), set2(0,5.5), set2(9,3.5), set2(0,7.2), set2(4.5,6), set2(0,9)
    background-size bit2*10 bit2, bit2 bit2*1.5, bit2*10 bit2, bit2*10 bit2, bit2 bit2*2, bit2*10 bit2, bit2 bit2*2, bit2*10 bit2, bit2 bit2*3, bit2*10 bit2
    background-repeat no-repeat

div#text span:nth-child(4)
    display block
    margin 5px
    width 120px
    height 120px
    background-image g(color1), g(color1), g(color1)
    background-position 0 0, set2(4.5,1), set2(0,9)
    background-size bit2*10 bit2, bit2 bit2*8, bit2*10 bit2
    background-repeat no-repeat

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console