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. 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


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="toggle">
  <a href="#content" class="button" aria-controls="content">Reveal</a>
  <div id="content" class="feedback">


                :focus {
  outline: 0.0625em dotted rgba(0, 0, 0, 0.25);

.toggle {
  position: relative;
  display: inline-block;

.toggle [aria-hidden] {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;

.toggle [aria-hidden='true'] {
  display: none;

.toggle [aria-hidden='false'] {
  display: inline-block;
  z-index: 2;

.button {
  text-decoration: none;
  box-sizing: border-box;
  white-space: nowrap;
  cursor: pointer;
  display: inline-block;
  font-size: 1em;
  font-variant: small-caps;
  text-align: center;
  text-transform: lowercase;
  text-indent: 0.125em;
  text-shadow: 0 -0.0625em 0 rgba(0, 0, 0, 0.25);
  letter-spacing: 0.125em;
  line-height: 1;
  border: 0.0625em solid;
  border-radius: 0.25em;
  background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.2));
  transition: all 0.1s linear;
  padding: 0.375em 1em 0.5em;
  margin: 0;
  box-shadow: inset 0 0.0625em 0.0625em rgba(255, 255, 255, 0.25);
  color: #ffc;
  color: rgba(255, 255, 204, 0.9);
  background-color: #c63;
  border-color: #8f4724;
  border-bottom-color: #7a3d1f;
  border-top-color: #c63;

button:focus {
  background-color: #b85c2e;
  border-color: #7a3d1f;
  border-bottom-color: #66331a;
  border-top-color: #b85c2e;

button:focus {
  box-shadow: 0 0 0.5em 0 rgba(0, 0, 0, 0.25);

button:active {
  background-color: #a35229;
  border-color: #a35229;

.feedback {
  display: block;
  padding: 0.25em 1em;
  background-color: #fc3;
  color: #300;
  color: rgba(0, 0, 0, 0.8);
  box-shadow: inset 0 0 1em rgba(0, 0, 0, 0.1);
  border: 0.1875em double rgba(0, 0, 0, 0.1);
  border-radius: 0.125em;
  box-sizing: border-box;
  border-top-width: 0;
  margin-top: -0.125em;

@keyframes swingdown {
  from {
    transform: perspective(100vh) rotate3d(1, 0, 0, -90deg);
  to {
    transform: perspective(100vh);

.feedback[aria-hidden='false'] {
  transform-origin: center top;
  animation-name: swingdown;
  animation-duration: 0.15s;
  animation-iteration-count: 1;
  animation-direction: normal;


                (function(win, doc) {
  'use strict';
  if (!doc.querySelectorAll || !win.addEventListener) {
    // doesn't cut the mustard.
  var toggles = doc.querySelectorAll('[aria-controls]');
  var togglecount = toggles.length;
  var toggleID;
  var togglecontent;
  var i;
  var target;
  for (i = 0; i < togglecount; i = i + 1) {
    toggleID = toggles[i].getAttribute('aria-controls');
    togglecontent = doc.getElementById(toggleID);
    togglecontent.setAttribute('aria-hidden', 'true');
    togglecontent.setAttribute('tabindex', '-1');
    toggles[i].setAttribute('aria-expanded', 'false');

  function toggle(ev) {
    ev = ev || win.event;
    target = || ev.srcElement;
    if (target.hasAttribute('aria-controls')) {
      toggleID = target.getAttribute('aria-controls');
      togglecontent = doc.getElementById(toggleID);
      if (togglecontent.getAttribute('aria-hidden') == 'true') {
        togglecontent.setAttribute('aria-hidden', 'false');
        target.setAttribute('aria-expanded', 'true');
      } else {
        togglecontent.setAttribute('aria-hidden', 'true');
        target.setAttribute('aria-expanded', 'false');
  doc.addEventListener('click', toggle, false);
}(this, this.document));