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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

            
              
<section class="grid-section">
  <p class="chapter">04</p>
  <h2 class="h-italic"><span>Crafted in</span> <span>Scotland...</span></h2>
  <img src="https://images.unsplash.com/photo-1471506480208-91b3a4cc78be?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1353&q=80" alt="" />
  <h2 class="h-color-white">Chosen by riders everywhere</h2>
  <div class="text-content">
    <p>Our bikes were born in Scotland, and varied terrains push the mind and the body into sharp focus. It is there, on the road or off the beaten track, that we discover more about the world and ourselves.</p>
    <p>It is there that we feel at one with all that surround us and experience intensely what it is to feel alive.</p>
    <a href="" class="c-btn">Our story</a>
  </div>
  <div class="tree"></div>
</section>
            
          
!

CSS

            
              /* base styles */

:root {
  --italic-header: 2rem;
}

body {

  max-width:1600px;
  margin:auto;
}

p {
  font-family: roboto-slab,serif;
}

h1,h2,h3,h4 {
  font-family: poppins,sans-serif;
  margin:0;
  text-transform: uppercase;
}

img {
  max-width:100%;
}

.c-btn {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-pack: center;
    justify-content: center;
    background-color: #000;
    padding: 13px;
    min-width: 177px;
    font-family: poppins,sans-serif;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: .84px;
    color:white;
    text-decoration:none;
}

.chapter {
  color: #a3a3a3;
  font-size: 15px;
  font-weight: 700;
  position: relative;
  margin: 0 0 0 56px;
}

.chapter:before {
  content: "";
  width: 50px;
  position: absolute;
  left: -56px;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background-color: #a3a3a3;
}

.h-italic{
    font-size:2rem;
    line-height:1.25;
    text-transform:uppercase;
    font-style:italic;
}

/* LAYOUT THINGS do we support grid? hell yeah!  */

@supports (display: grid) {
  @media screen and (min-width: 320px) {
    
    .grid-section{
        display:grid;
        grid-template-columns: 1rem 1fr 1rem;
        grid-template-rows: 30px var(--italic-header)  60px min-content min-content 100px;
    }
    
    .chapter {
       grid-row:1;
       grid-column:2;
       align-self:center;
    }
    
    .h-italic{
        /* we can have a bigger font now */  
        font-size:var(--italic-header);
        grid-column:2;
        grid-row:3;
        /* make the heading a little grid too for the for/aft positioning */
        display:grid;
        grid-template-columns:25px 1fr 25px;
        grid-template-rows: 1fr 1fr;
    }

    .h-italic span {
      grid-column:1/3;
    }

    .h-italic .h-offset {
      grid-column:2/3;
    }

    .h-italic  {
      grid-column:2/3;
      grid-row:3;
    }
  
    .h-italic {
       grid-row:2/3;
       grid-column:2;
       font-style:initial;
    }
  
    .h-color-white {
      grid-row:4;
      grid-column:1/-1;
      align-self:flex-start;
      justify-self:flex-end;
      text-align:left;
      padding:3rem 2rem;
      width:45%;
      font-style:italic;
      color:white;
      text-transform:uppercase;
      font-size:1.5rem;
      line-height:1.2
    }
  
    .text-content {
       grid-row:5;
       grid-column:2;
       padding: 2rem;
    }
  
    img {
      grid-row:4;
      grid-column:1/-1;
    }
  
    .tree {
      grid-row:4/-1;
      grid-column:1/-1;
      z-index:-1;
      background-color:#D3ECF3;
      background-image: url('https://dev.sixthstory.com/shandcycles/wp-content/themes/sixthstory/assets/images/offroad-icon.svg');
      background-size:60%;
      background-repeat:no-repeat;
      background-position: bottom right;
      padding: 3rem calc(10vw + 100px) 3rem 25px;
    }  
 }
}

/*Full on grid layout for big screens. we got this..   */

@media screen and (min-width: 768px) {
  
  

  .grid-section{
    --italic-header: 3vw;
    display:grid;
    grid-template-columns: 100px 1fr 100px 1fr;
    grid-template-rows: 40px calc(var(--italic-header) - 1px)  1fr 50px;
    padding-top:3rem;
  }
  
  .h-italic {
     font-size:var(--italic-header);
  }

  

  .text-content {
    grid-column:2/4;
    grid-row:3/-1;
    padding: 5rem calc(3rem + 100px) 0 25px;
    padding-bottom:25vw;
  }

  .text-content p {
    max-width:280px;
  }

  .text-content p:last-of-type {
    margin-bottom:3rem;
  }
  
  .h-color-white {
    grid-column:3/-1;
    grid-row:1/4;
    position: relative;
    align-self:center;
    justify-self:center;
    text-align:right;
    font-size: 2.5rem;
    width:75%;
  }

  img {
    grid-column:3/-1;
    grid-row:1/4;
    width:100%;
    height:100%;
    object-fit:cover;
  }

  .tree {
    grid-column:1/4;
    grid-row:3/-1;
  }
  
}
            
          
!

JS

            
              
            
          
!
999px

Console