Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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="fakeButtonWrapper" aria-hidden="true">
  <div class="fakeButton selected">
    <svg width="24" height="24" viewBox="0 0 24 24" focusable="false" class="ep0rzf NMm5M">
      <path d="M12.87 15.07l-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path>
    </svg> Text
  </div>
  <div class="fakeButton">
    <svg enable-background="new 0 0 24 24" height="24" viewBox="0 0 24 24" width="24" focusable="false" class="ep0rzf NMm5M">
      <g>
        <rect fill="none" height="24" width="24"></rect>
      </g>
      <g>
        <path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M6,17l3-4l2.25,3l3-4L18,17H6z"></path>
      </g>
    </svg> Images
  </div>
  <div class="fakeButton">
    <svg enable-background="new 0 0 24 24" height="24" viewBox="0 0 24 24" width="24" focusable="false" class="ep0rzf NMm5M">
      <g>
        <rect fill="none" height="24" width="24"></rect>
      </g>
      <g>
        <g>
          <g>
            <path d="M6,2C4.9,2,4.01,2.9,4.01,4L4,20c0,1.1,0.89,2,1.99,2H18c1.1,0,2-0.9,2-2V8l-6-6H6z M13,9V3.5L18.5,9H13z"></path>
          </g>
        </g>
      </g>
    </svg> Documents
  </div>
  <div class="fakeButton">
    <svg width="24" height="24" viewBox="0 0 24 24" focusable="false" class="ep0rzf NMm5M">
      <path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 9h10.5v3.5H4V9zm0 5.5h10.5V18H4v-3.5zM20 18h-3.5V9H20v9z"></path>
    </svg> Websites
  </div>
</div>

<h1 class="visually-hidden">Trump to NY Times Translator</h1>

<p class="visually-hidden">
  A mock up of Google Translate with one text box holding what Trump said and one text box holding how the New York Times represented it. This is strictly for sharing memes, not for real translation of any kind.
</p>


<div id="Layout">

<div class="fakeInput">
  <div class="fakeTabHolder">
    <div class="fakeTab selected" id="LabelPre">
      Trump - Detected
    </div>
    <div class="fakeTab" aria-hidden="true">
      Russian
    </div>
    <div class="fakeTab" aria-hidden="true">
      English
    </div>
    <div class="fakeTab" aria-hidden="true">
      <svg width="24" height="24" viewBox="0 0 24 24" focusable="false" class=" NMm5M">
        <path d="M5.41 7.59L4 9l8 8 8-8-1.41-1.41L12 14.17"></path>
      </svg>
    </div>
  </div>
  <div>
    <textarea aria-labelledby="LabelPre">She destroyed no cash bail, weak on crime, terrible. And yet, they weaponized the system against me. They have me. I got so many lawyers, now they want to delay cases. I won the big case in Florida, I won the big case, nobody even wrote about it. The big case, the judge was a brilliant judge, and all they do is they play the ref with the judges. This judge was a fair but brilliant judge, and as you probably heard, the big documents case, I won it. </textarea>
    <span class="icon i1"><svg width="24" height="24" viewBox="0 0 24 24" focusable="false" class=" NMm5M" aria-hidden="true"><path d="M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm-1-9c0-.55.45-1 1-1s1 .45 1 1v6c0 .55-.45 1-1 1s-1-.45-1-1V5z"></path><path d="M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"></path></svg></span>
    <span class="icon i2"><svg width="20" height="20" viewBox="0 0 24 24" focusable="false" class=" NMm5M" aria-hidden="true"><path d="M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12A4.5 4.5 0 0 0 14 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02z"></path><path d="M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"></path></svg></span>
  </div>
</div>


<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAACMCAMAAADiOnPAAAAANlBMVEUAAABfY2hscHR2p97dp35fY2piY2hfd6qnd2in4P//4KpfY3t0Y2jHwt7dwshscIeBcHRqcHT9af8LAAAAAXRSTlMAQObYZgAAAe9JREFUeNrt2klWwzAURFFV4oSiSYD9b5ZiziH2kZH/M64V3IEt6TetUm4NGJ8bL74A1RZQbQHVFlBtAdUWUG0B1RZQbQHVFlBtAdUWUG0B1RZQbQHVFlBtAdUWUG0B1RZQbQHVFlBtAdUWUG0B1RZQbQHV1lD1x2mNXDVS/fKmP0/UQHTUQHTUQHTUQHTUQHTUQHTUQHTUQHTUB/qnlDUfP+L+jjzi5UK8xokPJuLT9HI+yi1oYXu0EFDmfbXFKpv31Oqtbd7P+KK6efWR3L09SMHh5/TUHqTemHm6PkZXG+hPV81A11qdiHkWutKSSswz0XXWgWKeja6yeBXzAnSNFbeYF6ErLBPGvBC9/dpmzOPR/ebx6H7zeHS/eTy63zwe3W8ej+43b4HuN49H95o3Qfebx6Nv65qDrp2YceiYceiYceiYceiYceiYceiYceiYceiYcehfzbp8nlbI+wDz6nl95pmD5pmD5pmD5pmD5pmD5pmD5pmD5pn/Nxr5eTB/ROaRx7xcmNc488HEfJoyiwBmucUsbJktBGazhtkWYzYgma1eZlOdOb5gDoqYI7lvNRAdNRAdNRAdNRAdNRAdNRAdNRAdNRAdNRAdNRAdNRAdNRAdNRAdNRAdNRAdNRAdNRAdNRDdJiK63VuhfAE1eSNlyH91mgAAAABJRU5ErkJggg==" alt="Translated to…" width="20" height="15">


<div class="fakeInput fakeOutput">
  <div class="fakeTabHolder">
    <div class="fakeTab selected" id="LabelPost">
      New York Times
    </div>
    <div class="fakeTab" aria-hidden="true">
      Russian
    </div>
    <div class="fakeTab" aria-hidden="true">
      English
    </div>
    <div class="fakeTab" aria-hidden="true">
      <svg width="24" height="24" viewBox="0 0 24 24" focusable="false" class=" NMm5M">
        <path d="M5.41 7.59L4 9l8 8 8-8-1.41-1.41L12 14.17"></path>
      </svg>
    </div>
  </div>
  <div>
    <textarea aria-labelledby="LabelPost">This is an interesting dance. Trump has spent much of this news conference hitting Kamala Harris on crime. Now he is pointing to his own record on overhauling the criminal justice system.</textarea>
    <span class="icon"><svg width="20" height="20" viewBox="0 0 24 24" focusable="false" class=" NMm5M" aria-hidden="true"><path d="M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12A4.5 4.5 0 0 0 14 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02z"></path><path d="M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"></path></svg></span>
    <span class="icon i3"><svg focusable="false" width="24" height="24" viewBox="0 0 24 24" class=" NMm5M" aria-hidden="true"><path d="M18 16c-.79 0-1.5.31-2.03.81L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.53.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.48.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.05 4.12c-.05.22-.09.45-.09.69 0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3zm0-12c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM6 13c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm12 7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"></path></svg></span>
    <span class="icon i4"><svg focusable="false" width="24" height="24" viewBox="0 0 24 24" class=" NMm5M" aria-hidden="true"><path d="M12 6c0-.55-.45-1-1-1H5.82l.66-3.18.02-.23c0-.31-.13-.59-.33-.8L5.38 0 .44 4.94C.17 5.21 0 5.59 0 6v6.5c0 .83.67 1.5 1.5 1.5h6.75c.62 0 1.15-.38 1.38-.91l2.26-5.29c.07-.17.11-.36.11-.55V6zm-2 1.13L7.92 12H2V6.21l1.93-1.93L3.36 7H10v.13zM22.5 10h-6.75c-.62 0-1.15.38-1.38.91l-2.26 5.29c-.07.17-.11.36-.11.55V18c0 .55.45 1 1 1h5.18l-.66 3.18-.02.24c0 .31.13.59.33.8l.79.78 4.94-4.94c.27-.27.44-.65.44-1.06v-6.5c0-.83-.67-1.5-1.5-1.5zm-.5 7.79l-1.93 1.93.57-2.72H14v-.13L16.08 12H22v5.79z"></path></svg></span>
    <span class="icon i5"><svg enable-background="new 0 0 24 24" focusable="false" height="24" viewBox="0 0 24 24" width="24" class=" NMm5M" aria-hidden="true"><g><rect fill="none" height="24" width="24"></rect></g><g><path d="M16,20H5V6H3v14c0,1.1,0.9,2,2,2h11V20z M20,16V4c0-1.1-0.9-2-2-2H9C7.9,2,7,2.9,7,4v12c0,1.1,0.9,2,2,2h9 C19.1,18,20,17.1,20,16z M18,16H9V4h9V16z"></path></g></svg></span>
    <span class="icon"></span>
  </div>
</div>
  
</div>
              
            
!

CSS

              
                body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.4;
  /*   line-height: 1.5; */
  /*   letter-spacing: 0.12em; */
  /*   word-spacing: 0.16em; */
  background-color: #fff;
  color: #000;
  font-size: 0.8em;
}

html, body {
  height: 90svh;
}

.fakeButton {
  align-items: center;
  border-radius: 0.3em;
  border: 0.07em solid rgb(218, 220, 224);
  box-sizing: border-box;
  color: rgb(25, 103, 210);
  display: inline-flex;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  font-size: 1em;
  height: 2.6em;
  justify-content: center;
  letter-spacing: 0.015em;
  margin: 0.4em 0.2em;
  min-width: 5em;
  padding: 0 1em 0 0.9em;
  position: relative;
  vertical-align: middle;
}

.fakeButton.selected {
  background: rgba(66, 133, 244, 0.12);
}

.fakeButton svg {
  fill: rgb(25, 103, 210);
  margin: 0 0.3em 0 0;
  width: 1.8em;
}

.fakeInput {
/*   outline: 2px dotted #f00; */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-content: stretch;
}

.fakeTabHolder {
  position: relative;
  display: flex;
  /*   flex: 0 1 auto; */
  margin: 1.5em 0 0 0;
}

.fakeButtonWrapper,
.fakeTabHolder {
  padding: 0 0 0 1em;
}

.fakeTab {
  border-bottom: 0.25em solid transparent;
  color: rgb(95, 99, 104);
  flex: 0 1 auto;
  font-family: "Roboto", arial, sans-serif;
  font-weight: 600;
  height: 2.6em;
  justify-content: center;
  letter-spacing: 0.025em;
  line-height: 1.8;
  margin: 0.4em 0 0 0;
  min-width: auto;
  padding: 0 0.8em;
  position: relative;
  text-align: center;
  vertical-align: middle;
}

.fakeTab.selected {
  color: rgb(26, 115, 232);
  border-bottom-color: rgb(26, 115, 232);
}

.fakeTab svg {
  fill: rgb(95, 99, 104);
  height: 1.6em;
}

.fakeInput > div + div {
  display: flex;
  margin: -1px 0 0 0;
  position: relative;
  align-items: stretch;
  align-content: stretch;
  flex: 1 1 auto;
}

.fakeInput textarea {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  flex: 1 1 auto;
  font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif;
  font-size: 1.8em;
  line-height: 1.2;
  color: rgb(60, 64, 67);
  padding: .5em .8em 1.5em .8em;
  min-height: 4em;
  flex: 1 1 auto;
}

.icon svg {
  fill: rgb(95, 99, 104);
}

.icon {
  position: absolute;
  bottom: .75em;
  left: 1em;
}

.icon.i2 {
  left: 5em;
}

.fakeOutput textarea {
  background-color: rgb(245, 245, 245);
  border-color:  rgb(245, 245, 245);
}

.icon.i3 {
  left: auto;
  right: 1em;
}

.icon.i4 {
  left: auto;
  right: 5em;
}

.icon.i5 {
  left: auto;
  right: 9em;
}

#Layout {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  align-content: stretch;
  gap: 0;
  height: 100%;
}

#Layout > * {
/*   outline: 2px dotted #0f0; */
  flex: 1 1 auto;
}

#Layout > img {
  margin: 2em 0 0 0;
  flex: 0 0 auto;
  align-self: center;
/*   outline: 2px dotted #f00; */
}

.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0); 
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  white-space: nowrap; 
}

@media (min-width:50em) {
  #Layout {
    flex-direction: row;
  }
  #Layout > img {
    align-self: flex-start;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console