Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                #codepen
  #about
    h1 Neuromorphic Keyboard
    h3 Pure <kbd>PUG</kbd> &amp; <kbd>SCSS + Grid</kbd>
    h6
      a(
        href="https://codepen.io/haz3y0ne",
        title="See the rest of my work on CodePen.io :)",
        target="_blank"
      ) Hazey &lt;/&gt;
  #keyboard
    button.key `
    button.key 1
    button.key 2
    button.key 3
    button.key 4
    button.key 5
    button.key 6
    button.key 7
    button.key 8
    button.key 9
    button.key 0
    button.key -
    button.key =
    button.key-md Back
    button.key-sm Tab
    button.key Q
    button.key W
    button.key E
    button.key R
    button.key T
    button.key Y
    button.key U
    button.key I
    button.key O
    button.key P
    button.key [
    button.key ]
    button.key-sm \\
    button.key-sm Caps
    button.key A
    button.key S
    button.key D
    button.key F
    button.key G
    button.key H
    button.key J
    button.key K
    button.key L
    button.key ;
    button.key ''
    button.key-md Enter
    button.key-md Shift
    button.key Z
    button.key X
    button.key C
    button.key V
    button.key B
    button.key N
    button.key M
    button.key ,
    button.key .
    button.key /
    button.key-md Shift
    button.key Ctrl
    button.key Fn
    //- The Windows logo is a registered trademark of Microsoft.
    button.key
      i.fa-brands.fa-windows
    button.key Alt
    button.key-xlg
    button.key Alt
    button.key Menu
    button.key Ctrl
    #arrows
      button.key.left &larr;
      button.key.down &darr;
      button.key.up &uarr;
      button.key.right &rarr;

              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Fira+Code&family=Mynerve&family=Pacifico&family=Source+Sans+Pro&display=swap");

* {
  box-sizing: border-box;
  transition: all 0.3s ease-out;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background-image: linear-gradient(to top, #fad0c4 0%, #ffd1ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
}

#codepen {
  display: grid;
  grid-template-rows: 30cqh 60cqh;
  align-items: center;
  justify-content: center;
  font-family: "Source Sans Pro", sans-serif;
  width: 90%;
  height: 100%;

  #about {
    text-align: center;
    line-height: 1.2;
  }

  #keyboard {
    display: grid;
    grid-template-rows: repeat(5, 5fr);
    grid-template-columns: repeat(16, 16fr);
    border-radius: 10px;
    border: 2px solid rgba(230, 230, 230, 0.3);
    padding: 1%;
    box-shadow: -4px -4px 18px rgba(255, 255, 255, 0.8),
      4px 4px 22px rgba(0, 0, 0, 0.3),
      0px 0px 18px rgba(150, 150, 150, 0.15) inset;

    .key {
      grid-row: span 1;
      grid-column: span 1;
    }

    .key-sm,
    .key-md,
    .key-lg,
    .key-xlg {
      grid-row: span 1;
    }

    .key-sm {
      grid-column: span 2;
    }

    .key-md {
      grid-column: span 3;
    }

    .key-lg {
      grid-column: span 4;
    }

    .key-xlg {
      grid-column: span 6;
    }

    #arrows {
      width: 100%;
      grid-column: span 3;
      display: grid;
      grid-template-rows: repeat(2, 2fr);
      grid-template-columns: repeat(3, 3fr);

      .left,
      .down,
      .right {
        grid-row: 2;
      }

      .left {
        grid-column: 1;
      }

      .down {
        grid-column: 2;
      }

      .right {
        grid-column: 3;
      }

      .up {
        grid-column: 2;
        grid-row: 1;
      }
    }
  }

  button {
    font-family: "Source Sans Pro", sans-serif;
    backdrop-filter: blur(30px);
    border: 0;
    margin: 5px;
    border-radius: 10px;
    background: #fad0c4;
    box-shadow: 5px 5px 6px #dab5ab, -4px -4px 6px rgba(255, 255, 255, 0.4);
    color: transparent;
    font-size: 1.8ch;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
    text-shadow: -1px -1px 2px rgba(240, 240, 240, 0.4),
      1px 1px 0px rgba(0, 0, 0, 0.15);

    &:hover {
      box-shadow: 5px 5px 6px rgba(10, 10, 10, 0.4),
        -5px -5px 6px rgba(255, 255, 255, 0.5);
    }

    &:active {
      box-shadow: -1px -1px 6px rgba(10, 10, 10, 0.1),
        1px 1px 6px rgba(255, 255, 255, 0.1);
    }
  }
}

h6 {
  font-family: "Fira Code", monospace;

  a {
    text-decoration: none;
    font-size: 2.5ch;
    color: #111;
    opacity: 0.5;
    text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.4);

    &:hover {
      opacity: 1;
    }
  }
}

kbd {
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  padding: 3px;
  color: #fff;
}

              
            
!

JS

              
                
              
            
!
999px

Console