Skip to content

Instantly share code, notes, and snippets.

@lusan
Created February 5, 2016 12:01
Show Gist options
  • Save lusan/b1dafb38819de15772d8 to your computer and use it in GitHub Desktop.
Save lusan/b1dafb38819de15772d8 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="container">
<h1>The 10 column complex nested grid AG test</h1>
<div class="ag ag1">
<h2>AG 1</h2>
</div>
<!-- /ag1 -->
<!-- ag4 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>
<!-- /container -->
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// Susy (v2.2.7)
// ----
@import "susy";
@import "compass";
/**
* Styles for AG grids & Container
*/
.container {
@include container;
@include clearfix;
background-color: #fbeecb;
}
.ag1, .ag3 {
background-color: #71dad2;
}
.ag4,.ag5,.ag8,.ag9 {
background-color: #ee9e9c;
}
.ag6 {
background-color: #f09671;
}
.ag7 {
background-color: #f6d784;
}
.ag10 {
background-color: #ea9fc3;
}
.ag1 {
@include span(2 of 10);
}
.ag2 {
@include span(6 of 10);
background-color: #fae7b3;
@include clearfix;
}
.ag3 {
@include span(2 of 10 last);
}
.ag4 {
@include span(3 of 6);
}
.ag5 {
@include span(3 of 6 last);
}
.ag6 {
@include span(2 of 6);
}
.ag7 {
@include span(4 of 6 last);
@include clearfix;
}
.ag8 {
@include span(2 of 4);
}
.ag9 {
@include span(2 of 4 last);
}
.ag10 {
@include span(full);
}
/**
* Text Styles
*/
h2 {
text-align: center;
font-size: 1rem;
font-weight: normal;
padding-top: 1.8rem;
padding-bottom: 1.8rem;
}
/**
* Styles for AG grids & Container
*/
.container {
max-width: 100%;
margin-left: auto;
margin-right: auto;
overflow: hidden;
*zoom: 1;
background-color: #fbeecb;
}
.container:after {
content: " ";
display: block;
clear: both;
}
.ag1, .ag3 {
background-color: #71dad2;
}
.ag4, .ag5, .ag8, .ag9 {
background-color: #ee9e9c;
}
.ag6 {
background-color: #f09671;
}
.ag7 {
background-color: #f6d784;
}
.ag10 {
background-color: #ea9fc3;
}
.ag1 {
width: 18.36735%;
float: left;
margin-right: 2.04082%;
}
.ag2 {
width: 59.18367%;
float: left;
margin-right: 2.04082%;
background-color: #fae7b3;
overflow: hidden;
*zoom: 1;
}
.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;
}
.ag6 {
width: 31.03448%;
float: left;
margin-right: 3.44828%;
}
.ag7 {
width: 65.51724%;
float: right;
margin-right: 0;
overflow: hidden;
*zoom: 1;
}
.ag8 {
width: 47.36842%;
float: left;
margin-right: 5.26316%;
}
.ag9 {
width: 47.36842%;
float: right;
margin-right: 0;
}
.ag10 {
width: 100%;
float: left;
margin-left: 0;
margin-right: 0;
}
/**
* Text Styles
*/
h2 {
text-align: center;
font-size: 1rem;
font-weight: normal;
padding-top: 1.8rem;
padding-bottom: 1.8rem;
}
<div class="container">
<h1>The 10 column complex nested grid AG test</h1>
<div class="ag ag1">
<h2>AG 1</h2>
</div>
<!-- /ag1 -->
<!-- ag4 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>
<!-- /container -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment