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.


    <meta charset="utf-8">
    <title>JS Bin</title>


                grid-width ?= 500px
grid-columns ?= 6
grid-margins ?= 1
grid-margin ?= 15px
grid-gutter ?= 10px

grid-fn(columns, margins = 0)
    total-margins = grid-margin * (grid-columns - 1) * grid-margins
    total-gutter = grid-gutter * 2
    grid-column = (grid-width - total-gutter - total-margins) / grid-columns
    return grid-column * columns + margins * grid-margin + grid-margin * max(floor(columns - 1), 0) * grid-margins

grid(property, columns, margins = 0, attributes..., when = null, dim = 'width', breakpoint = null, breakpoint-cols = null, orientation = null)
    if margins == !important
        margins = 0
        attributes = !important

    if breakpoint-cols
            breakpoint = grid-fn(breakpoint-cols) + grid-gutter * 2

    if when == null || breakpoint == null
        {property} grid-fn(columns, margins) attributes
        if when is 'above'
            prefix = 'min'
        else if when is 'below'
            prefix = 'max'
            error('Invalid "above" value')

        if orientation
            @media ({prefix}-{dim}: breakpoint) and (orientation: orientation)
                {property} grid-fn(columns, margins) attributes
            @media ({prefix}-{dim}: breakpoint)
                {property} grid-fn(columns, margins) attributes

    padding 0
    margin-bottom grid-margin
        margin-left 0
        margin-right 0

for col in (1..grid-columns)
        @extends $column-base
        float left
        grid width col
        margin-left (grid-margin / 2)
        margin-right (grid-margin / 2)
        for b-col in (grid-columns..1)
            new-cols = b-col - 1
            if b-col > col
                new-cols = col
            +grid(when:below, breakpoint-cols:b-col, width, new-cols)
                if new-cols <= col
                    margin-left 0
    @extends $column{grid-columns}

    @extends $column{grid-columns / 2}

    @extends $column{grid-columns * 2 / 3}
    @extends $column{grid-columns / 3}

// Example usage

    @extends $columns-full
    float none
    margin 0 auto !important
    // Clearfix
    zoom 1
    &:before, &:after
        content ''
        display table
        clear both
    @extends $columns-two-thirds
    @extends $columns-third
// Make-up
$shadow-spread = 0px
$shadow-blur = 3px
$shadow-shift = 2px
body *
    box-shadow 0px $shadow-shift $shadow-blur $shadow-spread rgba(black, 0.3)
    background #fff