cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

    a.toggle-link(href='#menu') #[i.fa.fa-navicon] Menu
        each val in [1, 2, 3, 4, 5]
            a(href='index'+val+'.html')= 'Item ' + val
              // point at which menu turns to off-canvas
$menu_collapse: 500px;

// basic styling
body {
    font: {
        size: 22px;
        weight: 300;
        family: Roboto;
    line-height: 1.8;
    color: #333;

    width: 100%;
    position: relative;
    left: 0;
    top: 0;
    background: darken(white, 15%);
a {
    text-decoration: none;
    color: black;
    transition: .3s;
    &:hover {
        color: lighten(black, 50%);

// menu style
.main-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    // change the way links appear with flex-direction
    // on a horizontal line in non-collapsed way
    @media screen and (min-width: $menu_collapse) {
        flex-direction: row;
        justify-content: space-between;
        max-width: 800px;
        .toggle-link {
            display: none;
    // off-canvas look
    @media screen and (max-width: $menu_collapse) {
        // make links appear underneath each other
        flex-direction: column;
        justify-content: flex-start;
        // off-canvas style, closed
        background: darken(white, 10%);
        z-index: 100;
        width: 320px;
        min-height: 100%;
        position: fixed;
        top: 0;
        left: 0;
        transition: .3s all linear;
        box-sizing: border-box;
        padding: 10px;
        transform: translateX(-320px);
        // off-canvas, open
        &.active {
            transform: translateX(0px);
        // position "x" in the upper right-hand corner
        .toggle-link {
            align-self: flex-end;

// make toggle links visible if off-canvas menu is to be displayed
header {
    .toggle-link {
        @media screen and (min-width: $menu_collapse) {
            display: none;
              $(document).ready(function () {
    $(".toggle-link").click(function () {

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.


Loading ..................