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="row">
  <div class="large-3 columns">
    <div class="box">Test</div>
  </div>
  <div class="large-9 columns">
    <div class="box">Test</div>
  </div>
</div>

<!-- First Band (Image) -->

<div class="row">
  <div class="large-12 columns">
    <div class="box">Test</div>
  </div>
</div>

<!-- Second Band (Image Left with Text) -->

<div class="row">
  <div class="large-4 columns">
    <div class="box">Test</div>
  </div>
  <div class="large-8 columns">
    <div class="box">Test</div>
  </div>
</div>

<!-- Third Band (Image Right with Text) -->

<div class="row">
  <div class="large-8 columns">
    <div class="box">Test</div>
  </div>
  <div class="large-4 columns">
    <div class="box">Test</div>
  </div>
</div>

<!-- Footer -->

<footer class="row">
  <div class="large-12 columns">
    <div class="row">
      <div class="large-6 columns">
        <div class="box">Test</div>
      </div>
      <div class="large-6 columns">
        <div class="box">Test</div>
      </div>
    </div>
  </div>
</footer>
            
          
!
            
              @import "compass/css3";

@import url(https://fonts.googleapis.com/css?family=Lato|Open+Sans);

@import url(http://weloveiconfonts.com/api/?family=entypo);

[class*="entypo-"]:before {
  font-family: 'entypo', sans-serif;
}

*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
  
  font-family: 'Open Sans', 'sans-serif';
}

body {
  background: #456789;
}

ul {list-style: none;}

h1,h2,h3,h4,h5,h6 {
  margin: 0;
  padding: 0;
}

.cf:before,
.cf:after {
    content: " ";
    display: table;
}

.cf:after {
    clear: both;
}





/*Zurb Grid*/
//
// @functions
//

$rem-base: 16px !default;

$modules: () !default;
@mixin exports($name) {
  @if (index($modules, $name) == false) {
    $modules: append($modules, $name);
    @content;
  }
}

@function lower-bound($range){
  @if length($range) <= 0 {
    @return 0;
  }
  @return nth($range,1);
}

@function upper-bound($range) {
  @if length($range) < 2 {
    @return 999999999999;
  }
  @return nth($range, 2);
}

@function strip-unit($num) {
  @return $num / ($num * 0 + 1);
}

@function convert-to-rem($value, $base-value: $rem-base)  {
  $value: strip-unit($value) / strip-unit($base-value) * 1rem;
  @if ($value == 0rem) { $value: 0; } // Turn 0rem into 0
  @return $value;
}

@function rem-calc($values, $base-value: $rem-base) {
  $max: length($values);

  @if $max == 1 { @return convert-to-rem(nth($values, 1), $base-value); }

  $remValues: ();
  @for $i from 1 through $max {
    $remValues: append($remValues, convert-to-rem(nth($values, $i), $base-value));
  }
  @return $remValues;
}


//
// @variables
//

$row-width: rem-calc(1000) !default;
$column-gutter: rem-calc(30) !default;
$total-columns: 12 !default;


    $text-direction: ltr !default;
    $default-float: left !default;
    $opposite-direction: right !default;

    @if $text-direction == ltr {
      $default-float: left;
      $opposite-direction: right;
    } @else {
      $default-float: right;
      $opposite-direction: left;
    }

    // Media Query Ranges
    $small-range: (0em, 40em) !default;
    $medium-range: (40.063em, 64em) !default;
    $large-range: (64.063em, 90em) !default;
    $xlarge-range: (90.063em, 120em) !default;
    $xxlarge-range: (120.063em) !default;

    $screen: "only screen" !default;

    $landscape: "#{$screen} and (orientation: landscape)" !default;
    $portrait: "#{$screen} and (orientation: portrait)" !default;

    $small-up: $screen !default;
    $small-only: "#{$screen} and (max-width: #{upper-bound($small-range)})" !default;

    $medium-up: "#{$screen} and (min-width:#{lower-bound($medium-range)})" !default;
    $medium-only: "#{$screen} and (min-width:#{lower-bound($medium-range)}) and (max-width:#{upper-bound($medium-range)})" !default;

    $large-up: "#{$screen} and (min-width:#{lower-bound($large-range)})" !default;
    $large-only: "#{$screen} and (min-width:#{lower-bound($large-range)}) and (max-width:#{upper-bound($large-range)})" !default;

    $xlarge-up: "#{$screen} and (min-width:#{lower-bound($xlarge-range)})" !default;
    $xlarge-only: "#{$screen} and (min-width:#{lower-bound($xlarge-range)}) and (max-width:#{upper-bound($xlarge-range)})" !default;

    $xxlarge-up: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)})" !default;
    $xxlarge-only: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)}) and (max-width:#{upper-bound($xxlarge-range)})" !default;

//
// Grid Functions
//

// @FUNCTION
// $colNumber - Found in settings file
// $totalColumns - Found in settings file
@function grid-calc($colNumber, $totalColumns) {
  @return percentage(($colNumber / $totalColumns));
}

//
// @mixins
//

@mixin box-sizing($type:border-box) {
  -moz-box-sizing: $type;
  -webkit-box-sizing: $type;
  box-sizing: $type;
}

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

  /*
  Some basic resets, fixes and useful styles
  */

    *,
    *:before,
    *:after {
      @include box-sizing(border-box);
    }

    img,
    object,
    embed { max-width: 100%; height: auto; }

    object,
    embed { height: 100%; }
    img { -ms-interpolation-mode: bicubic; }
    .clearfix     { @include clearfix; }
    .hide         { display: none; }

    img {
      display: inline-block;
      vertical-align: middle;
    }

// For creating container, nested, and collapsed rows.
//
//
// $behavior - Any special beavior for this row? Default: false. Options: nest, collapse, nest-collapse, false.
@mixin grid-row($behavior: false) {

  // use @include grid-row(nest); to include a nested row
  @if $behavior == nest {
    width: auto;
    margin-#{$default-float}: -($column-gutter/2);
    margin-#{$opposite-direction}: -($column-gutter/2);
    margin-top: 0;
    margin-bottom: 0;
    max-width: none;
  }

  // use @include grid-row(collapse); to collapsed a container row margins
  @else if $behavior == collapse {
    width: 100%;
    margin: 0;
    max-width: $row-width;
  }

  // use @include grid-row(nest-collapse); to collapse outer margins on a nested row
  @else if $behavior == nest-collapse {
    width: auto;
    margin: 0;
    max-width: none;
  }

  // use @include grid-row; to use a container row
  @else {
    width: 100%;
    margin-#{$default-float}: auto;
    margin-#{$opposite-direction}: auto;
    margin-top: 5px;
    margin-bottom: 5px;
    max-width: $row-width;
  }

  // Clearfix for all rows
  @include clearfix();
}

// Creates a column, should be used inside of a media query to control layouts
//
// $columns - The number of columns this should be
// $last-column - Is this the last column? Default: false.
// $center - Center these columns? Default: false.
// $offset - # of columns to offset. Default: false.
// $push - # of columns to push. Default: false.
// $pull - # of columns to pull. Default: false.
// $collapse - Get rid of gutter padding on column? Default: false.
// $float - Should this float? Default: true. Options: true, false, left, right.
@mixin grid-column(
  $columns:false,
  $last-column:false,
  $center:false,
  $offset:false,
  $push:false,
  $pull:false,
  $collapse:false,
  $float:true) {

  position: relative;

  // If collapsed, get rid of gutter padding
  @if $collapse {
    padding-left: 0;
    padding-right: 0;
  }

  // Gutter padding whenever a column isn't set to collapse
  // (use $collapse:null to do nothing)
  @else if $collapse == false {
    padding-left: $column-gutter / 2;
    padding-right: $column-gutter / 2;
  }

  // If a column number is given, calculate width
  @if $columns {
    width: grid-calc($columns, $total-columns);

    // If last column, float naturally instead of to the right
    @if $last-column { float: $opposite-direction; }
  }

  // Source Ordering, adds left/right depending on which you use.
  @if $push { #{$default-float}: grid-calc($push, $total-columns); #{$opposite-direction}: auto; }
  @if $pull { #{$opposite-direction}: grid-calc($pull, $total-columns); #{$default-float}: auto; }

  // If centered, get rid of float and add appropriate margins
  @if $center {
    margin-#{$default-float}: auto;
    margin-#{$opposite-direction}: auto;
    float: none;
  }

  // If offset, calculate appropriate margins
  @if $offset { margin-#{$default-float}: grid-calc($offset, $total-columns) !important; }

  @if $float {
    @if $float == left or $float == true { float: $default-float; }
    @else if $float == right { float: $opposite-direction; }
    @else { float: none; }
  }

}

// Create presentational classes for grid
//
// $size - Name of class to use, i.e. "large" will generate .large-1, .large-2, etc.
@mixin grid-html-classes($size) {

  .column.#{$size}-centered,
  .columns.#{$size}-centered { @include grid-column($center:true, $collapse:null, $float:false); }

  .column.#{$size}-uncentered,
  .columns.#{$size}-uncentered {
    margin-#{$default-float}: 0;
    margin-#{$opposite-direction}: 0;
    float: $default-float;
  }

  .column.#{$size}-uncentered.opposite,
  .columns.#{$size}-uncentered.opposite {
    float: $opposite-direction;
  }

  @for $i from 1 through $total-columns - 1 {
    .#{$size}-push#{-$i} {
      @include grid-column($push:$i, $collapse:null, $float:false);
    }
    .#{$size}-pull#{-$i} {
      @include grid-column($pull:$i, $collapse:null, $float:false);
    }
  }

  .column,
  .columns { @include grid-column($columns:false); }


  @for $i from 1 through $total-columns {
    .#{$size}#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
  }

  [class*="column"] + [class*="column"]:last-child { float: $opposite-direction; }
  [class*="column"] + [class*="column"].end { float: $default-float; }


  @for $i from 0 through $total-columns - 2 {
    .#{$size}-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
  }
  .column.#{$size}-reset-order,
  .columns.#{$size}-reset-order {
    margin-#{$default-float}: 0;
    margin-#{$opposite-direction}: 0;
    left: auto;
    right: auto;
    float: $default-float;
  }
}

@include exports("grid") {
    .row {
      @include grid-row;

      &.collapse {
         > .column,
         > .columns { @include grid-column($collapse:true); }

        .row {margin-left:0; margin-right:0;}
      }

      .row { @include grid-row($behavior:nest);
        &.collapse { @include grid-row($behavior:nest-collapse); }
      }
    }

    .column,
    .columns { @include grid-column($columns:$total-columns); }

    @media #{$small-up} {
      @include grid-html-classes($size:small);
    }

    @media #{$medium-up} {
      @include grid-html-classes($size:medium);
      // Old push and pull classes
      @for $i from 1 through $total-columns - 1 {
        .push#{-$i} {
          @include grid-column($push:$i, $collapse:null, $float:false);
        }
        .pull#{-$i} {
          @include grid-column($pull:$i, $collapse:null, $float:false);
        }
      }
    }
    @media #{$large-up} {
      @include grid-html-classes($size:large);
      @for $i from 1 through $total-columns - 1 {
        .push#{-$i} {
          @include grid-column($push:$i, $collapse:null, $float:false);
        }
        .pull#{-$i} {
          @include grid-column($pull:$i, $collapse:null, $float:false);
        }
      }
    }
}

.box {
  background: #ccc;
  height: 45px;
}
            
          
!
999px
🕑 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 ..................

Console