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

              
                <h1 class="font-ttw">Malerei, Fotografie, Film (pg. 126)</h1>
<div class="example-wrapper">
  <div class="grid">
    <div class="grid__item">
      <div class="content">
        <p>Tiefe Fliegeraufnahme über einem Platz mit</p>
        <p class="font-ttw large">8</p>
        <p>Straßenöffnungen.</p>
        <img src="https://res.cloudinary.com/huijing/image/upload/v1488125908/tempo.jpg">
      </div>
    </div>
    <div class="grid__item font-ttw">
      <p>TEMPO-o-</p>
    </div>
    <div class="grid__item">
      <p>Die Fahrzeuge: elektrische Straßenbahn, Autos, Last&shy;wagen, Fahrräder, Droschken, Autobus, Cyklonette. Motor&shy;räder fahren in raschem Tempo vom Mittelpunkt aus&shy;wärts, dann plötzlich alle umgekehrt; in der Mitte treffen sie sich. Die Mitte öffnet sich, ALLES sinkt tief, tief, tief—</p>
      <p>ein Funkturm.</p>
    </div>
    <div class="grid__item">
      <div class="gear"><div class="inner-gear"></div></div>
    </div>
    <div class="grid__item">
      <img src="https://res.cloudinary.com/huijing/image/upload/v1488125908/tempo2.jpg">
    </div>
    <div class="grid__item">
      <div class="arrow"></div>
    </div>
    <div class="grid__item font-smg">
      <p>(Der Appa&shy;rat wird rasch um&shy;gekippt; Idas Gefühl eines Tief&shy;stürzens entsteht.)</p>
      <div class="box"></div>
    </div>
    <div class="grid__item font-ttw vert">
      <p>TEMPO</p>
    </div>
    <div class="grid__item">
      <p>Unter&shy;grund&shy;bahn. Kabel. Kanale.</p>
    </div>
    <div class="grid__item font-ttw vert">
      <p>TEMPO-o-O</p>
    </div>
    <div class="grid__item">
      <p>Unter den Straßen&shy;zügen die ausgebau&shy;ten Kloaken. Lichtglanz auf dem Wasserspiegel.</p>
    </div>
    <div class="grid__item"></div>
    <div class="grid__item"></div>
  </div>
</div>
              
            
!

CSS

              
                // General styles
@import url('https://fonts.googleapis.com/css?family=Arimo|Sorts+Mill+Goudy|Titillium+Web:700');

body {
  font-family: 'Arimo', sans-serif;
  background-image: radial-gradient(#e1e1d5, #ded6c2);
  line-height: 1.1;
  min-width: 60em;
  margin-top: 2em;
}

// Responsive typography
$min-width: 700;
$max-width: 960;
$min-font: 12;
$max-font: 18;

:root {
  font-size: #{$min-font}px;
}

@media (min-width: #{$min-width}px) and (max-width: #{$max-width}px) {
  :root {
    font-size: calc( #{$min-font}px + (#{$max-font} - #{$min-font}) * ( (100vw - #{$min-width}px) / ( #{$max-width} - #{$min-width})));
  }
}

@media (min-width: #{$max-width}px) {
  :root {
    font-size: #{$max-font}px;
  }
}

h1 {
  text-align: center;
  font-size: 200%;
}

.font-smg {
  font-family: 'Sorts Mill Goudy', serif;
}

.font-ttw {
  font-family: 'Titillium Web', sans-serif;
  
  &.vert {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    font-size: 200%;
    letter-spacing: 0.75ch;
  }
  
  &.large {
    font-size: 400%;
    margin: 0 auto;
    width: 1ch;
  }
}

img {
  max-width: 100%;
}

.gear {
  height: 5em;
  width: 5em;
  background-color: #000;
  border-radius: 50%;
  position: relative;

  &::before,
  &::after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    content: '';
  }
  
  &::before {
    height: 3em;
    width: 1em;
    box-shadow: 0em -3em 0em 0em #000, 0em 3em 0 0em #000;
  }
  
  &::after {
    height: 1em;
    width: 3em;
    box-shadow: 3em 0 0em 0em #000, -3em 0 0 0em #000;
  }
}

.inner-gear {
  height: 2em;
  width: 2em;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #e1e1d5;
  
  &::before,
  &::after {
    position: absolute;
    display: block;
    content: '';
  }
  
  &::before {
    height: 3em;
    width: 1em;
    box-shadow: 0em -3em 0em 0em #000, 0em 3em 0 0em #000;
    transform: rotate(45deg);
    transform-origin: (75% 75%);
  }
  
  &::after {
    height: 1em;
    width: 3em;
    box-shadow: 3em 0 0em 0em #000, -3em 0 0 0em #000;
    transform: rotate(45deg);
    transform-origin: (25% 75%);
  }
}

.arrow {
  display: inline-block;
  width: 0.5em;
  height: 65%;
  background-color: #000;
  position: relative;
  margin-bottom: 2.5em;
  
  &::after {
    display: block;
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -1em;
    border-style: solid;
    border-width: 1em 1em 0 1em;
    border-color: #000 transparent transparent transparent;
  }
}

.box {
  height: calc(9vw - 2vmin);
  width: calc(100% + 0.5vmin);
  margin: 1em -0.25vmin 0 -0.25vmin;
  background-color: #000;
}

// Grid styles
.example-wrapper::before {
  content: 'This example requires a browser that supports CSS Grid, like Firefox Nightly. If your browser did support CSS Grid, you would have seen something that resembled the image below, except recreated in HTML and CSS instead.';
  display: inline-block;
  margin-bottom: 1em;
  line-height: 1.5;
}

.example-wrapper::after {
  content: url('https://res.cloudinary.com/huijing/image/upload/c_scale,w_500/Bauhaus_8.jpg');
  display: block;
  text-align: center;
  max-width: 100%;
}

.example-wrapper > * {
  display: none;
}

.example-wrapper {
  padding: 5vmin;
  margin-bottom: 1em;
}

@supports (display: grid) {
  .example-wrapper::before,
  .example-wrapper::after {
    content: none;
  }
  
  .example-wrapper {
    display: block;
    max-width: none;
  }

  .grid {
    display: grid;
    grid-template-columns: 30% 9% 9% 9% 9% 9%;
    justify-content: center;
  }

  .grid__item:nth-child(1) {
    grid-column: span 3;
    justify-self: end;
    border-right: 1em solid;
    padding: 1em;
    text-align: justify;
    text-align-last: justify;

    display: flex;
    justify-content: flex-end;
    align-items: center;

    .content {
      max-width: 12em;
      letter-spacing: 1px;
    }
    
    p:last-of-type {
      margin-bottom: 1em;
    }
  }

  .grid__item:nth-child(2) {
    grid-column: 4 / span 3;
    align-self: end;
    font-size: 200%;
    padding: 0.25em;
  }

  .grid__item:nth-child(3) {
    grid-column: 1 / span 3;
    border-top: 1em solid;
    border-bottom: 1em solid;
    padding: 1em 2em;
    letter-spacing: 1px;
    text-align: justify;

    p:first-child {
      margin-bottom: 1em;
    }
  }

  .grid__item:nth-child(4) {
    grid-column: 4 / span 3;
    border-top: 1em solid;
    border-bottom: 1em solid;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .grid__item:nth-child(5) {
    grid-row: 3 / 5;
    border-right: 1em solid;
    padding: 1em;

    display: flex;
    align-items: flex-start;
    justify-content: flex-end;

    img {
      width: 100%;
      max-width: 20em;
    }
  }

  .grid__item:nth-child(6) {
    writing-mode: vertical-rl;
    border-right: 1em solid;

    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  .grid__item:nth-child(7) {
    padding: 0.5em 0.25em;
    font-size: 85%;
    border-right: 1em solid;
  }

  .grid__item:nth-child(8) {
    border-left: 0.5em solid;

    display: flex;
    justify-content: center;
    align-items: center;
  }

  .grid__item:nth-child(9) {
    letter-spacing: 1px;
    padding: 0.5em 0.25em;
    border-right: 1em solid;
  }

  .grid__item:nth-child(10) {
    grid-row: 3 / 5;
    grid-column: 6;
    justify-self: center;
    align-self: center;
  }

  .grid__item:nth-child(11) {
    grid-column: 2 / 4;
    letter-spacing: 1px;
    padding: 0.5em;
    border-top: 1em solid;
    border-right: 1em solid;
  }

  .grid__item:nth-child(12) {
    border-top: 1em solid;
    border-right: 1em solid;
  }

  .grid__item:nth-child(13) {
    border-top: 1em solid;
    border-right: 1em solid;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console