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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!-- Based on: https://dribbble.com/shots/5260798-Process -->

<div class="toggle">
    <span>☀️</span>
    <input type="checkbox" id="toggle-switch" />
    <label for="toggle-switch"></label>
    <span>🌙</span>
</div>
<div class="main-container">
    <div class="steps-container">
        <div class="step completed">
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                <path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" />
            </svg>
            <div class="label completed">
                Prospect
            </div>
            <div class="icon completed">
                <i class="far fa-handshake"></i>
            </div>
        </div>
        <div class="line completed"></div>
        <div class="step completed">
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                <path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" />
            </svg>
            <div class="label completed">
                Tour
            </div>
            <div class="icon completed">
                <i class="far fa-map"></i>
            </div>
        </div>
        <div class="line next-step-in-progress">
        </div>
        <div class="step in-progress">
            <div class="preloader"></div>
            <div class="label loading">
                Offer
            </div>
            <div class="icon in-progress">
                <i class="far fa-money-bill-alt"></i>
            </div>
        </div>
        <div class="line prev-step-in-progress"></div>
        <div class="step">
            <div class="label">
                Contract
            </div>
            <div class="icon">
                <i class="far fa-newspaper"></i>
            </div>
        </div>
        <div class="line"></div>
        <div class="step">
            <div class="label">
                Settled
            </div>
            <div class="icon">
                <i class="fas fa-home"></i>
            </div>
        </div>
    </div>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Muli:700');

:root {
  --background-modal-color: #fff;
  --body-color: #fff;
  --color-timeline-default: #D2D3D8;
  --color-step-completed: #5C6174;
  --color-checkmark-completed: #fff;
  --color-in-progress: #13CB8F;
  --color-label-default: var(--color-timeline-default);
  --color-label-completed: var(--color-step-completed);
  --color-label-loading: var(--color-in-progress);
  --color-icon-completed: var(--color-step-completed);
  --color-icon-default: var(--color-timeline-default);
  &.dark-mode {
     --color-checkmark-completed: #fff;
    --background-modal-color: #5C6174;
    --color-timeline-default: #9799A3;
    --color-checkmark-completed: var(--background-modal-color);
    --body-color: #fff;
    --color-step-completed: #fff;
  }
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Muli', sans-serif;
  background: var(--body-color);
  padding: 0;
  margin: 0;
  display: flex;
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
  position: relative;
  // TOGGLE SWITCH - https://codepen.io/stefen/pen/VNVaYW
  .toggle {
    transform: scale(0.8);
    position: absolute;
    bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 140px;
    span {
      margin: 0 0.5rem;
    }
    input[type="checkbox"] {
      height: 0;
      width: 0;
      visibility: hidden;
      &:checked + label {
        background: #13CB8F;
      }
      &:checked + label:after {
        left: calc(100% - 2px);
        transform: translateX(-100%);
      }
    }
    label {
      cursor: pointer;
      width: 75px;
      height: 34px;
      background: #D2D3D8;
      display: block;
      border-radius: 40px;
      position: relative;
      &:after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 30px;
        height: 30px;
        background: #fff;
        border-radius: 40px;
        transition: 0.3s;
      }
    }
  }
  .main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 200ms ease;
    background: var(--background-modal-color);
    height: 220px;
    min-width: 420px;
    max-width: 750px;
    flex-grow: 1;
    border-radius: 5px;
    box-shadow: 0 2px 5px 0 rgba(0,0,0,0.14);
    .steps-container {
      padding: 40px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      .step {
        z-index: 1;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 200ms ease;
        flex-grow: 0;
        height: 15px;
        width: 15px;
        border: 4px solid var(--color-timeline-default);
        border-radius: 50%;
        .preloader, svg {
          display: none;
        }
        &.completed {
          width: 18px;
          height: 18px;
          background: var(--color-step-completed);
          border: none;
          svg {
            transition: all 200ms ease;
            display: block;
            height: 10px;
            width: 10px;
            fill: var(--color-checkmark-completed);
          }
        }
        &.in-progress {
          width: 18px;
          height: 18px;
          background: var(--color-in-progress);
          border: none;
          .preloader {
            display: block;
            height: 10px;
            width: 10px;
            border: 2px solid #fff;
            border-radius: 50%;
            border-left-color: transparent;
            animation-name: spin;
            animation-duration: 2000ms;
            animation-iteration-count: infinite;
            animation-timing-function: linear; 
          }
        }
        .label {
          position: absolute;
          top: 30px;
          filter: none;
          z-index: 2000;
          color: var(--color-label-default);
          transition: all 200ms ease;
          font-weight: 700;
          &.completed {
            color: var(--color-label-completed);
          }
          &.loading {
            color: var(--color-label-loading);
          }
        }
        .icon {
          font-size: 40px;
          position: absolute;
          top: -60px;
          color: var(--color-icon-default);
          transition: color 200ms ease;
          &.completed {
           color: var(--color-icon-completed); 
          }
          &.in-progress {
            color: var(--color-in-progress);
          }
        }
      }
      .line {
        transition: all 200ms ease;
        height: 2px;
        flex-grow: 1;
        max-width: 120px;
        background: var(--color-timeline-default);
        &.completed {
          background: var(--color-step-completed);
        }
        &.next-step-uncomplete {
            background: linear-gradient(to right, var(--color-step-completed), var(--color-timeline-default));
        }
        &.next-step-in-progress {
          background: linear-gradient(to right, var(--color-step-completed), var(--color-in-progress));
        }
        &.prev-step-in-progress {
         background: linear-gradient(to right,var(--color-in-progress), var(--color-timeline-default));
        }
      }
    }
  }
}


@keyframes spin {
    from {
        transform:rotate(0deg);
    }
    to {
        transform:rotate(360deg);
    }
}
              
            
!

JS

              
                const toggleSwitch = document.getElementById('toggle-switch');

toggleSwitch.onchange = (e) => {
  document.documentElement.classList.toggle('dark-mode');
}
              
            
!
999px

Console