cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

    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 () {
🕑 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.
Loading ..................