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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                 <main class="poster">
      <section class="poster__content poster__content--upper">
        <div class="poster__content-block">
          <p>Installations by</p>
          <ul>
            <li>Vernon Fisher</li>
            <li>Myrel Chernick</li>
            <li>Paul Sharits</li>
          </ul>
        </div>
        <div class="poster__content-block">
          <p>
            Haden Gallery <br />
            Hayden Memorial Library Building <br />
            Massachusetts Institute of Technology <br />
            160 Memorial Drive <br />
            Cambridge Massachusetts 02139
          </p>
        </div>
        <div class="poster__content-block">
          <p>November 20-December 23, 1962</p>
        </div>
        <div class="poster__content-block">
          Public Preview <br />
          Friday, November 19, 6-8 pm
        </div>
      </section>
      <header class="poster__header">
          <p class="poster__title" role="presentation">Mediums</p>
          <p class="poster__title" role="presentation">Mediums</p>
          <p class="poster__title" role="presentation">Mediums</p>
          <p class="poster__title">Mediums</p>
          <p class="poster__title">Of</p>
          <p class="poster__title">Language</p>
          <p class="poster__title" role="presentation">Language</p>
          <p class="poster__title" role="presentation">Language</p>
          <p class="poster__title" role="presentation">Language</p>
      </header>
      <section class="poster__content poster__content--lower">
        <div class="poster__content-block">
          <p>
            Panel Discussion and Slide Presentation by the Artists <br />
            MIT Building 6, Room 120 <br />
            Friday, November 19,<br />
            5:30 pm
          </p>
        </div>
        <div class="poster__content-block">
          <p>
            Gallery Hours <br />
            Weekdays 10-4, Weekends 1-5<br />
            Telephone <br />
            Gallery 253-4680 <br />
            Office 253-4400
          </p>
        </div>
        <div class="poster__content-block">
          <p>Illustrated Catalogue available</p>
        </div>
        <div class="poster__content-block">
          <p>
            Organized by the MIT Committee on the Visual Arts <br />
            Supported by the National Endowment for the Arts, <br />
            a Federal Agency, Washington, D.C.
          </p>
        </div>
      </section>
    </main>
              
            
!

CSS

              
                @import url("https://rsms.me/inter/inter.css");

*,
*:before,
*:after {
  box-sizing: border-box;
}
html {
  --poster-size: 95vmin;
  --ratio: 415 / 512;

  --poster-width: calc(var(--poster-size) * var(--ratio));
  --poster-height: var(--poster-size);

  --poster-text-color--light: hsl(300, 7%, 95%);
  --poster-text-color--mid: hsl(0, 1%, 73%);
  --poster-text-color--dark: hsl(226, 7%, 52%);

  --poster-background-color--light: hsl(248, 9%, 18%);
  --poster--background-color--dark: hsl(206, 18%, 8%);

  --app-background-color: hsl(206, 18%, 7%);

  font-family: "Inter", sans-serif;
  font-size: calc(var(--poster-width) / 100);
}
body {
  display: grid;
  min-height: 100vh;
  color: var(--poster-text-color--light);
  background: var(--app-background-color);
  place-items: center;
}
.poster {
  display: grid;
  width: var(--poster-width);
  height: var(--poster-size);
  padding: 9rem;
  background-image: radial-gradient(
    circle at top center,
    var(--poster-background-color--light),
    var(--poster--background-color--dark)
  );
  grid-template-columns: repeat(20, 1fr);
  &__content {
    font-size: 0.8rem;
    font-weight: 200;
    &--upper {
      grid-column: 9 / span 3;
    }
    &--lower {
      grid-column: 12 / span 3;
    }
    &-block {
      margin-bottom: 1em;
    }
  }
  &__header {
    font-size: 8rem;
    display: grid;
    letter-spacing: -0.08em;
    text-transform: uppercase;
    grid-column: 1 / span 20;
    grid-template-columns: repeat(20, 1fr);
    grid-auto-flow: column;
  }
  &__title {
    --color: hsl(300, 7%, 95%);
    --color--dark: #bbb9b9;
    $positions: (
      (12, 8),
      (9, 9),
      (6, 9),
      (3, 9),
      (9, 9),
      (9, 2),
      (6, 11),
      (3, 11),
      (1, 11)
    );
    display: block;
    @for $i from 1 through length($positions) {
      $position: nth($positions, $i);
      &:nth-of-type(#{$i}) {
        grid-column: #{nth($position, 1)} / span #{nth($position, 2)};
        grid-row: #{$i};
      }
    }
  }
  [role="presentation"] {
    --color: var(--poster-text-color--mid);
    --color--dark: var(--poster-text-color--dark);
  }
  .char {
    color: var(--color);
    &--dark {
      color: var(--color--dark);
    }
  }
}

              
            
!

JS

              
                // Based on Jacqueline Casey's amazing MIT posters.

Splitting({target: '.poster__header', by:"chars"});

const characters = document.querySelectorAll('.char');
const darkCharacters = [1,3,6,9,11,12,14,15,17,20,23,25,26,28,29,32,34,36,38,39,41,43,45,48,50,52,54,55,57,59,61];
characters.forEach(character => {
    const correlativeIndex = parseInt(getComputedStyle(character).getPropertyValue('--char-index'))+1;
    if (darkCharacters.includes(correlativeIndex)) character.classList.add('char--dark');
})
              
            
!
999px

Console