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

              
                <main>
  <label>Star Wars</label>

  <div class="row">
    <div class="avatar dk-orange"></div>
    <div class="user-name">Leia Organa</div>
    <div class="user-email">(leia@rebelalliance.com)</div>
    <div class="role">Founder of the Resistance</div>
  </div>
  
  <div class="row">
    <div class="avatar seagreen"></div>
    <div class="user-name">Luke Skywalker</div>
    <div class="user-email">(luke@skywalker.com)</div>
    <div class="role">Jedi Master</div>
  </div>
  
  <div class="row">
    <div class="avatar blue"></div>
    <div class="user-name">Han Solo</div>
    <div class="user-email">(han@solo.com)</div>
    <div class="role">Rogue Smuggler</div>
  </div>
  
  <div class="row">
    <div class="avatar yellow"></div>
    <div class="user-name">Chewbacca</div>
    <div class="user-email">(chewie@solo.com)</div>
    <div class="role">Wookiee</div>
  </div>
  
  <div class="row group">
    <a id="hide1" href="#hide1" class="hide"><i class="material-icons">keyboard_arrow_right</i></a>
    <a id="show1" href="#show1" class="show"><i class="material-icons">keyboard_arrow_down</i></a>
    <div class="group-avatar"><i class="material-icons">group</i></div>
    <div class="group-name">New Kids On The Block</div>
    <div class="group-count">(6)</div>
    <div class="group-members">
      <ul class="list">
        <li>
          <div class="avatar cyan"></div>
          <div class="user-name">Rey</div>
          <div class="user-email">(rey@rebelalliance.com)</div>
          <div class="role">Jedi Master</div>
        </li>
        <li>
          <div class="avatar lt-purple"></div>
          <div class="user-name">Finn</div>
          <div class="user-email">(finn@rebelalliance.com)</div>
          <div class="role">Co-General</div>
        </li>
        <li>
          <div class="avatar green"></div>
          <div class="user-name">Poe Dameron</div>
          <div class="user-email">(poe@rebelalliance.com)</div>
          <div class="role">Co-General</div>
        </li>
        <li>
          <div class="avatar pink"></div>
          <div class="user-name">Rose Tico</div>
          <div class="user-email">(rose@rebelalliance.com)</div>
          <div class="role">Head of Engineering Corps</div>
        </li>
        <li>
          <div class="avatar orange"></div>
          <div class="user-name">BB-8</div>
          <div class="user-email">(bb-8@rebelalliance.com)</div>
          <div class="role">Droid</div>
        </li>
        <li>
          <div class="avatar lt-blue"></div>
          <div class="user-name">Kylo Ren</div>
          <div class="user-email">(supremeleader@firstorder.com)</div>
          <div class="role">¯\_(ツ)_/¯</div>
        </li>
      </ul>
    </div>
  </div>
  
</main>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,400i,700,700i&display=swap');

@import url(//fonts.googleapis.com/icon?family=Material+Icons);

body {
  font-family: 'Ubuntu Mono', monospace;
  color: #114;
  background-color: #f2f6fe;
}

a {
  color: #114;
  text-decoration: none;
}

main {
  width: 680px;
  margin: 40px auto;
  padding: 40px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0px 0px 30px rgba(51, 51, 238, .12);
}

label {
  display: block;
  margin: 0 0 20px 30px;
  font-weight: 700;
}

.row {
  width: 100%;
  padding: 20px 0;
  border-top: 1px solid #ebebfd;
  display: flex;
  flex: 1 100%;
  flex-flow: row wrap;
  align-items: center;
  
  &:last-child {
    border-bottom: 1px solid #ebebfd;
  }
}

.avatar, .group-avatar {
  width: 38px;
  height: 38px;
  background-color: #e9e9ed;
  border-radius: 50%;
  text-align: center;
}

.avatar {
  order: 1;
  margin-left: 30px;
}

.user-name {
  order: 2;
  margin-left: 20px;
}

.user-email {
  order: 3;
  flex: 1 auto;
}

.group-count {
  order: 4;
}

.user-email, .group-count {
  margin-left: 10px;
  opacity: 0.4;
}

.role {
  order: 4;
  font-size: 13px;
  letter-spacing: 0.5px;
  line-height: 1.5;
  display: flex;
  align-self: center;
  
  i {
    font-size: 16px;
  }
}

.group {  
  .hide, .show {
    order: 1;
    opacity: 0.5;
    width: 30px;
  }
  .group-avatar {
    order: 2;
    margin-left: 0;
    
    i {
      opacity: 0.5;
      padding-top: 6px;
    }
  }
  .group-name {
    order: 3;
    margin-left: 20px;
  }
  .group-members {
    order: 5;
    flex: 100%;
  }
  .avatar {
    width: 28px;
    height: 28px;
    margin-left: 15px;
  }
  .user-name {
    margin-left: 25px;
  }
}

.group-members, .show, .hide:target {
  display: none;
}

.hide {
  &:target + .show, &:target ~ .group-members {
    display: block;
  }
}

.list {
  list-style: none;
  margin: 20px 0 0 20px;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  
  li {
    display: flex;
    flex: 1 100%;
    flex-flow: row wrap;
    align-items: center;
    padding-bottom: 20px;
  }
}

/* avatar colors */
.blue { background-color: #33e; }
.lt-blue { background-color: #bef; }
.green { background-color: #4b5; }
.seagreen { background-color: #0c9; }
.pink { background-color: #f6a; }
.purple { background-color: #c6f; }
.lt-purple { background-color: #88e; }
.cyan { background-color: #0ee; }
.dk-orange { background-color: #f43; }
.orange { background-color: #f90; }
.yellow { background-color: #fc5; }

/* icons */
.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;

  /* Support for all WebKit browsers. */
  -webkit-font-smoothing: antialiased;
  /* Support for Safari and Chrome. */
  text-rendering: optimizeLegibility;

  /* Support for Firefox. */
  -moz-osx-font-smoothing: grayscale;

  /* Support for IE. */
  font-feature-settings: 'liga';
}
              
            
!

JS

              
                
              
            
!
999px

Console