Pen Settings



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


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


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.


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.


                <div class="st">
  <i class="decorator full"></i>
  <span class="w full js-w1">
    <span class="l">S</span>trange<span class="l">r</span>
  <i class="decorator"></i>
  <span class="w w-2 js-w2">Things</span>
  <i class="decorator"></i>

<input class="input js-txt" value="Stranger Things" placeholder="Two Words" />


                * {
  margin: 0;
  padding: 0;
  position: relative;
  box-sizing: border-box;

html {
  background-color: #110809;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

body {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1;

.st {
  text-align: center;
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  font-family: "Cochin";
  font-size: 5em;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 2px red;
  filter: drop-shadow(0 0 15px rgba(255,0,0,1));

.l {
  font-size: 1.4em;
  vertical-align: -.175em;
  margin-top: -.2em;

.full {
  flex: 1 0 100%;

.w {
  white-space: nowrap;
  &-2 {
    margin: 0 .1em;
    margin-top: -.4em;

.decorator {
  height: .1em;
  border: 2px solid red;
  flex: 1 0 auto;

.input {
  position: absolute;
  bottom: 2em;
  text-align: center;
  font: inherit;
  appearance: none;
  color: red;
  background-color: transparent;
  border: 2px dotted transparent;
  border-bottom-color: currentColor;
  opacity: .75;
  &:focus {
    opacity: 1;
    outline: none;



                // Enter your words here!
// Caveats: only two words, and the first word should be longer than the second.

const upsideDown = (words) => {
  // Find the placeholders
  let wordBuckets = [
  // Set up our words
  let w1 = words.split(' ')[0] || 'Stranger',
      w2 = words.split(' ')[1] || 'Things';
  // Create an array from the first word
  w1 = w1.split('');
  // Grab the first and last letters of the first word
  let l1 = w1[0],
      l2 = w1[w1.length - 1];
  // Remove the first and last letter from the first word
  w1 = [
  wordBuckets[0].innerHTML = `<span class="l">${w1[0]}</span>${w1[1]}<span class="l">${w1[2]}</span>`
  wordBuckets[1].innerHTML = `${w2}`;

let input = document.querySelector('.js-txt');

input.addEventListener('keyup', (e) => {