Skip to content

Instantly share code, notes, and snippets.

@starryeyez024
Last active December 23, 2015 18:29
Show Gist options
  • Save starryeyez024/6675814 to your computer and use it in GitHub Desktop.
Save starryeyez024/6675814 to your computer and use it in GitHub Desktop.
OLD FLUID GRID COLUMNS (deprecated), please use new version: http://sassmeister.com/gist/starryeyez024/7951177
////////////////////////////////////////////////////
// FLUID GRID COLUMNS
///////////////////////////////////////////////////
=grid-mobile($class-name: views-row)
.#{$class-name}
clear: both
list-style-type: none
=grid-desktop($class-name: views-row)
.#{$class-name}
float: left
clear: none
=alpha
padding-left: 0
=omega
padding-right: 0
=fluid-grid($cols: 1, $grid-rows: 5, $padding: 1%, $class-name: views-row)
.#{$class-name}
width: 100% / $cols
padding: 0% + $padding
// use toolkit box-sizing mixin
box-sizing: border-box
.#{$class-name}-1
clear: both
@for $x from 1 through $grid-rows
.#{$class-name}-#{$x * $cols}
+omega
clear: both
@for $x from 1 through $grid-rows
.#{$class-name}-#{$x * $cols - ($cols - 1)}
+alpha
// EXAMPLE
.view-foobar
+grid-mobile
+fluid-grid(1)
.desktop-size //use breakpoint mixin
.view-foobar
+grid-desktop
+fluid-grid(5)
// EXAMPLE 2
// the default class name is "views-row" but you may replace that with the last variable.
.container-x
+grid-desktop
+fluid-grid(4, $class-name: panel-pane)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment