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

              
                <!-- 
  CSS + empty HTML elements to recreate Chance's latest album artwork.
  
  I saved and cut out the artwork from Twitter, overlayed it on a
  square, and traced it with some positioning, rotates, skew, border
  radius, etc. You could use a lot more pseudo-elements to reduce the
  amount of HTML here but hopefully this is a little easier to read 
  and learn from. Enjoy!

  Turn the $imageOverlay to true in the SCSS to see the images on top.
-->

<div class="column">
  
  <div class="logo">
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/531021/chance.css.jpg" alt="">
  </div>
  
  <div class="item">
    <div class="item__title">I Might Need Security</div>
    <div class="frame">
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/531021/I-Might-Need-Security-artwork.jpg" alt="">
      <div class="security">
        <div class="security__pants"></div>
        <div class="security__hand"></div>
        <div class="security__shirt"></div>
      </div>
    </div>
    <iframe src="https://open.spotify.com/embed/track/3EApebexZ7YqDIqw2EMTDh" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
  </div>
  
  <div class="item">
    <div class="item__title">65th & Ingleside</div>
    <div class="frame">
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/531021/65th-and-ingleside-artwork.jpg" alt="">
      <div class="ingleside">
        <div class="ingleside__accent"></div>
        <div class="ingleside__bill-1"></div>
        <div class="ingleside__bill-2">
          <div class="ingleside__bill-2__face"></div>
        </div>
        <div class="ingleside__pants"></div>
        <div class="ingleside__arm">
          <div class="ingleside__arm__hand"></div>
        </div>
      </div>
    </div>
    <iframe src="https://open.spotify.com/embed/track/5H0NU2sHWUnWCcZyYlX46X" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
  </div>
  
  <div class="item">
    <div class="item__title">Wala Cam</div>
    <div class="frame">
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/531021/wala-cam-artwork.jpg" alt="">
      <div class="wala">
        <div class="wala__ball"></div>
        <div class="wala__bl"></div>
        <div class="wala__br"></div>
        <div class="wala__match"></div>
        <div class="wala__chimney"></div>
        <div class="wala__roof"></div>
        <div class="wala__sunset"></div>
      </div>
    </div>
    <iframe src="https://open.spotify.com/embed/track/2cEnYJKLSZPH7MFSk6C05c" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
  </div>
  
  <div class="item">
    <div class="item__title">Work Out</div>
    <div class="frame">
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/531021/work-out-artwork.jpg" alt="">
      <div class="work">
        <div class="work__wall"></div>
        <div class="work__left"></div>
        <div class="work__right"></div>
        <div class="work__floor"></div>
        <div class="work__door"></div>
      </div>
    </div>
    <iframe src="https://open.spotify.com/embed/track/3PdgIdRXJjgxfOr7slldel" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
  </div>
  
</div>



              
            
!

CSS

              
                $imageOverlay: false;

/* 
  General/Layout Styles
*/

*, *::before, *::after { box-sizing: border-box; }

body {
  min-height: 100vh;
  border: 12px solid #4695ce;
  -webkit-font-smoothing: subpixel-antialiased;
  font-family: 'Averia Serif Libre';
}

.column {
  padding: 100px 40px;
  max-width: 800px;
  margin: 0 auto;
}

.logo {
  margin: 0 auto 80px;
  width: 300px;
  
  img { max-width: 100%; }
}

.item {
  margin-bottom: 120px;
}

.item__title {
  margin-bottom: 20px;
  font-weight: 400;
  font-size: 40px;
  letter-spacing: .02em;
  line-height: 1.5em;
  text-align: center;
  color: #4695ce;
}

iframe {
  margin: 0 auto;
  display: block;
}

/* 
  Album Art
*/

.frame {
  position: relative;
  height: 550px;
  width: 550px;
  margin: 0 auto 50px;
  
  img {
    @if $imageOverlay == false { display: none; }
    position: relative;
    z-index: 10;
    opacity: .5;
  }
}

// 
// I Might Need Security
// 
.security {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #EBEBED;
  
  &::before {
    content: ' ';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 92px;
    width: 100%;
    background-color: #8CC63E;
  }
}

.security__pants {
  position: absolute;
  height: 110%;
  width: 370px;
  width: 100%;
  right: 0;
  bottom: 0;
  background-color: #4695CE;
  transform: skew(5deg, 0deg) translateX(29.2%);
  transform-origin: bottom right;
}

.security__shirt {
  position: absolute;
  height: 36%;
  width: 100%;
  right: 0;
  top: 0;
  background-color: #EABE51;
  transform: skew(5deg, -9deg) translateX(14%);
  transform-origin: top left;
}

.security__hand {
  position: absolute;
  left: 150px;
  top: 120px;
  width: 200px;
  height: 240px;
  border-bottom-right-radius: 100px;
  border-bottom-left-radius: 100px;
  background-color: #B99E81;
  transform: rotate(-9deg);
}

// 
// Work Out
// 
.work {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #F6E5B1;
}

.work__wall {
  position: absolute;
  top: 335px;
  left: 0;
  width: 100%;
  height: 100%;
  transform: skew(0, -16deg);
  transform-origin: top left;
  background-color: #FCB040;
}

.work__left {
  position: absolute;
  top: 0;
  right: 456px;
  width: 100%;
  height: 100%;
  transform: rotate(26deg);
  transform-origin: top right;
  background-color: #EE4037;
}

.work__right {
  position: absolute;
  top: 0;
  left: 339px;
  width: 100%;
  height: 100%;
  transform: rotate(-18deg);
  transform-origin: top left;
  background-color: #EE4037;
}

.work__floor {
  position: absolute;
  top: 404px;
  left: 0;
  width: 100%;
  height: 100%;
  transform: skew(0, 4.5deg);
  transform-origin: bottom left;
  background-color: #FAF591;
}

.work__door {
  position: absolute;
  left: 50%;
  bottom: 110px;
  height: 245px;
  width: 186px;
  border-top-left-radius: 99em;
  border-top-right-radius: 99em;
  border: 20px solid #4695CE;
  border-bottom-width: 125px;
  background-color: #7EC3EC;
  transform: translateX(-50%);
}


// 
// Wala Cam
// 
.wala {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #F6E5B1;
}

.wala__ball {
  position: absolute;
  top: 144px;
  left: 262px;
  width: 226px;
  height: 226px;
  border-radius: 99em;
  background-color: #4EA0D8;
}

.wala__bl {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-width: 233px 245px;
  border-style: solid;
  border-color: transparent transparent #F9F59E #F9F59E;
}

.wala__br {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-width: 222px 212px;
  border-style: solid;
  border-color: transparent #E9EA6A #E9EA6A transparent;
}

.wala__match {
  position: absolute;
  left: 124px;
  bottom: 159px;
  width: 22px;
  height: 298px;
  border-top: solid 37px #F79616;
  background-color: #EE4037;
  transform: rotate(44deg);
  transform-origin: bottom left;
}

.wala__chimney {
  position: absolute;
  top: 386px;
  right: 60px;
  width: 48px;
  height: 100%;
  transform: rotate(13deg) skew(-6deg, 0);
  transform-origin: top right;
  background-color: #ffffff;
}

.wala__roof {
  position: absolute;
  bottom: 0;
  left: 317px;
  height: 153px;
  width: 100%;
  transform: skew(-33deg, 13deg);
  transform-origin: bottom left;
  background-color: #FCB040;
}

.wala__sunset {
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 160px;
  height: 160px;
  border-radius: 99em;
  background-color: #F7941D;
}

// 
// 65th & Ingleside
//

.ingleside {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #F2EF7A;
}

.ingleside__accent {
  position: absolute;
  top: 78px;
  left: 180px;
  height: 0;
  width: 0;
  border-color: #F9F59E #F9F59E transparent transparent;
  border-width: 100px;
  border-style: solid;
  border-radius: 99em;
  transform: rotate(30deg);
  transform-origin: top center;
}

.ingleside__bill-1 {
  position: absolute;
  top: 248px;
  left: 329px;
  width: 100px;
  height: 220px;
  transform: rotate(-25deg);
  transform-origin: top left;
  background-color: #8CC63E;
}

.ingleside__bill-2 {
  position: absolute;
  top: 205px;
  left: 371px;
  width: 113px;
  height: 220px;
  transform: rotate(-25.6deg);
  transform-origin: top left;
  background-color: #3AB549;
}

.ingleside__bill-2__face {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 62px;
  width: 80px;
  border-radius: 90px / 70px;
  transform: translate(-50%, -50%);
  background-color: #8CC63E;
}

.ingleside__pants {
  position: absolute;
  top: 291px;
  width: 100%;
  height: 100%;
  transform: rotate(-30.5deg);
  transform-origin: top right;
  background-color: #EE4037;
}

.ingleside__arm {
  position: absolute;
  right: 236px;
  bottom: 0;
  width: 100%;
  height: 120%;
  transform: rotate(-15deg);
  transform-origin: bottom right;
  background-color: #5CB1C6;
  overflow: hidden;
}

.ingleside__arm__hand {
  position: absolute;
  top: 526px;
  right: 0;
  width: 100%;
  height: 280px;
  transform: rotate(27.2deg);
  transform-origin: bottom right;
  background-color: #F8A16E;
}
              
            
!

JS

              
                
              
            
!
999px

Console