css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <main>
  
  <h1>Your Account</h1>
  
  <form action="" method="post">
    
    <nav>
      <a href="#0" class="active">Sign In</a>
      <a href="#0">Create Account</a>
    </nav>
    
    <div class="form-field">
      <label for="email">Email Address</label>
      <input type="email" id="email" name="email">
    </div>
    
    <div class="form-field">
      <label for="password">Password</label>
      <input type="password" id="password" name="password">
    </div>
    
    <input type="submit" value="Sign In" class="button">
    
  </form>
  
  <a href="#0" class="forgot-password">Forgot your password?</a>
  
</main>




            
          
!
            
              /* This ruleset is the only thing added to the original Pen... to get the boxes+dots at the corners of the form */
form {
  --line: linear-gradient(to right, var(--brown), var(--brown));
  --dot: radial-gradient(circle, rgb(170, 139, 89) 1px, rgba(170, 139, 89, 0) 1px);
  
  --box: 
    var(--line),
    var(--line),
    var(--dot);
  
  --box-size:  
    2px 10px,
    12px 2px,
    10px 10px;
  
  background-repeat: no-repeat;
  
  background-image: 
    var(--box),
    var(--box),
    var(--box),
    var(--box);
  
  background-size:
    var(--box-size),
    var(--box-size),
    var(--box-size),
    var(--box-size);
  
  background-position:
    /* top left */
    10px 0px,
    0px 10px,
    0px 0px,
    /* top right */
    right 10px top 0px,
    right 0px top 10px,
    100% 0%,
    /* bottom left */
    left 10px bottom 0px,
    left 0px bottom 10px,
    0% 100%,
    /* bottom right */
    right 10px bottom 0px,
    right 0px bottom 10px,
    100% 100%;
}

form {
  border: 7px double #AA8B59;
  padding: 3rem;
}



:root {
  --brown: #AA8B59;
  --gray: rgb(14, 19, 25);
  --gray--t: rgba(14, 19, 25, 0);
  --body-font: 'Josefin Sans', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--body-font);
  font-size: 90%;
  color: white;
  text-align: center;
  background: var(--gray)  url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="28" height="49" viewBox="0 0 28 49"%3E%3Cg fill-rule="evenodd"%3E%3Cg id="hexagons" fill="%239C92AC" fill-opacity="0.1" fill-rule="nonzero"%3E%3Cpath d="M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

body {
  margin: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(
    var(--gray) 30%, var(--gray--t)
  );
}

main {
  width: 600px;
  @media(max-width: 610px) {
    width: 320px;
    form { padding: 2rem; }
    nav { display: flex; justify-content: space-between; }
    nav a { margin: 0; }
  }
}

h1 {
  font-family: 'Crimson Text', serif;
  font-size: 3.4rem;
  letter-spacing: -0.06rem;
}

nav {
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  margin: 0 0 2rem 0;
  a {
    display: inline-block;
    padding: 0.3rem 0;
    margin: 0 1rem;
    &.active {
      border-bottom: 2px solid var(--brown);
    }
  }
}
a {
  color: inherit;
  text-decoration: none;
}

.form-field {
  margin: 0 0 1rem 0;
  &:focus-within {
    label {
      color: white;
    }
  }
}
label {
  display: block;
  text-align: left;
  color: #7C7C7C;
}
input {
  width: 100%;
  background: none;
  border: 2px solid #7C7C7C;
  padding: 1.5rem;
  &:focus {
    border-color: white;
    outline: 0;
  }
}

.button {
  background: var(--brown);
  color: white;
  border: 0;
  font-family: var(--body-font);
  text-transform: uppercase;
  padding: 1.5rem;
  font-size: 1.0rem;
  letter-spacing: 0.1rem;
}

.forgot-password {
  display: block;
  margin: 2rem 0;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  opacity: 0.9;
}
            
          
!
999px
🕑 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 ..................

Console