css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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.

            
              <div id="bench-tips">
  <header class="header">
    <h1>Five Tips For a Killer Bench Press</h1>
    <div class="headerDetails">
      <div class="author">
       <div class="avatar"></div>
       <p>Lauren Chilcote</p>
      </div>
      <button id="toggleDarkMode" class="button">Toggle Dark Mode</button>
    </div>
  </header>
  
  <main class="mainContent">
    <section id="mind" class="tip">
      <div class="tipCopy">
        <h2>Mind Over Matter</h2>
        <p><span class="leadText">Approach the bar with confidence, knowing <em>you will crush this</em>.</span> This is the time to harness the power of positive thinking. Hype yourself up and verbalize your goals. Tell yourself, tell friends, write it in your training journal. Don't even <em>think</em> about saying "I'll try". You can, and you will.</p>
      </div>
      <div class="tipImage" data-aos="zoom-in">
      </div>
    </section>
     <section id="breathe" class="tip">
      <div class="tipCopy">
        <h2 data-aos="fade-left">Breathe</h2>
        <p><span class="leadText">Controlled breathing for a controlled lift.</span> As you get set to attempt your lift, don't let the excitement overwhelm you. Practice breathing steadily as you warm up, and make sure you're syncing with the motion of the movement. Inhale at the top and hold it, as you get set to push the bar away from your chest, exhale.</p>
      </div>
      <div class="tipImage" data-aos="fade-right">
      </div>
    </section>
    <section id="brace" class="tip">
      <div class="tipCopy">
        <h2 data-aos="fade-right">Brace</h2>
        <p><span class="leadText">Pin your shoulders back and squeeze your butt.</span> Maintain an active body position from the moment you lay down on the bench. Engage your lats, pinning your shoulder blades back and down, and imagine yourself pulling the bar apart. Activate your glutes and make sure your feet are comfortably nailed into the ground.</p>
      </div>
      <div class="tipImage" data-aos="fade-left">
      </div>
    </section>
    <section id="legs" class="tip">
      <div class="tipCopy">
        <h2 data-aos="fade-left">Use Your Legs</h2>
        <p><span class="leadText">Drive through your feet, using your legs to help push the bar up.</span> The bench press is primarily an upper body movement, but you will get the most out of the lift when you remember to engage your whole body. Wear lifting shoes or stick plates under your feet, if necessary.</p>
      </div>
      <div class="tipImage" data-aos="fade-right">
      </div>
    </section>
    <section id="push" class="tip">
      <div class="tipCopy">
        <h2 data-aos="fade-right">Push Your Body Away</h2>
        <p><span class="leadText">Don't just push the bar up, push your body <em>away</em> from the bar.</span> If 20-time World Record holder <a href="https://www.instagram.com/p/BsDjno2B3bh/" target="_blank">Stefi Cohen</a> says so, it must be true. Similarly to when we pull ourselves <em>under</em> the bar as we're pulling it <em>up</em> during the clean, think about opposing forces during the bench.</p>
      </div>
      <div class="tipImage" data-aos="fade-left">
      </div>
    </section>
  </main>
  
  <footer class="footer">
    <div class="socialLinks">
      <a href="https://github.com/letsbleachthis" target="_blank" class="iconSocial github"></a>
      <a href="https://dribbble.com/LaurenChilcote" target="_blank" class="iconSocial dribbble"></a>
      <a href="https://www.linkedin.com/in/laurenchilcote/" target="_blank" class="iconSocial linkedIn"></a>
      <a href="https://twitter.com/LaurenChilcote" target="_blank" class="iconSocial twitter"></a>
    </div>
  </footer>
</div>
            
          
!
            
              :root {
  --textColor: #ffffff;
  --bgColor: #000000;
  --popColor: #05947F;
  --linkColor: #0083C4;
  --headlineFont: 'Montserrat', sans-serif;
  --bodyFont: 'Inconsolata', monospace;
}

$smallBreakpoint: 500px;
$mediumBreakpoint: 750px;
$largeBreakpoint: 1000px;

@mixin h1Font {
  font-family: var(--headlineFont);
  font-size: 2.5em;
  line-height: 1.25em;
  color: var(--popColor);
  font-weight: 700;
  margin-left: auto;
  margin-right: auto;
}
@mixin h2Font {
  font-family: var(--headlineFont);
  font-size: 1.75em;
  line-height: 1.5em;
  font-weight: 700;
}
@mixin bodyFont {
  font-family: var(--bodyFont);
  font-size: 1.05em;
  line-height: 1.5em;
  font-weight: 400;
  letter-spacing: 0.05em;
}
body {
  background-color: var(--bgColor, #000000);
  color: var(--textColor, #ffffff);
  transition: background-color 0.6s, color 0.6s;
  padding: 1em 3em;
  @include bodyFont;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 250px;
}
body.theme-dark {
  --bgColor: #ffffff;
  --textColor: #000000;
}
//Text Styles
  h1 {
    @include h1Font;
  }
  h2 {
    @include h2Font;
  }
  p {
    @include bodyFont;
  }
  a {
    color: var(--textColor);
    text-decoration: none;
    padding: 2px;
    border-bottom: 2px solid var(--linkColor);
    
    &:hover {
      color: var(--linkColor);
      transition: all 150ms ease-in;
    }
  }
.leadText {
  color: var(--popColor);
  font-weight: 700;
}
//Header
.header {
  text-align: center;
  margin-bottom: 3em;
  
  .headerDetails {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.25em 0.5em;
    border-top: 1px solid grey;
  }
  .author {
    display: flex;
    flex-direction: row;
    align-items: center;
    
    .avatar {
      margin-right: 1em;
      width: 44px;
      height: 44px;
      border-radius: 100%;
      background: url("https://s.cdpn.io/profiles/user/437197/80.jpg?1539700680") no-repeat;
      background-size: cover;
    }
  }
}
//Buttons
.button {
  margin: 1em 0;
  padding: 0.5em 1.1em;
  font-family: var(--bodyFont);
  font-size: 1em;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  border-radius: 2px;
  background: none;
  color: var(--linkColor);
  border: 1px solid var(--linkColor);
  cursor: pointer;
  transition: all 200ms ease-in;
  
  &:hover {
    color: var(--bgColor);
    background: var(--linkColor);
  }
}
//Main Content Styles
.tip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr minmax(15em, 30%);
  grid-column-gap: 5em;
  margin-bottom: 5em;
  .tipCopy {
    grid-column: 1/4;
  }
  .tipImage {
    grid-column: 4/4;
  }
}
//alternate layout of text and images in rows
.tip:nth-of-type(even) {
   grid-template-columns: minmax(15em, 30%) 1fr 1fr 1fr ;
  .tipCopy {
    grid-column: 2/5;
  }
  .tipImage {
    grid-column: 1/1;
    grid-row: 1;
  }
}
//background images
#mind .tipImage {
  background: url("https://previews.dropbox.com/p/thumb/AASu72b_Lq1Vfxqe4xRDhhBXuGBgO7zxMuJ6xgqNWnLXiHsD7_-T6xVc93uWRZLDggEvoAUFyyJMB-QQJYWr66YR5-YzcDCR0a2QSt_cp0OAWnNNM7dzxrn-CelY6p6ngMqBgDGZVypee7wZdskV5tC7vVzSxVXrdFzczbzhhUdC6zDHa6FEUm4e8USBg9Iy0vB76YSxuXx_6FwfLyyRTWar3Onl4MZA8L2K3R-_d4ifDw/p.jpeg?size=2048x1536&size_mode=3") no-repeat;
  background-size: 125%;
  background-position: top 0.5em right 1em;
}
#breathe .tipImage {
  background: url("https://previews.dropbox.com/p/thumb/AAQj6jIVF7Kdq9YCz9xGr1LNluZvBSlQJxoeeHGvYU3jZJznThsQ8rx9CVjsjiG0Kkzuumyatl0rnKsGu2uPchzhIhRfZY89CE3n-rPnd_bNzNNKpp6MaGIV0qGDh9xdO1pSTE3d9IljlegCJPmaN_mbQ6lKH0M8hyDNKCFW0WDggvk2OqhWxFETrMzzDuHwdJzYm_eXcqlyILdduxVms4UOf1FonTqf1-lopxcq0pQCK-01X6LaRa9nt6sRQ-uGTxIRdrTZvctVdIZjXJXTdc_Zo9ESC7pNXKw5d07-3rIdUr_edptnAjKlPSER4Wi_UPg/p.jpeg?size=2048x1536&size_mode=3") no-repeat;
  background-size: 140%;
  background-position: bottom 15% top 0;
}
#brace .tipImage {
  background: url("http://www.castironstrength.com/wp-content/uploads/2015/10/Bench_press-1024x688.jpg") no-repeat;
  background-size: 180%;
  background-position: 15% 15%;
}
#legs .tipImage {
  background: url("https://cdn2.omidoo.com/sites/default/files/imagecache/full_width/images/bydate/201509/shutterstock214624837.jpg") no-repeat;
  background-size: 150%;
  background-position-y: -5em;
}
#push .tipImage {
  background: url("https://mk0barbendl86qlfmi9n.kinstacdn.com/wp-content/uploads/2017/08/IMG_7287-1024x683.jpg") no-repeat;
  background-size: 170%;
}
//Footer
.footer {
  margin: 6em 0 3em;
  text-align: center;
  
  .socialLinks {
    display: flex;
    flex-direction: row;
    justify-content: center;
    
    .iconSocial {
      padding: 0.25em;
      margin: 0 0.5em;
      width: 44px;
      height: 44px;
      border-radius: 100%;
      border: 1px solid var(--linkColor);
      transition: all 150ms ease-in;
      
      &:hover {
        border-color: transparentize(#0083C4, 0.5);
      }
      &.dribbble {
         background: url("https://previews.dropbox.com/p/orig/AAThotKGBtGCe8dzNXdOnbBiA5haAp35CaAE6eguE3I_gE8AGI1_zShpdEE0Vi2VF4TqxexRo5lq_45eNNBwCLn8HxtHuUXJmFO1WKu44l5CgiYYS_LZtn34hywnXJCv_buYB43RpQ_iquBdR2BHpe8PzBxrN5tsvsPU1eOpAtxXRnKh0AGpsswdsKRaDcthk2iZbT_EQjPdsSNtjNruKKYJ/p.svg?size=2048x1536&size_mode=3") no-repeat;
    background-position: center center;
      }
      &.github {
        background: url("https://previews.dropbox.com/p/orig/AAQKSU8Igx5WbCzGn1UmLPy8QY6wNEPwBiXLDjlQm1bFlaclBfdempAxI3oU9YzTTh_wurtjxn_F8SBkF8zVNDK1P3bTZP_xCX7y7zk_4Uri5LyzjzWSwX94E9l2JsS37pLDBC5VPi1VkSdRf7oXDYNh0i6LORekkRSbvMZMsvquWHnmjSwTKb8BiUyVe1JUWe3wBoo-_K0INOce_bdOS8gS/p.svg?size=2048x1536&size_mode=3") no-repeat;
    background-position: center center;
      }
      &.linkedIn {
        background: url("https://previews.dropbox.com/p/orig/AATOYmdQZxdIMIApVgJHLesi3j4OEfFOK5igQiT5jxEws22tSYW4EnBZCeXb5osEndC81fOhLwPxT81-DVTy8-s9FmLtT_kADskxrPOzLsXltZOS1pYA4aeWshYYZrhyVdluaadU14JnN-ondyPtwAj-LJiKcTazYckQ6QRfM57VpMbKSAkADdunAn_We9TTjkSGsTsU7FcIuNUB1r2ZKKKE/p.svg?size=2048x1536&size_mode=3") no-repeat;
    background-position: center center;
      }
      &.twitter {
        background: url("https://previews.dropbox.com/p/orig/AARkRd4CUfbuXjW-2isM7GqiMikeA8K6dDiJqiCBWc58KMAX9PckEJ9-eYu0qFmNII6He_lErS5x2xaaKpEwQNHPx5oyYqCeCDjiolU9ZLUg-vflssOHAs7yGwgPAscZciTUNc7942q4ZIXAUgCZfGJr6VMh2bQl23QiVyv3PG3l9RYSVon5XtYUiQevnhVWDprsvue9A3I6xH9VC_L2l_TE/p.svg?size=2048x1536&size_mode=3") no-repeat;
    background-position: center center;
      }
    }
  }
}
//Media Queries
@media (min-width: $largeBreakpoint) {
  body {
    padding-left: 10em;
    padding-right: 10em;
    font-size: 1.1em;
    line-height: 1.5em;
  }
  //odd rows
  .tip:nth-of-type(odd) .tipCopy {
    grid-column: 1/3;
  }
  .tip:nth-of-type(odd) .tipImage {
    grid-column: 3/5;
  }
  //even rows
  .tip:nth-of-type(even) .tipCopy {
    grid-column: 3/5;
  }
  .tip:nth-of-type(even) .tipImage {
    grid-column: 1/3;
  }
}
@media (max-width: $mediumBreakpoint) {
  body {
    font-size: 1.1em;
    line-height: 1.5em;
  }
  h1 {
    font-size: 2.25em;
    width: 100%;
  }
  //make all images stack on top of text
  .tip:nth-of-type(even), .tip:nth-of-type(odd) {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 0.75fr 1fr;
    margin-bottom: 2em;
    
    .tipCopy {
      grid-column: 1/span 4;
      grid-row: 2;
    }
    .tipImage {
      grid-row: 1;
      grid-column: 1/span 4;
    }
  }
  .footer {
    margin: 3em 0 2em;
  }
 }
@media (max-width: $smallBreakpoint) {
  .header .headerDetails {
    flex-direction: column;
    align-items: center;
  }
}
            
          
!
            
              //initialize AOS transitions
AOS.init({
  duration: 1200,
})

//toggle dark mode theme
const darkModeToggleBtn = document.querySelector('#toggleDarkMode');
darkModeToggleBtn.addEventListener('click', (event) => { 
  
  document.body.classList.toggle('theme-dark');
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console