cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              <section class="grid">

    <article class="item primary">
        <time class="date">12 Jan, 2017</time>
        <h2>Start Exploring the Magic of CSS Grid Layout</h2>
        <p class="description">Grid is an amazing new CSS Specification coming to major browsers in 2017. When it’s ready for use in production, it’s going to drastically change the way we do layout on the web. Currently, there’s...</p>
        <a href="http://bryanlrobinson.com/blog/2017/01/12/simple-grid-examples/" class="button">Read More</a>
    </article>



    <article class="item deep">
        <time class="date">27 Dec, 2016</time>
        <h2>I Converted My Blog to CSS Grid Layout and Regret Nothing</h2>
        <p class="description">With the death of Lella Vignelli last week (Dec. 21, 2016), I read for the first time The Vignelli Canon. The layout of the pages inspired me. I knew that I wanted to give a...</p>
        <a href="http://bryanlrobinson.com/blog/2016/12/27/blog-converted-to-css-grid-layout/" class="button">Read More</a>
    </article>



    <article class="item neutral">
        <time class="date">17 Dec, 2016</time>
        <h2>Feature Queries are on the Rise</h2>
        <p class="description">Since the Web became a more beautiful place with the advent of CSS, there’s always been a struggle in the use of more modern features of CSS with browsers who are either slower to adopt...</p>
        <a href="http://bryanlrobinson.com/blog/2016/12/17/feature-queries-on-the-rise/" class="button">Read More</a>
    </article>



    <article class="item primary">
        <time class="date">09 May, 2016</time>
        <h2>CSS Shapes — Let the Text Flow Around You</h2>
        <p class="description">There’s magic in the air around CSS right now. There’s so much new to be excited about. One simple thing that you should get excited about is the CSS Shapes Module. These are not CSS...</p>
        <a href="http://bryanlrobinson.com/blog/2016/05/09/css-shapes-let-the-text-flow-around-you/" class="button">Read More</a>
    </article>



    <article class="item neutral">
        <time class="date">02 May, 2016</time>
        <h2>Flexbox -- Let's start simple</h2>
        <p class="description">Layout in CSS is hard. We’ve spent the 2 decades since the inception of CSS battling with its idea of how to lay out content on the web. When we moved from table-based layouts to...</p>
        <a href="http://bryanlrobinson.com/blog/2016/05/02/flexbox-lets-start-simple/" class="button">Read More</a>
    </article>



    <article class="item primary">
        <time class="date">28 Apr, 2016</time>
        <h2>Memorializing Prince and Print vs. The Web</h2>
        <p class="description">Layout in CSS is hard. We’ve spent the 2 decades since the inception of CSS battling with its idea of how to lay out content on the web. When we moved from table-based layouts to...</p>
        <a href="http://bryanlrobinson.com/blog/2016/04/28/memorializing-prince-and-print-vs-the-web/" class="button">Read More</a>
    </article>



    <article class="item deep">
        <time class="date">22 Jun, 2015</time>
        <h2>I went to Italy and noticed UX fails</h2>
        <p class="description">Ciao friends! I’m just arriving back in the States from a trip to Italy. I’m not exactly much of a world traveller, but a good time was had. While I enjoyed the majority of what...</p>
        <a href="http://bryanlrobinson.com/blog/2015/06/22/i-went-to-italy-and-noticed-ux-fails/" class="button">Read More</a>
    </article>



    <article class="item neutral">
        <time class="date">31 May, 2015</time>
        <h2>How to Get Designers to Contribute in Open Source</h2>
        <p class="description">I’ve been thinking a decent bit this year about how to get designers involved in Open Source projects. There’s more and more being talked about in this vein, and I don’t plan on rehashing what...</p>
        <a href="http://bryanlrobinson.com/blog/2015/05/31/get-designers-to-contribute-to-open-source/" class="button">Read More</a>
    </article>



    <article class="item primary">
        <time class="date">18 Jan, 2015</time>
        <h2>The True Gift of Your Former Code</h2>
        <p class="description">I’m not in the same league as most developers I have the pleasure of meeting, but I had been pretty proud of the little Django app I put together for my old portfolio site. It...</p>
        <a href="http://bryanlrobinson.com/blog/2015/01/18/the-true-gift-of-your-former-code/" class="button">Read More</a>
    </article>



    <article class="item bright">
        <h2>Interested in More?</h2>
        <a href="http://bryanlrobinson.com/blog" class="button">See All Posts</a>
    </article>

    <article class="item promo bright">
        <h2>I post regular experiments to CodePen</h2>
        <p class="description">If you're interested in the random things I'm working up, I post them to CodePen. Even though, I've got a pro account, I'm really bad at keeping things "private."</p>
        <a href="https://codepen.io/brob/" class="button">See the Pens</a>
    </article>

</section>


            
          
!
            
              $brand: rgba(35, 89, 128, 1);
$brand-accent: rgba(237, 106, 90, 1);
$brand-dark: rgba(4, 42, 43, 1);
$brand-light: rgba(94, 177, 191, 1);
$brand-neutral: rgba(239, 246, 224, 1);
$white: white;
$black: #222222;
$brand-gray: #7f7f7f;
$dark-gray: darken($brand-gray, 25%);
$light-gray: lighten($brand-gray, 40%);

.grid {
    margin: 10px 0;
}

.grid .item {
    box-sizing: border-box;
    margin: 0px 10px 10px;
    padding: 5vw;
    background-color: $brand-light;
}

@media (min-width: 520px) {
    .grid {
        display: flex;
        flex-wrap: wrap;
    }
    .grid .item {
        margin: 0 5px 10px;
        flex: 1 calc(50% - 10px);
    }
}

@media (min-width: 950px) and (max-width: 1228px) {
    .grid .item {
        flex-basis: calc(33% - 10px);
    }
}

@media (min-width: 1228px) {
    .grid .item {
        flex-basis: calc(25% - 10px);
    }
}

@supports (display: grid) {
    @media (min-width: 1100px) {
        .grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
            grid-template-areas: " main   main main    second   third fourth" 
                                  "main   main main    second    fifth fifth" 
                                  "promo  promo promo  promo    promo promo" 
                                  "sixth sixth seventh seventh eighth eighth" 
                                  "sixth sixth seventh seventh ninth  tenth";
            

            //Unindented above for readability
        }
        .grid .item {
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding: 20px;
            
            &:nth-child(1) {
                grid-area: main;
            }
            &:nth-child(2) {
                grid-area: second;
            }
            &:nth-child(3) {
                grid-area: third;
            }
            &:nth-child(4) {
                grid-area: fourth;
            }
            &:nth-child(5) {
                grid-area: fifth;
            }
            &:nth-child(6) {
                grid-area: sixth;
            }
            &:nth-child(7) {
                grid-area: seventh;
            }
            &:nth-child(8) {
                grid-area: eighth;
            }
            &:nth-child(9) {
                grid-area: ninth;
            }
            &:nth-child(10) {
                grid-area: tenth;
            }
            &.promo {
                grid-area: promo;
            }
        }
    }
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console