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 messenger" id="container">
  <div class="message mine">Leverage agile frameworks to provide a robust synopsis for high ๐Ÿ‘ ๐Ÿ”† level ๐ŸŽš overviews. Iterative approaches to corporate strategy foster collaborative thinking ๐Ÿ’ญ๐Ÿค” to further the overall value proposition. Organically grow the holistic world ๐ŸŒŽ view ๐ŸŒ„ of disruptive innovation via workplace diversity and empowerment.</div>
  <div class="message theirs">lolwat ๐Ÿ˜†</div>
  <div class="message mine">Bring to the table win-win ๐Ÿ† survival strategies to ensure proactive domination.</div>
  <div class="message theirs">ok....</div>
  <div class="message mine">Capitalize on low ๐Ÿ”… hanging fruit ๐Ÿฅญ to identify a ballpark value added activity to beta test. ๐Ÿงช Override the digital divide ๐Ÿˆน with additional clickthroughs from DevOps. Nanotechnology immersion along the information ๐Ÿ“„ highway ๐Ÿ›ฃ will close the loop ๐Ÿ”‚โžฟโžฐ on focusing solely on the bottom โฌ‡๏ธ line. ใ€ฐ๏ธใ€ฐ๏ธใ€ฐ๏ธ</div>
  <div class="message theirs">Nanotechnology immersion along the information โ„น๏ธ highway ๐Ÿ›ฃ will close the loop ๐Ÿ”‚ on focusing solely on the bottom โฌ line. ใ€ฐ๏ธ</div>
  <div class="message mine">Exactly! Finally you ๐ŸคŸ understand.</div>
</div>
<br />
Choose color scheme:
<select id="colorchanger">
  <option value="messenger">messenger</option>
  <option value="soundcloud">soundcloud</option>
  <option value="purple">purple</option>
  <option value="peach">peach</option>
  <option value="foggy">foggy</option>
</select>
              
            
!

CSS

              
                body,
select {
  font-family: sans-serif;
  line-height: 1.2;
  font-size: 18px;
}

.container {
  width: 350px;
  height: 500px;
  background: #1e2122;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
}

.message {
  min-width: 60%;
  max-width: 80%;
  padding: 20px;
  margin-bottom: 20px;
  align-self: flex-start;
  border-radius: 4px;
  background-color: #424647;
  color: white;
  position: relative;
}

.mine {
  align-self: flex-end;
  background-repeat: no-repeat;
  background-attachment: fixed;

  // default fb messenger colors
  .messenger & {
    background-image: linear-gradient(#0072ff, #00c6ff);
  }

  // soundcloud colors
  .soundcloud & {
    background-image: linear-gradient(#f83600, #fe8c00);
  }

  .purple & {
    background-image: linear-gradient(#6e48aa, #9d50bb);
  }

  .peach & {
    background-image: linear-gradient(#ff4e50, #f9d423);
  }

  .foggy & {
    background-image: linear-gradient(#b993d6, #8ca6db);
  }
}

              
            
!

JS

              
                const container = document.getElementById("container");
const colorChanger = document.getElementById("colorchanger");
colorChanger.onchange = (event) => {
  container.classList = `container ${event.target.value}`;
};

              
            
!
999px

Console