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

              
                .wrapper
  input(id="menuExtend" type="checkbox")
  header
    .row
      #menubar.col
        a#logo(href=".") BRAND LOGO
        label(id="hamburger" for="menuExtend")
          span Menu
      #navbar.col
        nav
          a.on(href="javascript:;") Index
          a(href="javascript:;") About us
          a(href="javascript:;") Products
          a(href="javascript:;") Location
        #links
          a#twitter(href="javascript:;" target="_blank") 
            img(src="//img.icons8.com/ios-glyphs/48/ffffff/twitter.png", alt="")
          a(href="javascript:;" target="_blank") 
            img(src="//img.icons8.com/ios-glyphs/48/ffffff/instagram-new.png", alt="")
  section
    h1 
      |Pure CSS Menu 
      span # Responsive
              
            
!

CSS

              
                $DGY: #6c757d
$BK: #222

*, *:before,*::after
  box-sizing: border-box
html, body
  height: 100%
body
  font: 300 16px/1.2 calibri
  color: $BK
  text-align: center
  background: linear-gradient(to right, #b1939d 0%,#a27f9d 25%,#797ab0 50%,#607fb6 75%,#5787af 100%)
.wrapper
  width: 100%
  height: 100%
  position: relative
input[id="menuExtend"]
  display: none
header
  width: 100%
  position: fixed
  left: 0
  top: 0
  z-index: 9
  background-color: rgba(255,0,0,.1)
  .row
    width: 100%
    max-width: 1920px
    margin: 0 auto
    padding: 0 2vw
  div, nav
    display: flex
  .col
    align-items: center
  a
    text-decoration: none
  #menubar
    height: 4vw
    min-height: 60px
    justify-content: space-between
    #logo
      color: #fff
      font-size: 1.8em
    label[for="menuExtend"]
      width: 12.5vw
      max-width: 60px
      min-width: 45px
      height: 100%
      position: relative
      span
        font-size: 0
        width: 60%
        height: 6%
        border-radius: 10px
        background-color: #fff
        position: absolute
        top: 50%
        left: 50%
        transform: translate(-50%, -50%)
        &:before, &:after
          content: ''
          background-color: #fff
          width: 100%
          height: 100%
          border-radius: 10px
          position: absolute
          left: 0
          transition: transform .2s ease-out, top .2s .2s ease-out
        &:before
          top: -300%
        &:after
          top: 300%
  #navbar
    nav
      a
        color: #fff
        font-size: 1.4rem
        transition: .2s ease-out
        &:hover, &.on
          color: #c4caff
    #links
      a
        width: 2.1rem
        height: 2.1rem
        border-radius: 50%
        position: relative
        border: 1px solid rgba(255,255,255,.75)
        transition: .2s ease-out
        &:hover
          border-color: transparent
          background-color: rgba(255,255,255,.3)
        img
          width: 60%
          position: absolute
          top: 50%
          left: 50%
          transform: translate(-50%, -50%)
        + a
          margin-left: 1rem
section
  padding-top: 12em
  h1
    font-size: 5em
    color: #e2e5ff
    margin: 0
    span
      color: #d2d7ff
      font-size: .4em
      font-weight: 100
      font-style: italic
      display: block
@media (min-width: 1100px)
  header
    > div
      align-items: center
      justify-content: space-between
    label[for="menuExtend"]
      display: none
    #navbar
      nav a
        margin-left: 1em
      #links
        margin-left: 2.5em
@media (max-width: 1100px - .02px)
  html
    font-size: 4vw
  header
    > div
      flex-direction: column
    #navbar
      flex: 1
      flex-direction: column
      padding: 20vw 10vw
      display: none
      > *
        width: 100%
        justify-content: center
      nav a
        margin-bottom: 1em
      #links
        a + a
          margin-left: 5vw
  input[id="menuExtend"]
    &:checked
      + header
        height: 100%
        max-height: initial
        background: linear-gradient(to right, #b1939d 0%,#a27f9d 25%,#797ab0 50%,#607fb6 75%,#5787af 100%)
        overflow-y: auto
        -webkit-overflow-scrolling: touch
        -ms-overflow-style: -ms-autohiding-scrollbar
        #menubar
          #logo
            opacity: 0
            pointer-events: none
            transition: none
          label[for="menuExtend"]
            span
              background-color: transparent
              &:before, &:after
                top: 0
                transition: top .3s ease-out, transform .3s .3s ease-out
              &:before
                transform: rotate(45deg)
              &:after
                transform: rotate(-45deg)
        #navbar
          display: flex
          nav
            font-size: 1.875rem
            flex-direction: column
            margin-bottom: 5vh

      
              
            
!

JS

              
                
              
            
!
999px

Console