css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

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.

              <div class="wrapper">
      <div class="header" data-row>
        <div class="grid grid-1" data-col="4" data-desktop="6" >Hello!</div>
        <div class="grid grid-2" data-col="4" data-desktop="3" >Hello!</div>
        <div class="grid grid-3" data-col="4" data-desktop="3" >Hello!</div>
      <div class="body" data-row >
        <div class="grid grid-1" data-col="1" >Hello!</div>
        <div class="grid grid-2" data-col="1" >Hello!</div>
        <div class="grid grid-3" data-col="1" >Hello!</div>
        <div class="grid grid-4" data-col="1" >Hello!</div>
        <div class="grid grid-5" data-col="1" >Hello!</div>
        <div class="grid grid-6" data-col="1" >Hello!</div>
        <div class="grid grid-7" data-col="1" >Hello!</div>
        <div class="grid grid-8" data-col="1" >Hello!</div>
        <div class="grid grid-9" data-col="1" >Hello!</div>
        <div class="grid grid-10" data-col="1" >Hello!</div>
        <div class="grid grid-11" data-col="1" >Hello!</div>
        <div class="grid grid-12" data-col="1" >Hello!</div>

      <div class="body-row" data-row>
        <div class="grid grid-1" data-col="6" >

          <div class="nesting" data-nested="6">

            <div class="nest-grid-1 grid" data-col="3" >Nested Hello!</div>

            <div class="nest-grid-2 grid" data-col="3" >Nested Hello!</div>

          </div> <!-- end .nesting -->

        </div> <!-- end .grid-1 -->

        <div class="grid grid-2" data-col="6" >Hello!</div>
      </div> <!-- end .body-row -->

      <div class="body-row-3" data-row>
        <div class="grid grid-1" data-col="6" data-offset="3" >Hello!</div>

      <div class="body-row-4" data-row>
        <div class="grid grid-1" data-col="3" >Hello!</div>
        <div class="grid grid-2" data-col="3" >Hello!</div>
        <div class="grid grid-3" data-col="3" >Hello!</div>
        <div class="grid grid-4" data-col="3" >Hello!</div>
              //responsive breakpoint function

@mixin breakpoint($point) {

    @if $point == tablet {
    @media (min-width: 550px) { @content; }

  @else if $point == large {
    @media (min-width: 1170px) { @content; }

  @else if $point == small {
    @media (max-width: 549px)  { @content; }

 //  Usage --
 //.wrap {
 // width: 75%;
 // @include breakpoint(large) { width: 65%; }
 // @include breakpoint(medium) { width: 85%; }

$font-size: 16px;
@function em($target, $context: $font_size) {
   @return ($target / $context) * 1em;

 @function rem($target, $context: $font_size) {
   @return ($target / $context) * 1rem;

// Grid Configuration --
$max-width: 940px;

// Auto Clear Fload Mixin

@mixin clearfix { 
  zoom: 1;
  &:before, &:after { content: ""; display: table; }
  &:after { clear: both; }

@function columns($columns, $container-columns: $maximum-columns) {
  $width: $columns * $column-width + ($columns - 1) * $gutter-width;
  $container-width: $container-columns * $column-width + ($container-columns - 1) * $gutter-width;
  @return percentage($width / $container-width);

@function gutter($container-columns: $maximum-columns, $gutter: $gutter-width) {
  $container-width: $container-columns * $column-width + ($container-columns - 1) * $gutter-width;
  @return percentage($gutter / $container-width);

// row mixin includes clearfix hack, last-child margin fix and any global row styles ============= /
@mixin row {
  width: 90%;
  height: 100%;
  margin: 0 auto;
  @include clearfix;
  @include nesting;

// target nested elements with grid styles. use in global styles as well as row mixin ============ /
@mixin nesting {
  padding: 0; 

  & > div { 
    float: left;
    margin-right: gutter();
    box-sizing: border-box;

// calculate offset amounts for offset columns =================================================== /
@function offset-columns($columns) {
  $margin: $columns * $column-width + $columns * $gutter-width;
  @return $margin;

@mixin offset($from-direction, $columns) {
  @if $from-direction == left {
    float: left;
    margin-left: offset-columns($columns);
  @if $from-direction == right {
    float: right;
    margin-right: offset-columns($columns);

// remove margin-right from last element in a row or container so all columns fit ================ /
@mixin last {
  margin-right: 0;
  float: right; // fixes poor alignment with right edge caused by percentage calculations
@for $i from 1 through $maximum-columns{


  div[data-row] > [data-col="#{$i}"]{
          @include breakpoint(small) {
            float: none;
            margin-right: 0;
          @include breakpoint(tablet) { width: columns($i); };
  div[data-row] > div[data-desktop="#{$i}"]{

          @include breakpoint(large) {
            width: columns($i);
  div[data-row] > [data-offset="#{$i}"]{
          @include breakpoint(tablet) { @include offset('left', $i); };
  div[data-row] > [data-offset-right="#{$i}"]{ 
          @include breakpoint(tablet) { @include offset('right', $i); };


div[data-row] > div:last-child{
  margin-right: 0;
div[data-row]{ @include row; }

@for $i from 1 through $maximum-columns{
    div[data-nested="#{$i}"] {
      @include row;
      width: 100% !important;
      @for $j from 1 through $maximum-columns{
          & > [data-col="#{$j}"]{
            @include breakpoint(small) {
              float: none;
              margin-right: 0;
            @include breakpoint(tablet) { width: columns($j,$i); };

 //Absoulute position shorthand Usage--@include abs-pos(10px,5px,10px,20px)
@mixin abs-pos ($top: auto, $right: auto, $bottom: auto, $left: auto) {
  top: $top;
  right: $right;
  bottom: $bottom;
  left: $left;
  position: absolute;

  margin: 0 auto

	font-family: verdana;
	font-size: 10px;

	background-color: #eee;

.wrapper > div{
	margin-top: 15px;

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................