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

              
                  <div class="container">
  <section class="bauhaus">
    <!-- Main background creation -->
    <div class="orange first-column"></div>
    <div class="gray second-column"></div>
    <div class="orange third-column"></div>
    <div class="gray first-row"></div>
    <div class="orange second-row"></div>
    <div class="gray third-row"></div>
    <div class="orange fourth-row"></div>
    <div class="gray fifth-row"></div>
    <div class="orange sixth-row"></div>
    <div class="gray seventh-row"></div>
    <div class="orange eighth-row"></div>
    <!-- End Main background creation -->
    <div class="black black-one"></div>
    <div class="black black-two"></div>
    <div class="black black-three"></div>
    <div class="black black-four"></div>
    <div class="black black-five"></div>
    <div class="black black-six"></div>
    <div class="black black-seven"></div>
    <div class="black black-eight"></div>
    <div class="black black-moon-one"></div>
    <div class="black black-moon-two"></div>
    <div class="black black-moon-three"></div>
    <div class="black black-moon-four"></div>
    <div class="black black-moon-five"></div>
    <div class="text-functional row-text">Functionality</div>
    <div class="text-rational row-text">Rationality</div>
    <div class="text-design row-text">Design</div>

    <div class="text-bauhaus rotated-text">
      <span>Bauhaus</span>
    </div>
    <div class="text-weimar rotated-text">
      <span>Weimar, Germany 1919-1933</span>
    </div>
    <div class="text-walter rotated-text">
      <span>Walter Gropius,<br>founder</span>
    </div>
    <div class="text-art">art</div>
  </section>    
</div>

              
            
!

CSS

              
                @font-face {font-family: "Bauhaus 93";
    src: url("https://db.onlinewebfonts.com/t/89d11a443c316da80dcb8f5e1f63c86e.eot");
    src: url("https://db.onlinewebfonts.com/t/89d11a443c316da80dcb8f5e1f63c86e.eot?#iefix") format("embedded-opentype"),
    url("https://db.onlinewebfonts.com/t/89d11a443c316da80dcb8f5e1f63c86e.woff2") format("woff2"),
    url("https://db.onlinewebfonts.com/t/89d11a443c316da80dcb8f5e1f63c86e.woff") format("woff"),
    url("https://db.onlinewebfonts.com/t/89d11a443c316da80dcb8f5e1f63c86e.ttf") format("truetype"),
    url("https://db.onlinewebfonts.com/t/89d11a443c316da80dcb8f5e1f63c86e.svg#Bauhaus 93") format("svg");
}

:root {
  --black: #000;
  --gray: #675c57;
  --orange: #fb8e00;
}

body {
  font-family: "BauHaus 93";
}

.container {
  box-shadow: 0 0 2rem -.5rem rgba(0, 0, 0, .9);
  height: 43rem;
  margin: 3rem auto;
  overflow: hidden;
  position: relative;
  width: 30rem;
}

.bauhaus {
  display: grid;
  grid-template-rows: 
    10.5rem 6rem 6rem 6rem 6rem 6rem 6rem 7.5rem;
  grid-template-columns:
    8.75rem 6rem 6rem 5.5rem 5rem .25rem
    2.5rem 2rem 1.5rem 6rem;
  transform: 
    rotate(-20deg) 
    translateY(-5.5rem) 
    translateX(-5rem)
    skewY(-3deg);
  transform-origin: center;
}

.black { background-color: var(--black); }
.orange { background-color: var(--orange); }
.gray { background-color: var(--gray); }

.first-column { grid-area: 1/1/9/2; }
.second-column { grid-area: 1/2/9/3; }
.third-column { grid-area: 1/3/8/4; }
.first-row { grid-area: 1/4/2/11; }
.second-row { grid-area: 2/4/3/11; }
.third-row { grid-area: 3/4/4/11; }
.fourth-row { grid-area: 4/4/5/11; }
.fifth-row { grid-area: 5/4/6/11; }
.sixth-row { grid-area: 6/4/7/11; }
.seventh-row { grid-area: 7/4/8/11; }
.eighth-row { grid-area: 8/5/9/11; }

.black-one { grid-area: 1/3/2/4; }
.black-two { grid-area: 4/3/6/4; }
.black-three { grid-area: 8/3/9/5; }
.black-four { grid-area: 7/5/8/6; }
.black-five { grid-area: 1/6/2/8; }
.black-six { grid-area: 3/5/4/6; }
.black-seven { grid-area: 3/9/4/10; }
.black-eight { grid-area: 5/7/5/8; }

.black-moon-one {
  grid-area: 2/3/3/5;
  border-radius: 0 0 6rem 6rem;
}
.black-moon-two {
  grid-area: 3/3/4/4;
  border-radius: 6rem 0 0;
}
.black-moon-three {
  grid-area: 4/4/5/5;
  border-radius: 0 0 6rem;
}
.black-moon-four {
  grid-area: 6/3/7/5;
  border-radius: 0 0 6rem 6rem;
}
.black-moon-five {
  grid-area: 7/3/8/4;
  border-radius: 6rem 0 0;
}

.row-text {
  align-self: end;
  font-size: 1.68rem;
  text-transform: uppercase;
  transform: translateY(.45rem);  
}
.text-functional {
  grid-area: 2/5/3/7;
}
.text-rational {
  grid-area: 4/5/5/7;
}
.text-design {
  font-size: 1.63rem;
  grid-area: 6/5/7/7;
}

.rotated-text {
  align-self: center;
  font-size: 1.3rem;
  justify-self: center;
  color: var(--black);
  span {
    display: inline-block;
    transform: rotate(90deg);    
    transform-origin: center;
    white-space: nowrap;
  }

}

.text-bauhaus {
  font-size: 6rem;
  grid-area: 3/2/7/3;
  text-transform: uppercase;
  transform: translateX(1rem);
  color: var(--orange);
}
.text-weimar {
  grid-area: 3/2/7/3;
  transform: translateX(-2rem) translateY(4.1rem);
  letter-spacing: .13rem;
}
.text-walter {
  grid-area: 5/1/7/2;
  transform: translateX(2.5rem) translateY(2.5rem);
  letter-spacing: .13rem;
  span {
    text-align: right;
  }
}

.text-art {
  align-self: start;
  font-size: 2.5rem;
  grid-area: 7/2/8/3;
  justify-self: end;
  text-transform: uppercase;
  transform: translateY(-.4rem);
  color: var(--orange);
}

              
            
!

JS

              
                const rows = [
  168,
  96,
  96,
  96,
  96,
  96,
  96,
  120,
]

const cols = [
  138,
  96,
  96, 
  88,
  80,
  4,
  40,
  32,
  24,
  96
]
              
            
!
999px

Console