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 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">
  
  <h1>Material Design Chips</h1>
  
  <h2>Color</h2>
  
  <div class="md-chip indigo">
    <div class="md-chip-img">
      <span class="md-chip-span pink">&nbsp;</span>
    </div>
    <span class="md-chip-text">Material Design Chip</span>
  </div>
  
  <div class="md-chip red">
    <div class="md-chip-img">
      <span class="md-chip-span blue">&nbsp;</span>
    </div>
    <span class="md-chip-text">Material Design Chip</span>
  </div>
  
  <div class="md-chip teal">
    <div class="md-chip-img">
      <span class="md-chip-span orange">&nbsp;</span>
    </div>
    <span class="md-chip-text">Material Design Chip</span>
  </div>
  
  <div class="md-chip purple">
    <div class="md-chip-img">
      <span class="md-chip-span deep-purple">&nbsp;</span>
    </div>
    <span class="md-chip-text">Material Design Chip</span>
  </div>

  
  <h2>Image</h2>
  <div class="md-chip white">
    <div class="md-chip-img">
      <img src="https://i.imgur.com/sJ3beYZ.png">
    </div>
    <span class="md-chip-text">Material Design Chip</span>
  </div>

  <div class="md-chip orange">
    <div class="md-chip-img">
      <img src="https://i.imgur.com/4Ac3uFw.png">
    </div>
    <span class="md-chip-text">Material Design Chip</span>
  </div>

  <div class="md-chip blue">
    <div class="md-chip-img">
      <img src="https://i.imgur.com/CnqySrL.png">
    </div>
    <span class="md-chip-text">Material Design Chip</span>
  </div>

  <div class="md-chip green">
    <div class="md-chip-img">
      <img src="https://i.imgur.com/C3hHP55.png">
    </div>
    <span class="md-chip-text">Material Design Chip</span>
  </div>
  
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Roboto:400,500);
* {
  box-sizing: border-box;
}

body {
  background-color: #eee;
  font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-smooth: antialiased;
  margin: 0 auto;
}

h1, h2 {
  font-weight: 500;
}

.container {
  width: 600px;
  margin: 0 auto;
}

.md-chip {
  display: inline-block;
  border-radius: 42px;
  padding: 0;
  height: 42px;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
  -webkit-transition: .2s ease-out;
          transition: .2s ease-out;
}

.md-chip:hover {
  box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.md-chip-img {
  border-radius: 50%;
  width: 42px;
  height: 42px;
  overflow: hidden;
  float: left;
  box-shadow: 2px 0px rgba(0,0,0,.3);
}

.md-chip-img .md-chip-span {
  display: block;
  height: 42px;
}

.md-chip-img img {
  -webkit-transform: translate(-50%);
  margin-left: 21px;
  height: 42px;
}

.md-chip-text {
  display: inline-block;
  font-weight: 400;
  font-size: 16px;
  height: 42px;
  float: left;
  padding: 12px 18px 12px 10px;
  color: rgba(255, 255, 255, .87);
}

/* Colors */
.pink {
  background-color: #E91E63;
}

.orange {
  background-color: #ff9800;
}

.indigo {
  background-color: #3f51b5;
}

.teal {
  background-color: #009688;
}

.purple {
  background-color: #9C27B0;
}

.deep-purple {
  background-color: #512DA8;
}

.white {
  background-color: #fff;
}

.white .md-chip-text {
  color: rgba(0, 0, 0, .87);
}

.red {
  background-color: #f44336;
}

.blue {
  background-color: #2196f3
}

.green {
  background-color: #4caf50
}

/* For the sake of this demo */
.md-chip {
  margin: 0 20px 20px 0px;
}
              
            
!

JS

              
                // no js
              
            
!
999px

Console