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

              
                <main class="poster">
  <div class="poster__design">
    <div class="poster__rect"></div>
    <div class="poster__rect"></div>
    <div class="poster__rect"></div>
    <div class="poster__rect"></div>
    <div class="poster__rect"></div>
    <div class="poster__rect"></div>
  </div>
  <section class="poster__content">
    <h1 class="poster__header">musica viva</h1>
    <p class="poster__name">goffredo petrassi</p>
    <p class="poster__name">erich schmid <span class="poster__role">leitung</span></p>
    <p class="poster__name">darius milhaud</p>
    <p class="poster__name">adolf neumeier <span class="poster__role">schlagzeug</span></p>
    <p class="poster__name">paul hindemith</p>
    <p class="poster__name">georg kertesz <span class="poster__role">bratsche</span></p>
    <p class="poster__name">rolf lieberman</p>
    <p class="poster__details">11.volkskonzert donnerstage, 8.januar 19595, 20.15 uhr<br /> tonhalle grosser saal<br /> gotfredo petrassi: ritratto di don chisciotte<br /> darius milhaud: konzert für schlagzeug und orchester <br /> paul hindemith: der schwanendreher, konzert für
      bratsche und kleines orchester<br /> rolf lieberman: erste sinfonie<br /> karten: fr. 1, 2, 3<br /> vorverkauf: tonhallekasse, hug co, kuoni ag, jacklin, genossenschaftsbuchhandlung, kredianstalt oertikon
    </p>
  </section>
</main>
              
            
!

CSS

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

*,
*:before,
*:after {
  box-sizing: border-box;
}
html {
  --poster-size: 95vmin;
  --ratio: 1 / 1.41; // A3
  font-family: "Inter", sans-serif;
  font-size: calc(var(--poster-size) / 100);
  @supports (font-variation-settings: normal) {
    font-family: "Inter var", sans-serif;
  }
}
body {
  display: grid;
  min-height: 100vh;
  background: hsl(0, 0%, 10%);
  place-items: center;
}
.poster {
  --color--background: #b52d38;
  --color--neutral: #171717;
  --color--primary: #8c2731;
  position: relative;
  display: grid;
  overflow: hidden;
  width: calc(var(--poster-size) * var(--ratio));
  height: var(--poster-size);
  padding: 2rem 1rem;
  color: var(--color--neutral);
  background-color: var(--color--background);
  align-items: end;
  &__design {
    display: grid;
    width: 63rem;
    height: 70rem;
    transform: translateX(33rem) rotate(-45deg);
    transform-origin: 0 100%;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(8, 1fr);
    grid-row-gap: 1rem;
    grid-column-gap: 1rem;
    &:before,
    &:after {
      content: "";
      background-color: var(--color--primary);
      grid-column: 3 / -1;
    }
    &:before {
      grid-row: 1;
    }
    &:after {
      grid-row: 2;
    }
  }
  &__rect {
    background-color: var(--color--primary);
    grid-column: 3 / -1;
    &:nth-of-type(n + 3) {
      background-color: var(--color--neutral);
      grid-column: 1 / span 3;
    }
    &:nth-of-type(5) {
      grid-row: 4;
    }
  }
  &__content {
    font-weight: 510;
    display: grid;
    grid-template-columns: auto auto auto;
    grid-auto-rows: 1fr;
    grid-column-gap: 0.5rem;
  }
  &__header {
    font-size: 2.25rem;
    font-weight: 600;
    grid-column: 1 / -1;
  }
  &__name {
    font-size: 2.25rem;
    white-space: nowrap;
    &:nth-of-type(odd) {
      grid-column: 3;
    }
    &:nth-of-type(even) {
      grid-column: 1;
    }
  }
  &__role {
    font-size: 1rem;
    grid-column: 2;
  }
  &__details {
    grid-column: 4;
    grid-row: 2 / span 4;
  }
}

              
            
!

JS

              
                // More Josef Müller-Brockmann! More Swiss! Rad!
              
            
!
999px

Console