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 includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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="page-wrap">
  
    <header>
        <h1 class="page-title">Make This Responsive</h1>
        <p class="sub-title">While maintaining the heirarchy of importance</p>
    </header>
  
    <article class="main-story story-1">
        <div class="img"></div>
        <div class="story-intro">
            <h1 class="h2">Most Important Story</h1>
            <p>This article has the most visual weight. <a href="http://nebezial.deviantart.com/art/she-ra-115867096"><em>Image source</em></a>.</p>
        </div>
    </article>
  
    <section class="sub-stories grid">
    
        <article class="sub-story story-2 grid-column">
            <div class="img"></div>
            <div class="story-intro">
                <h2>Less Important Story</h2>
                <p>This story has less visual weight.</p>
            </div>
        </article>
    
        <article class="sub-story story-3 grid-column">
            <div class="img"></div>
            <div class="story-intro">
                <h2>Less Important Story</h2>
                <p>This story has less visual weight.</p>
            </div>
        </article>
    
        <article class="sub-story story-4 grid-column">
            <div class="img"></div>
            <div class="story-intro">
                <h2>Less Important Story</h2>
                <p>This story has less visual weight.</p>
            </div>
        </article>
    
    </section>
  
</div>
              
            
!

CSS

              
                @import "compass/css3";

@import url(https://fonts.googleapis.com/css?family=Lato:300);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300italic,400,700);

$red: #c20a0a;
$white: #fff;
$transparent-white: hsla(0,0%,100%,.85);

* {
    box-sizing: border-box; 
}

/* Normalize */

article,
header,
section {
    display: block;
}
body {
    margin: 0;
}
::-moz-selection {
    background-color: hsla(0,0%,0%,.25);
    color: inherit;
    text-shadow: none;
}
::selection {
    background-color: hsla(0,0%,0%,.25);
    color: inherit;
    text-shadow: none;
}
a:focus {
    outline: thin dotted;
}
a:active,
a:hover {
    outline: 0;
}
img {
    border: 0;
    max-width: 100%;
    vertical-align: top;
}

/* Typography */

html {
    color: $white;
    font-family: 'Open Sans', sans-serif;
    font-size: 100%;
}
h1,
h2 {
    font-family: Lato, 'Open Sans', sans-serif;
    font-weight: 300;
    margin: 0;
    text-shadow: 0 .05em .05em hsla(0,0%,0%,.1);
    text-transform: uppercase;
}
h1 {
    font-size: 3.75em;
    line-height: 1;
    margin-bottom: .5em;
}
.page-title {
    border-bottom: 1px solid transparent;
    color: $white;
    padding-bottom: .5em;
    position: relative;
    text-align: center;
}
.page-title:after {
    background-image: linear-gradient(left, hsla(0,0%,100%,0), hsla(0,0%,100%,.75), hsla(0,0%,100%,0));
    bottom: 0;
    content: '';
    height: 1px;
    left: 25%;
    position: absolute;
    right: 25%;
}
h2,
.h2 {
    border-bottom: 1px solid transparent;
    color: $white;
    font-size: 2.25em;
    line-height: 1.333333333;
    margin: 0 0 0.666em;
    padding: .1em 0 .5em;
    position: relative;
}
h2:after,
.h2:after {
    background-image: linear-gradient(left, hsla(0,0%,100%,.75), hsla(0,0%,100%,0));
    bottom: 0;
    content: '';
    height: 1px;
    left: -1em;
    position: absolute;
    right: 0;
}
.h2:after {
    left: -.65em;
}
.sub-story h2 {
    font-size: 1.5em;
    line-height: 1.5;
    margin-bottom: 1em;
    padding-bottom: .75em;
    padding-top: .25em;
}
p {
    color: $transparent-white;
    font-size: 1em;
    hyphens: auto;
    margin: 0 0 .75em;
    line-height: 1.5;
}
.sub-title {
    color: $transparent-white;
    font-size: 1.25em;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 1px;
    line-height: 1.2;
    margin-bottom: 0;
    text-align: center;
}
p a:link,
p a:visited {
    border-bottom: 1px solid transparent;
    color: $white;
    padding-bottom: 1px;
    text-decoration: none;
    transition: .25s;
}
p a:hover,
p a:focus {
    border-bottom-color: $white;
}
p a:active {
    position: relative;
    top: 1px;
    transition: none;
}

/* Grid */

.grid {
    letter-spacing: -.25em; /* Removes the margin introduced by using inline-block */
    margin-left: -1.25%;
    margin-right: -1.25%;
    max-width: 70em; /* 1120 */
}
.grid-column {   
    letter-spacing: 0;
    margin-left: 1.25%;
    margin-right: 1.25%;
    transition: .25s;
}
@media (min-width: 30em) {
    .grid-column {
        display: inline-block;
        width: 47.25%;
        vertical-align: top;
    }
}
@media (min-width: 45em) {
    .grid-column {
        width: 30.8%;
    }
}

/* Layout */

html,
body {
    overflow-x: hidden;
}
.page-wrap {
    margin: 0 auto;
    max-width: 50em;
    padding-bottom: 3.5em;
}
header {
    margin: 0 -9999em 5.5em;
    padding: 2em 9999em 2.25em;
}
.main-story,
.sub-story {
    margin-bottom: 1.5em;
}
.story-intro {
    padding: .75em 1.5em;
}

/* Styles */

html {
    background-image: url('http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/debut_light.png');
    border-bottom: .5em solid $red;
    box-shadow: inset 0 -.25em 0 hsla(0,0%,0%,.05);
    font-size: 80%;
    min-height: 100%;
    transition: .25s;
}
header {
    background-color: $red;
    background-image: radial-gradient(circle, transparent 40%, hsla(0,0%,100%,.05) 40%, hsla(0,0%,100%,.05) 50%, transparent 50%),
                      radial-gradient(circle, transparent 40%, hsla(0,0%,100%,.05) 40%, hsla(0,0%,100%,.05) 50%, transparent 50%),
                      radial-gradient(circle, transparent 30%, hsla(0,0%,100%,.05) 30%, hsla(0,0%,100%,.05) 50%, transparent 50%);
    background-repeat: no-repeat;
    background-size: 24em 24em,
                     24em 24em,
                     12em 12em;
    background-position: 49.875% -25%,
                         49.845% 75%,
                         49.811% 100%;
    box-shadow: 0 .25em 0 hsla(0,0%,0%,.05);
}
article {
    box-shadow: 0 0 0 .25em hsla(0,0%,0%,.05);
    position: relative;
}
.story-intro {
    background-color: $red;
}
.sub-story .story-intro {
    padding: .75em 1.5em .75em 10.5em;
}

/* Images */

.img {
    background-color: $red;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
    padding-bottom: 90%;
    width: 100%;
}
.main-story .img {
    padding-bottom: 50%;
}
.story-1 .img {
    background-image: url('https://f.cl.ly/items/2e3c2a1Z0D1H3u0W2K12/shera.jpg');
}
.story-2 .img {
    background-image: url('http://placekitten.com/343/341');
}
.story-3 .img {
    background-image: url('http://placecage.com/343/341');
}
.story-4 .img {
    background-image: url('http://placebear.com/343/342');
}
.sub-stories .img {
    bottom: 0;
    float: left;
    left: 0;
    padding-bottom: 0;
    position: absolute;
    top: 0;
    width: 9em;
}

/* Media Queries */

@media (min-width: 30em) {
    html {
        font-size: 90%;
    }
    .sub-story .story-intro {
        padding: .75em 1.5em;
    }
    .sub-stories .img {
        float: none;
        padding-bottom: 90%;
        position: relative;
        width: 100%;
    }
}
@media (min-width: 45em) {
    html {
        font-size: 100%;
    }
}

              
            
!

JS

              
                
              
            
!
999px

Console