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 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

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

              
                <!--Note: Only rgb(r,g,b) style colors are accepted at the moment-->
<button class="pixelated" data-color="rgb(129, 51, 142)" id="pixels" data-size="3" data-thickness="4">Purple Button</button>
<button class="pixelated" data-color="rgba(207, 255, 176, 1)" id="spreading" data-size="6" data-thickness="1">Blue Button</button>
<br />
<br />
<button class="pixelated" data-color="rgba(108, 255, 10, 1)" id="big" data-size="7" data-thickness="1">Green Button</button>
              
            
!

CSS

              
                html, body
    font-family: 'Roboto Condensed', sans-serif
button
    border: 1px solid grey
    font-family: 'Roboto Condensed', sans-serif
    font-size: 18px
    padding: 10px 25px

#pixels
    color: white
    background: rgba(88, 53, 94, 1)
    text-shadow: 1px 1px black
    &:hover
        background: darken(rgba(88, 53, 94, 1), 5)
#spreading
    background: rgba(89, 152, 197, 1)
    text-shadow: 1px 1px grey
    &:hover
        background: darken(rgba(89, 152, 197, 1), 5)
#big
    background: rgba(207, 255, 176, 1)
    padding: 100px
    &:hover
        background: darken(rgba(207, 255, 176, 1), 5)
    
.pixelated
    overflow: hidden
    box-sizing: border-box
    position: relative
    span
        position: relative
        z-index: 1
    canvas
        position: absolute
        top: 0
        left: 0
        z-index: 0
              
            
!

JS

              
                pixelated.default()
pixelated.spread()
              
            
!
999px

Console