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

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

CSS

              
                @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

              
            
!

JS

              
                
              
            
!
999px

Console