Skip to content

Instantly share code, notes, and snippets.

@lucasan
Created March 25, 2014 22:04
Show Gist options
  • Save lucasan/9772438 to your computer and use it in GitHub Desktop.
Save lucasan/9772438 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<html>
<head>
<title>A title</title>
</head>
<body>
<div class="content">
<h1>A heading</h1>
<p>A text</p>
</div>
</body>
</html>
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
//Create a quick grid
/* Number of columns */
$columns: 12;
@for $i from 1 through $columns {
.col-#{$i} {
width: (100% / $columns) * $i;
float: left;
}
}
/* Number of columns */
.col-1 {
width: 8.3333333333%;
float: left;
}
.col-2 {
width: 16.6666666667%;
float: left;
}
.col-3 {
width: 25%;
float: left;
}
.col-4 {
width: 33.3333333333%;
float: left;
}
.col-5 {
width: 41.6666666667%;
float: left;
}
.col-6 {
width: 50%;
float: left;
}
.col-7 {
width: 58.3333333333%;
float: left;
}
.col-8 {
width: 66.6666666667%;
float: left;
}
.col-9 {
width: 75%;
float: left;
}
.col-10 {
width: 83.3333333333%;
float: left;
}
.col-11 {
width: 91.6666666667%;
float: left;
}
.col-12 {
width: 100%;
float: left;
}
<html>
<head>
<title>A title</title>
</head>
<body>
<div class="content">
<h1>A heading</h1>
<p>A text</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment