Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <main>
  <div>
<!--   Good lord, what is happening in there?   -->
    <p>
      <span>Superintendent Chalmers stands, pointing accusingly at Principal Skinner as he asks, </span> What did you just add to the pattern library?
    </p>
  </div>
  <div>
<!--   Aurora borealis?   -->
    <p class="s">
      <span>Principal Skinner responds, </span> A date picker
    </p>
  </div>
  <div>
<!--   Aurora borealis.   -->
    <p>
      <span>Chalmers looks confused and asks, </span> So it’s WCAG 2.1 compliant?
    </p>
  </div>
  <div>
<!--   At this time of year.   -->
    <p>
      <span>He looks angry and asks, </span> And it works with screen readers?
    </p>
  </div>
  <div>
<!--   At this time of day.   -->
    <p>
      <span>He asks more angrily, </span> And keyboard alone?
    </p>
  </div>
  <div>
<!--   In this part of the country.   -->
    <p>
      <span>He raises his voice and continues, </span> And voice control?
    </p>
  </div>
  <div>
<!--   Lozalized entirely within your kitchen.   -->
    <p>
      <span>Chalmers is now shouting, </span> And has 12 distinct indicators for dates such as available, blocked, weekends, and more with 3:1 contrast?
    </p>
  </div>
  <div>
<!--   Yes.   -->
<!--    <p>
      <span>Chalmers demands, </span> You have evidence?
    </p> -->
    <p class="s">
      <span>Skinner responds calmly, </span> Yes
    </p>
  </div>
  <div>
<!--   May I see it?   -->
    <span>Chalmers is quiet, looks confused.</span>
  </div>
  <div>
    <p>
      <span>Chalmers asks with genuine curiosity, </span> Did you test it with users?
    </p>
  </div>
  <div>
    <span>Skinner thinks hard, looking around.</span>
  </div>
  <div>
<!--   No.   -->
    <p class="s">
      <span>Skinner says matter of factly,</span> No
    </p>
  </div>
</main>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Roboto+Condensed:700");

body {
  font-family: "Roboto Condensed", "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: #000;
  color: #fff;
  margin: 0;
}

main {
  margin: 0 auto;
}

span {
  position: absolute;
  top: auto;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px); /* IE 6/7 */
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  white-space: nowrap;
}

p {
  position: absolute;
  font-weight: bold;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  text-transform: uppercase;
  line-height: 1.1;
  font-weight: 700;
  text-shadow: -0.01em -0.01em 0 #fff, 0.01em -0.01em 0 #fff, -0.01em 0.01em 0 #fff, 0.01em 0.01em 0 #fff, -0.07em -0.07em 0 #000, 0.07em -0.07em 0 #000, -0.07em 0.07em 0 #000, 0.07em 0.07em 0 #000, -0.07em 0 0 #000, 0 -0.07em 0 #000, 0.07em 0 0 #000, 0 0.07em 0 #000;
  font-size: 1.8em;
/*   text-shadow: -0.05em -0.05em 0 #000, 0.05em -0.05em 0 #000, -0.05em 0.05em 0 #000, 0.05em 0.05em 0 #000, -0.05em 0 0 #000, 0 -0.05em 0 #000, 0.05em 0 0 #000, 0 0.05em 0 #000; */
/*   letter-spacing: 0.06em; */
/*   font-size: 1.6em; */
  top: .75em;
  left: 1em;
  right: 1em;
}

p.s {
  top: auto;
  bottom: .75em;
  text-align: right;
}

div {
  position: relative;
  color: #fff;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: cover;
  display: inline-block;
  float: left;
  width: 25em;
/*   width: 30em; */
  max-width: 99vw;
  max-width: calc(100vw - .2em);
  height: 14.05em;
/*   height: 16.86em; */
  max-height: 55.6vw;
  max-height: calc(56.2vw - .2em);
  margin: .1em;
}

div:nth-child(1) {
  background-image: url("https://assets.codepen.io/2729/steamed-hams_01.jpg");
}

div:nth-child(2) {
  background-image: url("https://assets.codepen.io/2729/steamed-hams_02.jpg");
}

div:nth-child(3) {
  background-image: url("https://assets.codepen.io/2729/steamed-hams_03.jpg");
}

div:nth-child(4) {
  background-image: url("https://assets.codepen.io/2729/steamed-hams_04.jpg");
}

div:nth-child(5) {
  background-image: url("https://assets.codepen.io/2729/steamed-hams_05.jpg");
}

div:nth-child(6) {
  background-image: url("https://assets.codepen.io/2729/steamed-hams_06.jpg");
}

div:nth-child(7) {
  background-image: url("https://assets.codepen.io/2729/steamed-hams_07.jpg");
}

div:nth-child(8) {
  background-image: url("https://assets.codepen.io/2729/steamed-hams_08.jpg");
}

div:nth-child(9) {
  background-image: url("https://assets.codepen.io/2729/steamed-hams_09.jpg");
}

div:nth-child(10) {
  background-image: url("https://assets.codepen.io/2729/steamed-hams_10.jpg");
}

div:nth-child(11) {
  background-image: url("https://assets.codepen.io/2729/steamed-hams_11.jpg");
}

div:nth-child(12) {
  background-image: url("https://assets.codepen.io/2729/steamed-hams_12.jpg");
}
              
            
!

JS

              
                // Overriding Codepen's auto-translate blocker
// so this can be read in other languages.
document.body.removeAttribute('translate');
              
            
!
999px

Console