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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <div class="container">
  <article class="appointment">
    <a class="appointment__edit" href="#">...</a>
    <main class="appointment__main">
      <h1 class="appointment__title">Meeting work report</h1>
      <div class="appointment__details">
        <div class="appointment__duration">
          1.5 Hours
        </div>
        <div class="appointment__repetition">
          Weekly
        </div>
        <div class="appointment__place">
          Office
        </div>

      </div>
    </main>
    <aside class="appointment__aside">
      <div class="appointment__time">2:00 - 2:30PM</div>
    </aside>
    <footer class="appointment__footer">
      <span class="appointment__badge">Gym</span>
      <span class="appointment__badge">Power</span>
      <span class="appointment__badge appointment__badge--light">+12</span>
    </footer>

  </article>
  <article class="appointment appointment--blue">
    <a class="appointment__edit" href="#">...</a>
    <main class="appointment__main">
      <h1 class="appointment__title">Gym program - Biceps training</h1>
      <div class="appointment__details">
        <div class="appointment__duration">
          1.5 Hours
        </div>
        <div class="appointment__repetition">
          Weekly
        </div>
        <div class="appointment__place">
          Lide Gym
        </div>

      </div>
    </main>
    <aside class="appointment__aside">
      <div class="appointment__time">2:00 - 2:30PM</div>
    </aside>
    <footer class="appointment__footer">
      <span class="appointment__badge">Gym</span>
      <span class="appointment__badge">Power</span>
      <span class="appointment__badge appointment__badge--light">+ tag</span>
    </footer>
  </article>

  <article class="appointment appointment--purple">
    <a class="appointment__edit" href="#">...</a>
    <main class="appointment__main">
      <h1 class="appointment__title">Family dinner</h1>
      <div class="appointment__details">
        <div class="appointment__duration">
          2.5 Hours
        </div>
        <div class="appointment__repetition">
          Once
        </div>
        <div class="appointment__place">
          Lide Gym
        </div>
      </div>
    </main>
    <aside class="appointment__aside">
      <div class="appointment__time">2:00 - 2:30PM</div>
    </aside>
  </article>
</div>
              
            
!

CSS

              
                .appointment {
  // Variables
  $el: &;
  $red: #e66257;
  $light-red: #fbe6e7;
  $blue: #79cece;
  $light-blue: #dff8f5;
  $purple: #6d5ecb;
  $light-purple: #edeafe;
  
  // Block
  background: $light-red;
  margin-bottom: 10px;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 5px rgba(0, 0, 0, .05);
  color: $red;
  font-family: sans-serif;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  position: relative;

  &::before {
    content: '';
    background: $red;
    width: 20px;
    height: 20px;
    border: solid 5px white;
    border-radius: 50%;
    position: absolute;
    top: -3px;
    right: -3px;
    box-sizing: border-box;

  }


  // Element
  &__main {
    flex: 0 0 70%;
  }

  &__aside {
    text-align: right;
    flex: 0 0 calc(30% - 10px);
  }

  &__footer {
    flex: 0 0 100%;
  }

  &__title {
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 700;
  }

  &__time {
    padding-top: 7px;
  }

  &__details {
    margin: 20px 0 0;
    display: flex;
    flex-wrap: wrap;

  }

  &__footer {
    margin-top: 10px;
    padding: 10px 0 0;
    position: relative;

    &::after {
      content: '';
      border-bottom: solid 1px rgba(0, 0, 0, .05);
      position: absolute;
      top: -7px;
      left: 0;
      right: 0;
    }
  }

  &__duration,
  &__repetition,
  &__place {
    margin-right: 15px;
  }

  &__duration {
    &::before {
      content: '⌚';
    }
  }

  &__repetition {
    &::before {
      content: 'πŸ”';
    }
  }

  &__place {
    &::before {
      content: 'πŸ—ΊοΈ';
    }
  }

  &__badge {
    background: white;
    margin-right: 5px;
    padding: 5px;
    border-radius: 3px;
    font-weight: 700;
    box-sizing: content-box;

    &--light {
      color: lighten($red, 15);
    }
  }

  &__edit {
    color: $red;
    font-size: 40px;
    line-height: 0;
    text-decoration: none;
    position: absolute;
    right: 10px;
    bottom: 35px;
  }

  // Modifier

  &--blue {
    background: $light-blue;
    color: $blue;

    &::before {
      background: $blue;
    }

    #{$el}__badge {
      &--light {
        color: lighten($blue, 15);
      }
    }

    #{$el}__edit {
      color: $blue;
    }
  }

  &--purple {
    background: $light-purple;
    color: $purple;

    &::before {
      background: $purple;
    }

    #{$el}__badge {
      &--light {
        color: lighten($purple, 15);
      }
    }

    #{$el}__edit {
      color: $purple;
    }
  }

}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 360px;
}

              
            
!

JS

              
                
              
            
!
999px

Console