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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <h1><span>Lorem</span> ipsum dolor sit amet</h1>

<article>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Libero dicta consectetur sequi eveniet iste numquam iusto obcaecati cumque eligendi quod esse quos officiis quo maiores pariatur sed eaque commodi nisi?</p>
  <p>Molestiae delectus enim laboriosam quae sequi consequuntur obcaecati perferendis iste necessitatibus nisi voluptas asperiores error quidem excepturi explicabo ut porro autem esse! Quisquam consequuntur culpa et sunt consequatur quaerat voluptatibus.</p>
  <p>Voluptas provident qui odio soluta architecto necessitatibus similique voluptate. Eius ut eos. Ab qui deserunt inventore vero modi molestiae placeat sunt earum nulla in recusandae perferendis eaque consectetur nobis assumenda.</p>
  <p>Error eius eos odio corporis laudantium ea recusandae excepturi voluptas a obcaecati libero ducimus perspiciatis? Quam temporibus sunt harum porro quia a nam dicta minus iusto ipsum est alias nostrum!</p>
  <p>Nisi fugit modi eius porro ullam omnis perspiciatis a voluptate praesentium necessitatibus laboriosam harum impedit molestias nam eos numquam laudantium iure veritatis dolorum aut totam quisquam placeat asperiores cupiditate illum!</p>
  <p>Nostrum perferendis deserunt illo quis vel beatae nisi possimus eius necessitatibus maxime voluptatum quasi porro laudantium quibusdam consectetur blanditiis temporibus repellendus nam perspiciatis incidunt mollitia tempore dicta omnis soluta voluptatibus!</p>
  <p>Et consequuntur ipsa sed dolor voluptatem cum quas nam temporibus distinctio nemo explicabo exercitationem labore quam repellat repudiandae odit eos provident. Nesciunt sunt odio sequi labore placeat blanditiis itaque magnam.</p>
  <p>Est quis blanditiis cumque cum officiis id minus facilis dolor assumenda vitae ducimus quidem iste voluptatem vel explicabo molestiae consectetur a dicta animi repudiandae culpa perspiciatis corrupti consequuntur eius incidunt?</p>
  <p>Harum repellendus maiores ex blanditiis eveniet ullam tempora quos nobis dolores eaque modi quia dolorum quidem rerum possimus obcaecati quo. Fugit magni asperiores ut quidem animi facilis odit accusamus dolor.</p>
  <p>Voluptatibus blanditiis ducimus itaque distinctio earum voluptatem in totam voluptates sunt qui dolorum at nostrum omnis nihil fugiat quos id temporibus nisi dicta perferendis reprehenderit ipsa sit consectetur! Enim hic?</p>
  <p>Beatae sint magnam facere atque in molestiae iste illum nulla nam aperiam quas tempora quaerat autem enim reiciendis? At debitis iure ab minima quidem alias facilis sit enim nesciunt placeat.</p>
  <p>Ad eveniet quos asperiores laborum doloribus eius quibusdam iste harum exercitationem id repellat natus qui tempore reiciendis quod nobis accusantium dolore beatae enim reprehenderit accusamus corporis sit officiis pariatur aperiam!</p>
  <p>Dolor minima iure voluptate ipsam error repudiandae minus cum tenetur laborum assumenda accusantium incidunt maiores veritatis odit obcaecati blanditiis distinctio iste sunt provident ratione itaque quo deleniti asperiores ad velit.</p>
  <p>Labore itaque quibusdam voluptatum provident rem magnam sed aliquam iusto tenetur repellat velit culpa alias earum dolor sapiente neque quisquam maiores ad praesentium sint quidem autem nam architecto ea quae?</p>
  <p>Obcaecati ad at! Culpa ad neque tempora suscipit fugit odio ea tempore possimus repellendus commodi delectus excepturi consequuntur? Nesciunt dolores temporibus molestias id corrupti placeat possimus in at quae libero!</p>
  <p>Sit ipsam molestias totam culpa itaque eum iste dolorem nisi tempora maxime rerum reiciendis provident eos natus ut doloribus unde esse reprehenderit ipsa architecto quas at saepe consequuntur eaque repudiandae.</p>
</article>

<aside>
<ul>
  <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
  <li>Aliquam tincidunt mauris eu risus.</li>
  <li>Vestibulum auctor dapibus neque.</li>
  <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
  <li>Aliquam tincidunt mauris eu risus.</li>
  <li>Vestibulum auctor dapibus neque.</li>
  <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
  <li>Aliquam tincidunt mauris eu risus.</li>
  <li>Vestibulum auctor dapibus neque.</li>
</ul>  
</aside>

<nav role='navigation'>
  <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">Clients</a></li>
    <li><a href="#">Contact Us</a></li>
  </ul>
</nav>

<footer>
  <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">Clients</a></li>
    <li><a href="#">Contact Us</a></li>
  </ul>
</footer>
              
            
!

CSS

              
                @import "compass/css3";

// Color

$primary: #21B16B; // <<< CHANGE THIS
$secondary: adjust-hue($primary, 180); // << Complementary color scheme



// Layout

$nav-height: 2em;

body {
  padding: $nav-height 10% 0 10%;
  margin: 0 auto;
  max-width: 50em;
  font-family: Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  @media (max-width: 20em) {
    font-size: 12px;
  }
}

a {
  color: darken($primary, 2%); // Link colors
}

ul, li {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 0 10%;
  height: $nav-height;
  background-color: $primary; // Set nav to primary color
  font-family: Helvetica, sans-serif;
  font-weight: 300;
  ul {
    max-width: 50em;
    margin: 0 auto;
  }
  li {
    float: left;
    
    // Secondary color scheme on sidebar
    border-right: 1px solid lighten($primary, 3%);
    &:first-child {
      border-left: 1px solid lighten($primary, 3%)
    }
  }
  a {
    display: inline-block;
    background-color: darken($primary, 2%);
    padding: .5em;
    line-height: 1;
    text-decoration: none;
    @include transition(all .2s);
    
    // Logic to detect lightness of primary color for nav
    @if lightness(darken($primary, 2%)) < 50 {
      color: white;
    } @else {
      color: black;
    }
    &:hover {
      border-bottom: 3px solid lighten($secondary, 20%);
    }
  }
}

h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  line-height: 1;
  margin: 1em 0 .4em 0;
  padding: .4em 0 0 0;
  border-top: 2px solid mix(white, $primary, 90%);
  span {
    padding: .33em 0 0 0;
    border-top: 2px solid mix(white, $primary, 50%);
  }
  @media (min-width: 30em) {
    font-size: 3em;
  }
}

article {
  
}

aside {
  background-color: mix(white, $secondary, 90%);
  overflow: hidden;
  padding: .5em 1em;
  border-top: 2px solid $secondary;
  font-size: .8em;
  margin-top: 3em;
  li {
    border-top: 1px solid white;
    padding: .5em 0;
    &:first-child {
      border: none;
      padding-top: 0;
    }
  }
}

footer {
  clear: both;
  background-color: $primary;
  padding: 1em 1em 2em 1em;
  
  // Logic to detect lightness of primary color for footer
  a {
    @if lightness(darken($primary, 2%)) < 50 {
      color: white;
    } @else {
      color: black;
    }
  }
}

@media (min-width: 40em) {
  article {
    width: 66%;
    float: left;
    padding-right: 1em;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console