rodericksandoval
5/13/2014 - 1:20 AM

10 column nested grid AG test

10 column nested grid AG test

<div class="container">
  <h1>The 10 column complex nested grid AG test</h1>

  <div class="ag ag1">
    <h2>AG 1</h2>
  </div>
  <!-- /ag1 -->

  <!-- ag3 to ag7 are nested within ag2.-->
  <div class="ag ag2">
    <h2>AG 2</h2>
    <div class="ag ag4">
      <h2>AG 4</h2>
    </div>
    <div class="ag ag5">
      <h2>AG 5</h2>
    </div>
    <div class="ag ag6">
      <h2>AG 6</h2>
    </div>

    <!-- ag8, ag9 and ag10 are nested within ag7 -->
    <div class="ag ag7">
      <h2>AG 7</h2>
      <div class="ag ag8">
        <h2>AG 8</h2>
      </div>
      <div class="ag ag9">
        <h2>AG 9</h2>
      </div>
      <div class="ag ag10">
        <h2>AG 10</h2>
      </div>
    </div>
    <!-- /ag7 -->
  </div>
  <!-- /ag2 -->

  <div class="ag ag3">
    <h2>AG 3</h2>
  </div>
  <!-- /ag3 -->

</div>
  <div class="container">
    <h1>The 10 column complex nested grid AG test</h1>

    <div class="ag ag1">
      <h2>AG 1</h2>
    </div>
    <!-- /ag1 -->

    <!-- ag3 to ag7 are nested within ag2.-->
    <div class="ag ag2">
      <h2>AG 2</h2>
      <div class="ag ag4">
        <h2>AG 4</h2>
      </div>
      <div class="ag ag5">
        <h2>AG 5</h2>
      </div>
      <div class="ag ag6">
        <h2>AG 6</h2>
      </div>

      <!-- ag8, ag9 and ag10 are nested within ag7 -->
      <div class="ag ag7">
        <h2>AG 7</h2>
        <div class="ag ag8">
          <h2>AG 8</h2>
        </div>
        <div class="ag ag9">
          <h2>AG 9</h2>
        </div>
        <div class="ag ag10">
          <h2>AG 10</h2>
        </div>
      </div>
      <!-- /ag7 -->
    </div>
    <!-- /ag2 -->

    <div class="ag ag3">
      <h2>AG 3</h2>
    </div>
    <!-- /ag3 -->

  </div>
html {
  font-size: 100%;
  line-height: 1.375em;
}

*, *:before, *:after {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.container {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  *zoom: 1;
  padding-right: 20px;
  padding-left: 20px;
}
.container:after {
  content: " ";
  display: block;
  clear: both;
}

.ag1 {
  width: 18.36735%;
  float: left;
  margin-right: 2.04082%;
}

.ag1, .ag3 {
  background-color: #71dad2;
}

.ag2 {
  width: 59.18367%;
  float: left;
  margin-right: 2.04082%;
  overflow: hidden;
  *zoom: 1;
  background-color: #fae7b3;
}

.ag3 {
  width: 18.36735%;
  float: right;
  margin-right: 0;
}

.ag4 {
  width: 48.27586%;
  float: left;
  margin-right: 3.44828%;
}

.ag5 {
  width: 48.27586%;
  float: right;
  margin-right: 0;
}

.ag4, .ag5, .ag8, .ag9 {
  background-color: #ee9e9c;
}

.ag6 {
  width: 31.03448%;
  float: left;
  margin-right: 3.44828%;
  background-color: #f09671;
}

.ag7 {
  width: 65.51724%;
  float: right;
  margin-right: 0;
  overflow: hidden;
  *zoom: 1;
  background-color: #f6d784;
}

.ag8 {
  width: 47.36842%;
  float: left;
  margin-right: 5.26316%;
}

.ag9 {
  width: 47.36842%;
  float: right;
  margin-right: 0;
}

.ag10 {
  clear: both;
}

.ag10 {
  background-color: #ea9fc3;
}

h2 {
  font-size: 42px;
  line-height: 66px;
  padding-top: 1.8rem;
  padding-bottom: 1.8rem;
  text-align: center;
  font-weight: normal;
}
// ----
// Sass (v3.3.7)
// Compass (v)
// Breakpoint (v)
// Susy (v)
// ----

// Plugins
@import "susy";
@import "breakpoint";
@import "compass";
@import "compass/css3";

$base-font-size: 16px;
$base-line-height: 22px;
$rhythm-unit: “rem”;

@mixin font-size($font-size){
  font-size: $font-size;
  font-size: ($font-size / $base-font-size)*1rem;
}

@include establish-baseline($base-font-size);


// Configuring Susy Defaults
$susy: (
  columns: 12,
  gutters: 0.25,
  math: fluid,
  global-box-sizing: border-box,
  use-custom: (rem: true)
);

@include border-box-sizing;

// Styles for AG grids & Container

.container {
  @include container;
  @include clearfix;
  // background-color: #fbeecb;
  padding-right: 20px;
  padding-left: 20px;
}

.ag1 {
  @include span(2 of 10);
}

.ag1, .ag3 {
  background-color: #71dad2;
}

.ag2 {
  @include span(6 of 10);
  @include clearfix;
  background-color: #fae7b3;
}

.ag3 {
  @include span(2 of 10 last);
}


.ag4 {
  @include span(3 of 6);
}

.ag5 {
  @include span(3 of 6 last);
}

.ag4,.ag5,.ag8,.ag9 {
  background-color: #ee9e9c;
}

.ag6 {
  @include span(2 of 6);
  background-color: #f09671;
}

.ag7 {
  @include span(4 of 6 last);
  @include clearfix;
  background-color: #f6d784;
}

.ag8 {
  @include span(2 of 4);
}

.ag9 {
  @include span(2 of 4 last);
}

.ag10 {
  clear: both;
}

.ag10 {
  background-color: #ea9fc3;
}


// Text Styles

h2 {
  @include adjust-font-size-to(42px);
  padding-top: 1.8rem;
  padding-bottom: 1.8rem;
  text-align: center;
  font-weight: normal;
}