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

              
                <blockquote class="quote">
  <h1 class="heading-primary">
    Ghost Crab <svg aria-hidden="true" class="icon-crab" width="32" height="23" xmlns="http://www.w3.org/2000/svg"><path d="M31.963 17.734l-.473-.876-2.687-1.57-3.719.741c.143-.308.244-.623.298-.944l3.242-.795 1.465-2.212a.356.356 0 1 0-.594-.393l-1.311 1.98-2.759.677a3.547 3.547 0 0 0-.19-1.004c2.066-.73 4.187-2.866 4.076-4.304-.016-.207-.221-.452-.372-.56.484-.734.97-2.238-.338-4.764-.063-.155-.733-1.656-2.247-2.648-1.31-.859-3.4-.925-4.236-.925h-.008c-.19 0-.35.059-.395.244-.045.188.046.344.22.428.445.214 1.563.744 2.352 1.204 1.5.877 2 2.223 2.103 2.553-.216-.008-.45-.111-.727-.332-.37-.297-.675-.611-.97-.914-.772-.791-1.502-1.54-3.124-1.738a.442.442 0 0 0-.297.806c.183.12 1.816 1.237 2.718 3.568.416 1.074.877 1.92 1.373 2.526l-.017.077c-.153.673-1.243 1.995-1.757 2.57-1.12-.912-2.682-1.616-4.496-1.999l.115-.237a.838.838 0 0 0-.118-1.667.84.84 0 0 0-.84.84c0 .243.106.46.272.614l-.154.316a15.585 15.585 0 0 0-4.396-.058l-.125-.258a.835.835 0 0 0 .272-.615.84.84 0 0 0-1.68 0c0 .423.315.77.722.828l.077.158c-1.952.354-3.64 1.075-4.839 2.03-.529-.597-1.565-1.866-1.714-2.522l-.017-.075c.496-.609.957-1.454 1.373-2.529.901-2.33 2.535-3.447 2.72-3.568.17-.112.241-.326.17-.518a.442.442 0 0 0-.47-.288c-1.622.198-2.352.946-3.124 1.738-.295.302-.6.614-.97.91-.277.222-.51.32-.727.33.1-.329.593-1.68 2.103-2.562.79-.461 1.908-1.008 2.353-1.222a.406.406 0 0 0 .22-.463C10.27.125 10.099.01 9.914 0c-.838.012-2.928.135-4.238.994-1.528 1.001-2.197 2.592-2.25 2.72C2.133 6.22 2.6 7.718 3.082 8.457c-.165.111-.43.293-.44.577-.061 1.548 2.185 3.524 4.07 4.258a3.54 3.54 0 0 0-.207 1.032l-2.683-.657-1.311-1.98a.356.356 0 0 0-.593.391l1.465 2.213 3.161.775c.051.314.147.62.281.921l-3.622-.7-2.686 1.57-.473.876a.356.356 0 1 0 .626.339l.378-.701 2.283-1.325 4.113.804c.003 0 .006-.009.008-.008.002 0 .002-.004.004-.004 1.179.185 2.225.497 3.135.917l-5.456-.568L5 17.173l-2.994 2.129.159 1.141a.355.355 0 1 0 .704-.098l-.099-.714 2.424-1.724 6.864.713c.263.198.512.406.733.63l-3.935-.146-2.086 2.374.107 1.043a.356.356 0 1 0 .708-.073l-.075-.734 1.658-1.887 4.188.156c.046.002.198 0 .234 0 .348 0 .71.048 1.093.099.413.055.84.111 1.282.111.496 0 .977-.056 1.441-.111.432-.051.84-.099 1.232-.099.008 0 .015-.004.024-.005.01 0 .02.005.03.005l4.188-.156 1.659 1.887-.076.733a.356.356 0 0 0 .708.074l.107-1.043-2.086-2.374-3.807.141c.21-.216.377-.37.637-.565.07-.019.165-.03.217-.035l6.575-.738 2.423 1.723-.1.714a.356.356 0 0 0 .705.098l.159-1.141-2.996-2.13-5.495.616a11.89 11.89 0 0 1 2.938-.92l.002-.017h.004l4.223-.828 2.282 1.342.378.703a.358.358 0 0 0 .482.148.354.354 0 0 0 .144-.481z" fill-rule="nonzero"/></svg>
  </h1>
  <p>
    <b>Ghost crabs</b> are semiterrestrial <a rel="external noopener" href="https://en.wikipedia.org/wiki/Crab">crabs</a> of the <a rel="external noopener" href="https://en.wikipedia.org/wiki/Subfamily_(biology)">subfamily</a> <b>Ocypodinae</b>. They are common shore crabs in <a rel="external noopener" href="https://en.wikipedia.org/wiki/Tropical">tropical</a> and <a rel="external noopener" href="https://en.wikipedia.org/wiki/Subtropical">subtropical</a> regions throughout the world, inhabiting deep burrows in the <a rel="external noopener" href="https://en.wikipedia.org/wiki/Intertidal_zone">intertidal zone</a>. They are <a rel="external noopener" href="https://en.wikipedia.org/wiki/Generalist_species">generalist</a> <a rel="external noopener" href="https://en.wikipedia.org/wiki/Scavenger">scavengers</a> and <a rel="external noopener" href="https://en.wikipedia.org/wiki/Predator">predators</a> of small animals. The name &ldquo;ghost crab&rdquo; derives from their <a rel="external noopener" href="https://en.wikipedia.org/wiki/Nocturnality">nocturnality</a> and their generally pale coloration. They are also sometimes called <b>sand crabs</b>, though the name refers to <a rel="external noopener" href="https://en.wikipedia.org/wiki/Sand_crab_(disambiguation)">various other crabs</a> that do not belong to the subfamily.
  </p>
  <p>
    Characteristics of the subfamily include one claw being larger than the other, thick and elongated eyestalks, and a box-like body. The differences in claw sizes, however, are not as marked as in male <a rel="external noopener" href="https://en.wikipedia.org/wiki/Fiddler_crab">fiddler crabs</a>. The subfamily includes 22 <a rel="external noopener" href="https://en.wikipedia.org/wiki/Species">species</a> in two <a rel="external noopener" href="https://en.wikipedia.org/wiki/Genera">genera</a>.
  </p>
  <p>
    <cite><a href="https://en.wikipedia.org/wiki/Ghost_crab">Ghost Crab &#8212; Wikipedia</a></cite>
  </p>
</blockquote>

<img 
  class="hero-photo" 
  alt="A Horned Ghost Crab scuttling along a Thai beach. Photograph."
  src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/Ocypode-ceratophthalma-horned-ghost-crab-krabi-thailand.jpg/1280px-Ocypode-ceratophthalma-horned-ghost-crab-krabi-thailand.jpg" />


<!--
  `:focus-visible` polyfill
  https://github.com/WICG/focus-visible#polyfill
-->
<script src="https://cdn.polyfill.io/v2/polyfill.js?features=Element.prototype.classList"></script>
<script src="https://unpkg.com/focus-visible"></script>

              
            
!

CSS

              
                // Removes the focus outline when focus-visible heuristics
// determine non-keyboard based input is being used to browse.
// Focus styling begins on line 85.
.js-focus-visible :focus:not(.focus-visible) {
  outline: 0;
}


// Sass logic
@function ms($scale-by, $unit: em) {
  @return #{$scale-by * 1.333}#{$unit};
}

$color-background: #002833;
$color-link: #b58900;
$color-text: #eee8d4;
$letter-spacing-loose: 0.05em;


// Styling
body {
  background-color: $color-background;
  color: $color-text;
  font-family: 'Karma', serif;
  font-size: ms(1, em);
  line-height: 1.75;
  margin-top: ms(4, rem);
  margin-bottom: 0;
}

.quote {
  margin-left: ms(1, em);
  margin-right: ms(1, em);
  max-width: 60ch;

  // Media Queries
  @media screen and (min-width: 26em) {
    margin-left: ms(2, em);
    margin-right: ms(2, em);
  }
}

.heading-primary {
  font-size: ms(1, em);
  font-variant: small-caps;
  letter-spacing: 0.1em;
  margin-bottom: ms(1, em);
  text-transform: lowercase;
}

p {
  margin-bottom: ms(1.25, em);
  
  &:last-of-type {
    margin-bottom: ms(2, em);
  }  
}

b {
  font-variant: small-caps;
  font-weight: 600;
  letter-spacing: $letter-spacing-loose;
  text-transform: lowercase;
}

a {
  background-color: $color-background;
  box-shadow: 
    inset 0 -0.36em $color-background, 
    inset 0 -0.4em currentColor;
  color: $color-link;
  text-decoration: none;
  text-shadow:
   -0.05em -0.05em $color-background, 
   -0.05em  0.05em $color-background, 
    0.05em -0.05em $color-background, 
    0.05em  0.05em $color-background;
  
  // States
  &:hover {
    box-shadow: none;
  }
  
  &:active {
    position: relative;
      top: 1px;
  }
  
  // This focus style will be applied if focus-visible
  // heuristics determine keyboard input is being used.
  &:focus {
    background-color: $color-link;
    box-shadow: none;
    color: $color-background;
    outline: 3px solid $color-link;
    text-shadow: none;
  }
}

cite {
  letter-spacing: $letter-spacing-loose;
  font-style: normal;
  font-variant: small-caps;
  text-transform: lowercase;
}

.hero-photo {
  filter: grayscale(0.5);
  height: auto;
  margin-top: ms(1, em);
  vertical-align: bottom;
  width: 100%;
}

svg {
  fill: $color-text;
  position: relative;
    top: 0.125em;
    left: ms(0.25, em);
}
              
            
!

JS

              
                
              
            
!
999px

Console