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


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


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.


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.


                <h2>Rider Login</h2>
<form action="/">
  <div class="floating-label">
    <input type="text" placeholder="Rider Name" value="Domiboy" required pattern="^\s*\S+\s*$" maxlength="10">
    <label>Rider Name</label>
  <div class="floating-label">
    <option value="" disabled selected>- Select -</option>
    <option value="D400">Bajaj Dominar 400</option>    
    <option value="200NS">Bajaj Pulsar 200NS</option>    
    <option value="K200">KTM Duke 200</option>
    <label>Select Vehicle</label>

  <div class="floating-label">
    <input type="text" placeholder="Contact No" required pattern="^(0|[1-9][0-9]*)$" maxlength="10">
    <label>Contact No</label>
  <button type="button">Login</button>

<a href="">👨‍💻 with ❤️</a>


                $_fontSize: 18px;
$_primaryColor: #bada55;
$_textInvalidColor: #e01f1f;
$_boderColor: #f5f5f5;

// Prototype Styles
* {
  box-sizing: border-box;

body {
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #1d1e22;
  font-family: "Open Sans", sans-serif;

  h2 {
    position: relative;
    margin-left: 50px;
    font-size: 20px;
    color: #fff;

    &:before {
      content: "";
      position: absolute;
      bottom: -10px;
      left: -50px;
      background: url(
      background-size: contain;
      height: 45px;
      width: 45px;
      display: block;

  form {
    margin-top: 35px;

  button {
    width: 100%;
    padding: 12px 16px;
    margin-top: 10px;
    background-color: #34353d;
    color: #fff;
    border: 1px solid #34353d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    &:hover {
      background-color: $_primaryColor;
  a {
    position: absolute;
    bottom: 15px;
    font-size: 12px;
    text-decoration: none;
    color: #fff;
    opacity: 0.4;

// Floating Input Styles 😎
.floating-label {
  position: relative;
  margin-bottom: 25px;
  select {
    padding: 8px 12px;
    width: 100%;
    font-size: $_fontSize;
    color: #b2b3bd;
    background-color: transparent;
    border: 1px solid $_boderColor;
    border-radius: 6px;
    outline: none;

    & + label {
      position: absolute;
      top: -10px;
      left: 12px;
      padding: 0 6px;
      color: #fff;
      font-size: 90%;
      color: $_primaryColor;
      background-color: #1d1e22;
      opacity: 1;
      visibility: visible;
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    // Label style when placeholder is shown
    &:placeholder-shown + label {
      transform: translateY(22px) scale(1.1);
      opacity: 0;
      visibility: hidden;

    // Label style when placeholder is not shown
    &:not(:placeholder-shown) {
      border-color: $_boderColor;
      + label {
        color: $_primaryColor;
      // Label style when the input is invalid
      &:invalid {
        border-color: $_textInvalidColor;
        + label {
          color: $_textInvalidColor;

// Checks if browser is Edge and hides placeholder since ::placeholder-shown is not supported in Edge. 😅
// However it does support in IE 🤐
// @support doesn't supportn in IE 🤯
@supports (-ms-ime-align: auto) {
  input::-ms-input-placeholder {
    color: transparent;