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="grid">
  <div class="title-image">
    <img src="https://source.unsplash.com/OWsdJ-MllYA/600x600" alt="feature image">
  </div>
  <div class="title">
    <h1>Grid Mag</h1>
  </div>
  <div class="intro">
    <p>
      <strong>Consectetur adipisicing elit. Saepe nostrum sint hic minus repudiandae, dolorum est officiis accusamus. Vel veniam porro quam saepe excepturi, doloremque omnis fugit totam praesentium corrupti.</strong>
    </p>
    <p>
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Alias tempora, blanditiis sapiente magnam, sunt inventore nisi porro minus fugiat ratione sequi commodi! Tenetur, fuga dicta est praesentium cupiditate vero quos!
    </p>
  </div>
  <div class="cover-image">
    <img src="https://source.unsplash.com/OWsdJ-MllYA/1600x900" alt="cover image">
  </div>
  <div class="gallery">
    <div class="gallery-image">
      <img src="https://source.unsplash.com/c-d0Ck6NEXw/600x600" alt="gallery image one">
    </div>
    <div class="gallery-image">
      <img src="https://source.unsplash.com/c-d0Ck6NEXw/600x600" alt="gallery image two">
    </div>
    <div class="gallery-image">
      <img src="https://source.unsplash.com/c-d0Ck6NEXw/600x600" alt="gallery image three">
    </div>
  </div>
  <div class="content">
    <p>
      <strong><span class="drop-cap">L</span>orem ipsum dolor, sit amet consectetur adipisicing elit. Magnam molestiae error harum est quis? Ad dolorem architecto doloremque at minima, quis maxime saepe sapiente dolore voluptatibus, est sed deleniti hic.</strong>
    </p>
    <p>
      Sit amet consectetur adipisicing elit. Nemo blanditiis facilis nesciunt optio debitis autem voluptatum dolores ad voluptatibus iusto minus, consequuntur adipisci explicabo, impedit labore inventore molestiae deleniti. Culpa.
    </p>
    <p>
      Consectetur adipisicing elit. Nemo blanditiis facilis nesciunt optio debitis autem voluptatum dolores ad voluptatibus iusto minus. Inventore animi corporis quidem eos ipsum excepturi. Possimus sed cumque maxime, facilis natus iusto, velit aut provident
      corporis a in, ipsam tempora!
    </p>
  </div>
  <div class="quote-image">
    <img src="https://source.unsplash.com/OWsdJ-MllYA/900x600" alt="quote image">
  </div>
  <blockquote class="quote">
    <p>
      Nulla optio tempora dolorum magnam reiciendis autem delectus vero nam. Eligendi, tempora.
    </p>
  </blockquote>
</div>
              
            
!

CSS

              
                /* Variables */
:root {
    --black: #404040;
    --white: #f9f9f9;
    --orange: rgb(255, 151, 49);
}

/* Misc */
html, body {
    margin: 0;
    font-size: 20px;
    font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
    color: var(--black);
    background-color: var(--white);
}

h2,
h3,
p {
    margin-top: 0;
}

img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.drop-cap {
    float: left;
    font-size: 2.5rem;
    line-height: 1;
    padding: 0.25rem 1rem 0.25rem 0.5rem;
    font-family: Georgia, Times, Times New Roman, serif;
}

/*Grid */
.grid {
    padding: 2rem;
    display: grid;
    grid-gap: 1rem;
    grid-template-rows: repeat(12, 100px);
    grid-template-columns: repeat(12, minmax(100px, 1fr));
}

.title {
    grid-row: 3 / 5;
    grid-column: 3 / 5;
    position: relative;
    color: var(--white);
    display: grid;
    justify-content: center;
    align-content: center;
    background-color: var(--orange);
    border-radius: 50%;
    &::before {
        content: '';
        position: absolute;
        width: 125%;
        height: 125%;
        border: 10px dotted var(--orange);
        border-radius: 50%;
        left: 0;
        top: 0;
        transform: translate(-30%, -30%);
    }
    h1 {
        z-index: 1;
    }
    &-image {
        grid-row: 1 / 4;
        grid-column: 1 / 4;
        overflow: hidden;
        border-radius: 50%;
    }
}

.intro {
    grid-row: 1 / 6;
    grid-column: 5 / 9;
    z-index: 1;
    background-color: var(--white);
    padding: 1rem;
    margin: 1.5rem;
    align-self: center;
}

.cover-image {
    grid-row: 1 / 12;
    grid-column: 6 / 12;
}

.gallery {
    grid-row: 7 / 12;
    grid-column: 7 / 12;
    display: flex;
    grid-gap: 1rem;
    transform: rotate(-45deg);
    background-color: var(--orange);
    overflow: hidden;
    padding: 0.5rem;
    mix-blend-mode: lighten;
    &-image {
        margin: 0.25rem;
        margin: 1rem;
        img {
            transform: rotate(45deg);
            mix-blend-mode: overlay;
        }
    }
}

.content {
    grid-row: 5 / 8;
    grid-column: 2 / 10;
    columns: 2;
    font-size: 0.85rem;
    background-color: var(--white);
    padding: 1rem;
    align-self: center;
}

.quote {
    grid-row: 9 / 12;
    grid-column: 1 / 6;
    font-size: 1.5rem;
    font-weight: bold;
    background-color: var(--orange);
    margin: 0;
    padding: 2.5rem;
    position: relative;
    align-self: end;
    color: var(--white);
    &::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        border: 10px dashed var(--orange);
        transform: translate(2.5rem, -5rem);
        top: 0;
        left: 0;
    }
    &-image {
        grid-row: 8 / 11;
        grid-column: 2 / 7;
        color: var(--white);
        img {
            object-fit: cover;
        }
    }
    p {
        z-index: 1;
        position: relative;
    }
}

              
            
!

JS

              
                
              
            
!
999px

Console