Skip to content

Instantly share code, notes, and snippets.

@sgregson
Created August 4, 2015 19:47
Show Gist options
  • Save sgregson/8017fc4226de6af266e8 to your computer and use it in GitHub Desktop.
Save sgregson/8017fc4226de6af266e8 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
//
$grid-columns: 12;
//** Padding between columns. Gets divided in half for the left and right.
$grid-gutter-width: 16px;
///////////////////////
//== Media queries breakpoints
//
//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
// Extra small screen / phone
//** Deprecated `$screen-xs` as of v3.0.1
$screen-xs: 480px !default;
//** Deprecated `$screen-xs-min` as of v3.2.0
$screen-xs-min: $screen-xs !default;
//** Deprecated `$screen-phone` as of v3.0.1
$screen-phone: $screen-xs-min !default;
// Small screen / tablet
//** Deprecated `$screen-sm` as of v3.0.1
$screen-sm: 768px !default;
$screen-sm-min: $screen-sm !default;
//** Deprecated `$screen-tablet` as of v3.0.1
$screen-tablet: $screen-sm-min !default;
// Medium screen / desktop
//** Deprecated `$screen-md` as of v3.0.1
$screen-md: 992px !default;
$screen-md-min: $screen-md !default;
//** Deprecated `$screen-desktop` as of v3.0.1
$screen-desktop: $screen-md-min !default;
// Large screen / wide desktop
//** Deprecated `$screen-lg` as of v3.0.1
$screen-lg: 1200px !default;
$screen-lg-min: $screen-lg !default;
//** Deprecated `$screen-lg-desktop` as of v3.0.1
$screen-lg-desktop: $screen-lg-min !default;
// So media queries don't overlap when required, provide a maximum
$screen-xs-max: ($screen-sm-min - 1) !default;
$screen-sm-max: ($screen-md-min - 1) !default;
$screen-md-max: ($screen-lg-min - 1) !default;
//== Grid system
//
//## Define your custom responsive grid.
//** Number of columns in the grid.
$grid-columns: 12 !default;
//** Padding between columns. Gets divided in half for the left and right.
$grid-gutter-width: 30px !default;
// Navbar collapse
//** Point at which the navbar becomes uncollapsed.
$grid-float-breakpoint: $screen-sm-min !default;
//** Point at which the navbar begins collapsing.
$grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default;
//== Container sizes
//
//## Define the maximum width of `.container` for different screen sizes.
// Small screen / tablet
$container-tablet: (720px + $grid-gutter-width) !default;
//** For `$screen-sm-min` and up.
$container-sm: $container-tablet !default;
// Medium screen / desktop
$container-desktop: (940px + $grid-gutter-width) !default;
//** For `$screen-md-min` and up.
$container-md: $container-desktop !default;
// Large screen / wide desktop
$container-large-desktop: (1140px + $grid-gutter-width) !default;
//** For `$screen-lg-min` and up.
$container-lg: $container-large-desktop !default;
/*-----*/
// Clearfix
//
// For modern browsers
// 1. The space content is one way to avoid an Opera bug when the
// contenteditable attribute is included anywhere else in the document.
// Otherwise it causes space to appear at the top and bottom of elements
// that are clearfixed.
// 2. The use of `table` rather than `block` is only necessary if using
// `:before` to contain the top-margins of child elements.
//
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
@mixin clearfix() {
&:before,
&:after {
content: " "; // 1
display: table; // 2
}
&:after {
clear: both;
}
}
/*-----*/
// Framework grid generation
//
// Used only by Bootstrap to generate the correct number of grid classes given
// any value of `$grid-columns`.
// [converter] This is defined recursively in LESS, but Sass supports real loops
@mixin make-grid-columns($i: 1, $list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}") {
@for $i from (1 + 1) through $grid-columns {
$list: "#{$list}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
}
#{$list} {
position: relative;
// Prevent columns from collapsing when empty
min-height: 1px;
// Inner gutter via padding
padding-left: ceil(($grid-gutter-width / 2));
padding-right: floor(($grid-gutter-width / 2));
}
}
// [converter] This is defined recursively in LESS, but Sass supports real loops
@mixin float-grid-columns($class, $i: 1, $list: ".col-#{$class}-#{$i}") {
@for $i from (1 + 1) through $grid-columns {
$list: "#{$list}, .col-#{$class}-#{$i}";
}
#{$list} {
float: left;
}
}
@mixin calc-grid-column($index, $class, $type) {
@if ($type == width) and ($index > 0) {
.col-#{$class}-#{$index} {
width: percentage(($index / $grid-columns));
}
}
@if ($type == push) and ($index > 0) {
.col-#{$class}-push-#{$index} {
left: percentage(($index / $grid-columns));
}
}
@if ($type == push) and ($index == 0) {
.col-#{$class}-push-0 {
left: auto;
}
}
@if ($type == pull) and ($index > 0) {
.col-#{$class}-pull-#{$index} {
right: percentage(($index / $grid-columns));
}
}
@if ($type == pull) and ($index == 0) {
.col-#{$class}-pull-0 {
right: auto;
}
}
@if ($type == offset) {
.col-#{$class}-offset-#{$index} {
margin-left: percentage(($index / $grid-columns));
}
}
}
// [converter] This is defined recursively in LESS, but Sass supports real loops
@mixin loop-grid-columns($columns, $class, $type) {
@for $i from 0 through $columns {
@include calc-grid-column($i, $class, $type);
}
}
// Create grid for specific class
@mixin make-grid($class) {
@include float-grid-columns($class);
@include loop-grid-columns($grid-columns, $class, width);
@include loop-grid-columns($grid-columns, $class, pull);
@include loop-grid-columns($grid-columns, $class, push);
@include loop-grid-columns($grid-columns, $class, offset);
}
/*-----*/
// Grid system
//
// Generate semantic grid columns with these mixins.
// Centered container element
@mixin container-fixed($gutter: $grid-gutter-width) {
margin-right: auto;
margin-left: auto;
padding-left: ($gutter / 2);
padding-right: ($gutter / 2);
@include clearfix;
}
// Creates a wrapper for a series of columns
@mixin make-row($gutter: $grid-gutter-width) {
margin-left: ceil(($gutter / -2));
margin-right: floor(($gutter / -2));
@include clearfix;
}
// Generate the extra small columns
@mixin make-xs-column($columns, $gutter: $grid-gutter-width) {
position: relative;
float: left;
width: percentage(($columns / $grid-columns));
min-height: 1px;
padding-left: ($gutter / 2);
padding-right: ($gutter / 2);
}
@mixin make-xs-column-offset($columns) {
margin-left: percentage(($columns / $grid-columns));
}
@mixin make-xs-column-push($columns) {
left: percentage(($columns / $grid-columns));
}
@mixin make-xs-column-pull($columns) {
right: percentage(($columns / $grid-columns));
}
// Generate the small columns
@mixin make-sm-column($columns, $gutter: $grid-gutter-width) {
position: relative;
min-height: 1px;
padding-left: ($gutter / 2);
padding-right: ($gutter / 2);
@media (min-width: $screen-sm-min) {
float: left;
width: percentage(($columns / $grid-columns));
}
}
@mixin make-sm-column-offset($columns) {
@media (min-width: $screen-sm-min) {
margin-left: percentage(($columns / $grid-columns));
}
}
@mixin make-sm-column-push($columns) {
@media (min-width: $screen-sm-min) {
left: percentage(($columns / $grid-columns));
}
}
@mixin make-sm-column-pull($columns) {
@media (min-width: $screen-sm-min) {
right: percentage(($columns / $grid-columns));
}
}
// Generate the medium columns
@mixin make-md-column($columns, $gutter: $grid-gutter-width) {
position: relative;
min-height: 1px;
padding-left: ($gutter / 2);
padding-right: ($gutter / 2);
@media (min-width: $screen-md-min) {
float: left;
width: percentage(($columns / $grid-columns));
}
}
@mixin make-md-column-offset($columns) {
@media (min-width: $screen-md-min) {
margin-left: percentage(($columns / $grid-columns));
}
}
@mixin make-md-column-push($columns) {
@media (min-width: $screen-md-min) {
left: percentage(($columns / $grid-columns));
}
}
@mixin make-md-column-pull($columns) {
@media (min-width: $screen-md-min) {
right: percentage(($columns / $grid-columns));
}
}
// Generate the large columns
@mixin make-lg-column($columns, $gutter: $grid-gutter-width) {
position: relative;
min-height: 1px;
padding-left: ($gutter / 2);
padding-right: ($gutter / 2);
@media (min-width: $screen-lg-min) {
float: left;
width: percentage(($columns / $grid-columns));
}
}
@mixin make-lg-column-offset($columns) {
@media (min-width: $screen-lg-min) {
margin-left: percentage(($columns / $grid-columns));
}
}
@mixin make-lg-column-push($columns) {
@media (min-width: $screen-lg-min) {
left: percentage(($columns / $grid-columns));
}
}
@mixin make-lg-column-pull($columns) {
@media (min-width: $screen-lg-min) {
right: percentage(($columns / $grid-columns));
}
}
/*-------------*/
//
// Grid system
// --------------------------------------------------
// Container widths
//
// Set the container width, and override it for fixed navbars in media queries.
.container {
@include container-fixed;
@media (min-width: $screen-sm-min) {
width: $container-sm;
}
@media (min-width: $screen-md-min) {
width: $container-md;
}
@media (min-width: $screen-lg-min) {
width: $container-lg;
}
}
// Fluid container
//
// Utilizes the mixin meant for fixed width containers, but without any defined
// width for fluid, full width layouts.
.container-fluid {
@include container-fixed;
}
// Row
//
// Rows contain and clear the floats of your columns.
.row {
@include make-row;
}
// Columns
//
// Common styles for small and large grid columns
@include make-grid-columns;
// Extra small grid
//
// Columns, offsets, pushes, and pulls for extra small devices like
// smartphones.
@include make-grid(xs);
// Small grid
//
// Columns, offsets, pushes, and pulls for the small device range, from phones
// to tablets.
@media (min-width: $screen-sm-min) {
@include make-grid(sm);
}
// Medium grid
//
// Columns, offsets, pushes, and pulls for the desktop device range.
@media (min-width: $screen-md-min) {
@include make-grid(md);
}
// Large grid
//
// Columns, offsets, pushes, and pulls for the large desktop device range.
@media (min-width: $screen-lg-min) {
@include make-grid(lg);
}
/*-----*/
/*-----*/
/*-----*/
/*-------------*/
.container { margin-right: auto; margin-left: auto; padding-left: 8px; padding-right: 8px; }
.container:before, .container:after { content: " "; display: table; }
.container:after { clear: both; }
@media (min-width: 768px) { .container { width: 736px; } }
@media (min-width: 992px) { .container { width: 956px; } }
@media (min-width: 1200px) { .container { width: 1156px; } }
.container-fluid { margin-right: auto; margin-left: auto; padding-left: 8px; padding-right: 8px; }
.container-fluid:before, .container-fluid:after { content: " "; display: table; }
.container-fluid:after { clear: both; }
.row { margin-left: -8px; margin-right: -8px; }
.row:before, .row:after { content: " "; display: table; }
.row:after { clear: both; }
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { position: relative; min-height: 1px; padding-left: 8px; padding-right: 8px; }
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { float: left; }
.col-xs-1 { width: 8.33333%; }
.col-xs-2 { width: 16.66667%; }
.col-xs-3 { width: 25%; }
.col-xs-4 { width: 33.33333%; }
.col-xs-5 { width: 41.66667%; }
.col-xs-6 { width: 50%; }
.col-xs-7 { width: 58.33333%; }
.col-xs-8 { width: 66.66667%; }
.col-xs-9 { width: 75%; }
.col-xs-10 { width: 83.33333%; }
.col-xs-11 { width: 91.66667%; }
.col-xs-12 { width: 100%; }
.col-xs-pull-0 { right: auto; }
.col-xs-pull-1 { right: 8.33333%; }
.col-xs-pull-2 { right: 16.66667%; }
.col-xs-pull-3 { right: 25%; }
.col-xs-pull-4 { right: 33.33333%; }
.col-xs-pull-5 { right: 41.66667%; }
.col-xs-pull-6 { right: 50%; }
.col-xs-pull-7 { right: 58.33333%; }
.col-xs-pull-8 { right: 66.66667%; }
.col-xs-pull-9 { right: 75%; }
.col-xs-pull-10 { right: 83.33333%; }
.col-xs-pull-11 { right: 91.66667%; }
.col-xs-pull-12 { right: 100%; }
.col-xs-push-0 { left: auto; }
.col-xs-push-1 { left: 8.33333%; }
.col-xs-push-2 { left: 16.66667%; }
.col-xs-push-3 { left: 25%; }
.col-xs-push-4 { left: 33.33333%; }
.col-xs-push-5 { left: 41.66667%; }
.col-xs-push-6 { left: 50%; }
.col-xs-push-7 { left: 58.33333%; }
.col-xs-push-8 { left: 66.66667%; }
.col-xs-push-9 { left: 75%; }
.col-xs-push-10 { left: 83.33333%; }
.col-xs-push-11 { left: 91.66667%; }
.col-xs-push-12 { left: 100%; }
.col-xs-offset-0 { margin-left: 0%; }
.col-xs-offset-1 { margin-left: 8.33333%; }
.col-xs-offset-2 { margin-left: 16.66667%; }
.col-xs-offset-3 { margin-left: 25%; }
.col-xs-offset-4 { margin-left: 33.33333%; }
.col-xs-offset-5 { margin-left: 41.66667%; }
.col-xs-offset-6 { margin-left: 50%; }
.col-xs-offset-7 { margin-left: 58.33333%; }
.col-xs-offset-8 { margin-left: 66.66667%; }
.col-xs-offset-9 { margin-left: 75%; }
.col-xs-offset-10 { margin-left: 83.33333%; }
.col-xs-offset-11 { margin-left: 91.66667%; }
.col-xs-offset-12 { margin-left: 100%; }
@media (min-width: 768px) { .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { float: left; }
.col-sm-1 { width: 8.33333%; }
.col-sm-2 { width: 16.66667%; }
.col-sm-3 { width: 25%; }
.col-sm-4 { width: 33.33333%; }
.col-sm-5 { width: 41.66667%; }
.col-sm-6 { width: 50%; }
.col-sm-7 { width: 58.33333%; }
.col-sm-8 { width: 66.66667%; }
.col-sm-9 { width: 75%; }
.col-sm-10 { width: 83.33333%; }
.col-sm-11 { width: 91.66667%; }
.col-sm-12 { width: 100%; }
.col-sm-pull-0 { right: auto; }
.col-sm-pull-1 { right: 8.33333%; }
.col-sm-pull-2 { right: 16.66667%; }
.col-sm-pull-3 { right: 25%; }
.col-sm-pull-4 { right: 33.33333%; }
.col-sm-pull-5 { right: 41.66667%; }
.col-sm-pull-6 { right: 50%; }
.col-sm-pull-7 { right: 58.33333%; }
.col-sm-pull-8 { right: 66.66667%; }
.col-sm-pull-9 { right: 75%; }
.col-sm-pull-10 { right: 83.33333%; }
.col-sm-pull-11 { right: 91.66667%; }
.col-sm-pull-12 { right: 100%; }
.col-sm-push-0 { left: auto; }
.col-sm-push-1 { left: 8.33333%; }
.col-sm-push-2 { left: 16.66667%; }
.col-sm-push-3 { left: 25%; }
.col-sm-push-4 { left: 33.33333%; }
.col-sm-push-5 { left: 41.66667%; }
.col-sm-push-6 { left: 50%; }
.col-sm-push-7 { left: 58.33333%; }
.col-sm-push-8 { left: 66.66667%; }
.col-sm-push-9 { left: 75%; }
.col-sm-push-10 { left: 83.33333%; }
.col-sm-push-11 { left: 91.66667%; }
.col-sm-push-12 { left: 100%; }
.col-sm-offset-0 { margin-left: 0%; }
.col-sm-offset-1 { margin-left: 8.33333%; }
.col-sm-offset-2 { margin-left: 16.66667%; }
.col-sm-offset-3 { margin-left: 25%; }
.col-sm-offset-4 { margin-left: 33.33333%; }
.col-sm-offset-5 { margin-left: 41.66667%; }
.col-sm-offset-6 { margin-left: 50%; }
.col-sm-offset-7 { margin-left: 58.33333%; }
.col-sm-offset-8 { margin-left: 66.66667%; }
.col-sm-offset-9 { margin-left: 75%; }
.col-sm-offset-10 { margin-left: 83.33333%; }
.col-sm-offset-11 { margin-left: 91.66667%; }
.col-sm-offset-12 { margin-left: 100%; } }
@media (min-width: 992px) { .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { float: left; }
.col-md-1 { width: 8.33333%; }
.col-md-2 { width: 16.66667%; }
.col-md-3 { width: 25%; }
.col-md-4 { width: 33.33333%; }
.col-md-5 { width: 41.66667%; }
.col-md-6 { width: 50%; }
.col-md-7 { width: 58.33333%; }
.col-md-8 { width: 66.66667%; }
.col-md-9 { width: 75%; }
.col-md-10 { width: 83.33333%; }
.col-md-11 { width: 91.66667%; }
.col-md-12 { width: 100%; }
.col-md-pull-0 { right: auto; }
.col-md-pull-1 { right: 8.33333%; }
.col-md-pull-2 { right: 16.66667%; }
.col-md-pull-3 { right: 25%; }
.col-md-pull-4 { right: 33.33333%; }
.col-md-pull-5 { right: 41.66667%; }
.col-md-pull-6 { right: 50%; }
.col-md-pull-7 { right: 58.33333%; }
.col-md-pull-8 { right: 66.66667%; }
.col-md-pull-9 { right: 75%; }
.col-md-pull-10 { right: 83.33333%; }
.col-md-pull-11 { right: 91.66667%; }
.col-md-pull-12 { right: 100%; }
.col-md-push-0 { left: auto; }
.col-md-push-1 { left: 8.33333%; }
.col-md-push-2 { left: 16.66667%; }
.col-md-push-3 { left: 25%; }
.col-md-push-4 { left: 33.33333%; }
.col-md-push-5 { left: 41.66667%; }
.col-md-push-6 { left: 50%; }
.col-md-push-7 { left: 58.33333%; }
.col-md-push-8 { left: 66.66667%; }
.col-md-push-9 { left: 75%; }
.col-md-push-10 { left: 83.33333%; }
.col-md-push-11 { left: 91.66667%; }
.col-md-push-12 { left: 100%; }
.col-md-offset-0 { margin-left: 0%; }
.col-md-offset-1 { margin-left: 8.33333%; }
.col-md-offset-2 { margin-left: 16.66667%; }
.col-md-offset-3 { margin-left: 25%; }
.col-md-offset-4 { margin-left: 33.33333%; }
.col-md-offset-5 { margin-left: 41.66667%; }
.col-md-offset-6 { margin-left: 50%; }
.col-md-offset-7 { margin-left: 58.33333%; }
.col-md-offset-8 { margin-left: 66.66667%; }
.col-md-offset-9 { margin-left: 75%; }
.col-md-offset-10 { margin-left: 83.33333%; }
.col-md-offset-11 { margin-left: 91.66667%; }
.col-md-offset-12 { margin-left: 100%; } }
@media (min-width: 1200px) { .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { float: left; }
.col-lg-1 { width: 8.33333%; }
.col-lg-2 { width: 16.66667%; }
.col-lg-3 { width: 25%; }
.col-lg-4 { width: 33.33333%; }
.col-lg-5 { width: 41.66667%; }
.col-lg-6 { width: 50%; }
.col-lg-7 { width: 58.33333%; }
.col-lg-8 { width: 66.66667%; }
.col-lg-9 { width: 75%; }
.col-lg-10 { width: 83.33333%; }
.col-lg-11 { width: 91.66667%; }
.col-lg-12 { width: 100%; }
.col-lg-pull-0 { right: auto; }
.col-lg-pull-1 { right: 8.33333%; }
.col-lg-pull-2 { right: 16.66667%; }
.col-lg-pull-3 { right: 25%; }
.col-lg-pull-4 { right: 33.33333%; }
.col-lg-pull-5 { right: 41.66667%; }
.col-lg-pull-6 { right: 50%; }
.col-lg-pull-7 { right: 58.33333%; }
.col-lg-pull-8 { right: 66.66667%; }
.col-lg-pull-9 { right: 75%; }
.col-lg-pull-10 { right: 83.33333%; }
.col-lg-pull-11 { right: 91.66667%; }
.col-lg-pull-12 { right: 100%; }
.col-lg-push-0 { left: auto; }
.col-lg-push-1 { left: 8.33333%; }
.col-lg-push-2 { left: 16.66667%; }
.col-lg-push-3 { left: 25%; }
.col-lg-push-4 { left: 33.33333%; }
.col-lg-push-5 { left: 41.66667%; }
.col-lg-push-6 { left: 50%; }
.col-lg-push-7 { left: 58.33333%; }
.col-lg-push-8 { left: 66.66667%; }
.col-lg-push-9 { left: 75%; }
.col-lg-push-10 { left: 83.33333%; }
.col-lg-push-11 { left: 91.66667%; }
.col-lg-push-12 { left: 100%; }
.col-lg-offset-0 { margin-left: 0%; }
.col-lg-offset-1 { margin-left: 8.33333%; }
.col-lg-offset-2 { margin-left: 16.66667%; }
.col-lg-offset-3 { margin-left: 25%; }
.col-lg-offset-4 { margin-left: 33.33333%; }
.col-lg-offset-5 { margin-left: 41.66667%; }
.col-lg-offset-6 { margin-left: 50%; }
.col-lg-offset-7 { margin-left: 58.33333%; }
.col-lg-offset-8 { margin-left: 66.66667%; }
.col-lg-offset-9 { margin-left: 75%; }
.col-lg-offset-10 { margin-left: 83.33333%; }
.col-lg-offset-11 { margin-left: 91.66667%; }
.col-lg-offset-12 { margin-left: 100%; } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment