Pen Settings



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


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.


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.


    <button id="dyslexia-toggle" type="button" aria-pressed="false">Dyslexia-friendly</button>
    <h1>The Index Card Look</h1>
    <h2>Cards with Adhesive Labels</h2>
    <p>This fun little design is <strong>intended</strong> to resemble a stack of pages or index cards on a desktop, with headings that resemble self-adhesive labels placed by hand. At smaller viewport widths the extra decoration gets too crowded, so we have a media query to ensure the content remains in focus. For extra fun the surrounding background color should evoke a manila folder.</p>

      <li><strong>Line length:</strong> is probably a little wider than WCAG guidelines would indicate.</li>
      <li><strong>Contrast:</strong> should meet AA guidelines.</li>
      <li>Item 3</li>

<p>Augue eget arcu dictum varius duis at. Sagittis vitae et leo duis ut diam quam nulla porttitor. Eu ultrices vitae auctor eu augue ut lectus arcu bibendum. Vitae aliquet nec ullamcorper sit amet. Pellentesque sit amet porttitor eget dolor morbi non arcu. Eget nulla facilisi etiam dignissim. Duis ut diam quam nulla porttitor massa. Diam phasellus vestibulum lorem sed risus ultricies. Pellentesque elit eget gravida cum sociis natoque penatibus et. Consequat interdum varius sit amet mattis vulputate enim nulla aliquet. Dictumst vestibulum rhoncus est pellentesque elit ullamcorper dignissim cras. Imperdiet massa tincidunt nunc pulvinar sapien et ligula ullamcorper. In eu mi bibendum neque.</p>

<p>Ut etiam sit amet nisl. Vitae justo eget magna fermentum iaculis eu non diam. Molestie nunc non blandit massa. Cursus in hac habitasse platea dictumst. Sapien et ligula ullamcorper malesuada. Fringilla est ullamcorper eget nulla facilisi etiam. Praesent tristique magna sit amet purus gravida quis. Vel turpis nunc eget lorem. Nibh nisl condimentum id venenatis a condimentum. Iaculis urna id volutpat lacus. Neque laoreet suspendisse interdum consectetur libero id faucibus. Condimentum lacinia quis vel eros donec ac. Enim facilisis gravida neque convallis a cras semper auctor. Nunc mattis enim ut tellus elementum sagittis. Erat pellentesque adipiscing commodo elit at imperdiet dui accumsan. Ac placerat vestibulum lectus mauris ultrices. Cras sed felis eget velit. Augue interdum velit euismod in pellentesque massa.</p>


                body {
  font-family: Overpass, Arial, sans-serif;
  background-color: #F0DC82;
  padding: 1em;
article {
 position: relative;
 max-width: 100em;
main {
  background: #e8e8e8;
  max-width: 68em;
  min-height: 75%;
  padding: 1.875em 3.25em;
  line-height: 1.5;
h2 {
  background-color: #fff;
  border: thin grey outset;
  transform: rotate(-0.7deg);

@media(min-width:700px) {
  body:not(.dyslexia-mode) main {
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    background-image: url(;
    width: 80%;
  main:before, main:after {
    content: "";
    height: 98%;
    position: absolute;
    max-width: 75em;
    width: 95%;
    z-index: -1;
  body:not(.dyslexia-mode) main:before {
    background: #fafafa;
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
    left: -5px;
    top: -4px;
    transform: rotate(-2.5deg);
  body:not(.dyslexia-mode) main:after {
    background: #f6f6f6;
    box-shadow: 0 0 3px rgba(0,0,0,0.2);
    left: -6px;
    top: 1px;
    transform: rotate(1.4deg);

.dyslexia-mode {
    letter-spacing: 0.35ch;
    word-spacing: 1.225ch; /* 3.5x letter-spacing */
    font-variant-ligatures: none; /* explicitly disable ligatures */
    font-weight: 600; /* demi-bold */
    font-size: 150%; /* assuming 16px base size, convert to 18pt */

.dyslexia-mode main {
   line-height: 2.0;

.dyslexia-mode main p {
   margin-top: 3.5em;

.dyslexia-mode strong {
  color: #000;

.dyslexia-mode h2 {
  border: none; border-bottom: thin grey solid;  /* just keeping the bottom border for this element, to retain some separation */
  max-width: 100%; /* standard width */
  transform: none; /* do not rotate */
  background-color: inherit; /* We no longer look like a label, so we don't require our own background */
  margin-bottom: 1em; padding-left:0; /* some spacing adjustments */
.dyslexia-mode main li:nth-of-type(odd) {
    background-color: palegoldenrod;
#dyslexia-toggle {
  padding: 1em;
  font-size: 18pt;
  letter-spacing: 0.35ch;

.dyslexia-mode #dyslexia-toggle {
  background-color: #115c7d;
  color: #fff;


                // toggle dyslexia support
const isPressed = window.localStorage.getItem("dyslexic") === 'true';
if(isPressed) {
// set the button to pressed if appropriate
const toggle = document.getElementById("dyslexia-toggle");
if(isPressed) {
    toggle.setAttribute('aria-pressed', 'true');
// toggle dyslexia support
toggle.addEventListener('click', (e) => {
  let pressed ='aria-pressed') === 'true';'aria-pressed', String(!pressed));
  window.localStorage.setItem("dyslexic", String(!pressed));