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

              
                mixin navEntry(name, hasChildren)
    if (hasChildren === true)
        input(type='checkbox' id='nav_' + name).main-nav__child-trigger
    li.main-nav__entry
        if (hasChildren === true)
            label(for='nav_'+name).main-nav__child-trigger-helper
        a(href='#'+name).main-nav__link= name

body
    header.header
        .header__logo ✌
            span.header__logotext Awesome App!
    nav.main-nav
        input(type='checkbox').main-nav__burger#burger
        label(for='burger').main-nav__burger-helper
        ul.main-nav__list
            +navEntry('Lorem')
            +navEntry('Ipsum')
            +navEntry('Dolor', true)
            ul.main-nav__list.main-nav__list--is-sub
                label(for='nav_Dolor').main-nav__back
                +navEntry('Dolor Lorem')
                +navEntry('Dolor Dolor')
            +navEntry('Sit', true)
            ul.main-nav__list.main-nav__list--is-sub
                label(for='nav_Sit').main-nav__back
                +navEntry('Sit Lorem')
                +navEntry('Sit Ipsum')
                +navEntry('Sit Dolor')
            +navEntry('Amet')
    .content
        p Voluptates et placeat et et et vel itaque est. Quasi saepe excepturi ea alias cum fugiat hic. Eius et ratione nostrum esse. Voluptatibus nostrum odio quia sed repudiandae. Aut omnis voluptatem voluptatem temporibus et qui quia porro. Voluptas exercitationem molestiae expedita ea dicta voluptatum. Quo et officia ea repellendus. Dolorem et et aut consequuntur nesciunt corrupti quasi. Eos dolore non at.
        p Voluptates et placeat et et et vel itaque est. Quasi saepe excepturi ea alias cum fugiat hic. Eius et ratione nostrum esse. Voluptatibus nostrum odio quia sed repudiandae. Aut omnis voluptatem voluptatem temporibus et qui quia porro. Voluptas exercitationem molestiae expedita ea dicta voluptatum. Quo et officia ea repellendus. Dolorem et et aut consequuntur nesciunt corrupti quasi. Eos dolore non at.
        p Voluptates et placeat et et et vel itaque est. Quasi saepe excepturi ea alias cum fugiat hic. Eius et ratione nostrum esse. Voluptatibus nostrum odio quia sed repudiandae. Aut omnis voluptatem voluptatem temporibus et qui quia porro. Voluptas exercitationem molestiae expedita ea dicta voluptatum. Quo et officia ea repellendus. Dolorem et et aut consequuntur nesciunt corrupti quasi. Eos dolore non at.
        p Voluptates et placeat et et et vel itaque est. Quasi saepe excepturi ea alias cum fugiat hic. Eius et ratione nostrum esse. Voluptatibus nostrum odio quia sed repudiandae. Aut omnis voluptatem voluptatem temporibus et qui quia porro. Voluptas exercitationem molestiae expedita ea dicta voluptatum. Quo et officia ea repellendus. Dolorem et et aut consequuntur nesciunt corrupti quasi. Eos dolore non at.
        
        p full responsive demo 
          a(href='http://playground.iamschulz.de/skeleton/') here
        
              
            
!

CSS

              
                @primary-color: #FF5300;
@text-color: #333;
@bg-color: #ddd;
@shadow-color: rgba(0, 0, 0, 0.5);

@break-m: 64.0225em; // 1025px

@z-header: 5000;
@z-nav: 4000;

@transition: 0.2s ease-out;

.container {
    max-width: 1440 / 16em;
    margin: auto;
}

* {
    --header-height: 60px;
}

body {
    margin: 0;
    padding: 0;
    background-color: @bg-color;
    font: 16px/1.5 sans-serif;
}

.header {
    &:extend(.container);
    position: sticky;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: var(--header-height);
    background-color: @primary-color;
    color: @bg-color;
    box-shadow: 0 0 10px 0 @shadow-color;
    z-index: @z-header;

    &__logo {
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.8em;
    }

    &__logotext {
        font-weight: 700;
        text-transform: uppercase;
    }
}

.main-nav {
    position: sticky;
    top: 0;
    right: 0;
    margin-top: calc(-1 ~"*" var(--header-height));
    z-index: @z-header;

    &__burger {
        display: none;
    }

    &__burger-helper {
        position: absolute;
        right: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        width: var(--header-height);
        height: var(--header-height);
        font-size: 40px;
        z-index: @z-header;
        cursor: pointer;

        &::before {
            content: "";
            position: absolute;
            left: calc(-100vw ~"+" var(--header-height));
            top: var(--header-height);
            width: 100vw;
            height: calc(100vh ~"-" var(--header-height));
            background-color: @shadow-color;
            opacity: 0;
            pointer-events: none;
            transition: opacity @transition;
            z-index: @z-nav;

            .main-nav__burger:checked ~ & {
                opacity: 1;
                pointer-events: all;
            }
        }

        &::after {
            content: '🍔';
        }

        .main-nav__burger:checked + &::after {
            content: '❌';
        }
    }

    &__list {
        position: fixed;
        right: 0;
        top: var(--header-height);
        width: 250px;
        max-width: 80vw;
        height: 100vh;
        margin: 0;
        padding: 10px 0 0;
        background: darken(@primary-color, 5%);
        list-style: none;
        transform: translateX(100%);
        transition: transform @transition, box-shadow @transition;
        overflow: hidden;
        z-index: @z-header;

        &--is-sub {
            opacity: 0;
            transition: transform @transition, box-shadow @transition, opacity @transition;
        }

        .main-nav__burger:checked ~ & {
            box-shadow: 0 5px 10px 0 @shadow-color;
            opacity: 1;
            transform: translateX(0);
        }
    }

    &__entry {
        position: relative;
        padding: 5px 10px;

        .main-nav__child-trigger:checked + & {
            position: absolute;
            top: 10px;
            z-index: @z-nav + 2;
        }
    }

    &__link {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        width: 100%;
        color: @bg-color;
        text-transform: uppercase;
        text-decoration: none;
        font-weight: 700;

        .main-nav__child-trigger + .main-nav__entry &::after {
            content: "👉"; //right
            padding-left: 1ch;
        }

        .main-nav__child-trigger:checked + .main-nav__entry & {
            display: none;
        }
    }

    &__child-trigger {
        display: none;
    }

    &__child-trigger-helper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;

        &::after {
            content: "👈"; //left
            display: flex;
            align-items: center;
            justify-content: center;
            width: 30px;
            height: 30px;
            margin-left: -110%;
            color: @bg-color;
            transition: transform @transition;
        }

        .main-nav__child-trigger:checked ~ .main-nav__entry &::after {
            transform: translateX(100%);
        }
    }

    &__list--is-sub {
        top: 0;

        .main-nav__child-trigger:checked + .main-nav__entry + & {
            opacity: 1;
            transform: translateX(0);
            z-index: @z-nav + 1;
        }
    }
}

.content {
    &:extend(.container);
    padding: var(--header-height) 10px 10px;
    color: @text-color;
}

@media screen and (min-width: @break-m) {
    * {
        --header-height: 120px;
    }

    .header {
        position: relative;
        max-width: none;
    }

    .main-nav {
        position: sticky;
        top: -120px;

        &__burger-helper {
            display: none;
        }

        &__list {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            max-width: none;
            height: auto;
            padding: 0;
            background-color: @primary-color;
            transform: translateX(0);
            overflow: visible;

            &--is-sub {
                position: absolute;
                background-color: darken(@primary-color, 5%);
                opacity: 0;
                pointer-events: none;
                z-index: -2;

                .main-nav__entry:hover + &,
                &:hover {
                    transform: translateY(40px);
                    opacity: 1;
                    pointer-events: all;
                }
            }
        }

        &__link {
            position: relative;
            justify-content: center;
            width: auto;
            padding: 10px 20px;

            .main-nav__child-trigger + .main-nav__entry &::after {
                content: "👇"; //down
            }
        }

        &__child-trigger-helper {
            display: none;
        }
    }
}
              
            
!

JS

              
                // no js
              
            
!
999px

Console