Permalink
Browse files

Import Bourbon's grid functions

  • Loading branch information...
1 parent ff730fc commit df715a9debfab3995672b83fc7c5890bc30ed751 Reda Lemeden committed Apr 5, 2013
Showing with 15 additions and 0 deletions.
  1. +15 −0 app/assets/stylesheets/grid/_private.scss
View
15 app/assets/stylesheets/grid/_private.scss
@@ -4,3 +4,18 @@ $fg-gutter: $gutter;
$fg-max-columns: $grid-columns;
$container-display-table: false !default;
$layout-direction: nil !default;
+
+@function flex-grid($columns, $container-columns: $fg-max-columns) {
+ $width: $columns * $fg-column + ($columns - 1) * $fg-gutter;
+ $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
+ @return percentage($width / $container-width);
+}
+
+@function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) {
+ $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
+ @return percentage($gutter / $container-width);
+}
+
+@function grid-width($n) {
+ @return $n * $gw-column + ($n - 1) * $gw-gutter;
+}

0 comments on commit df715a9

Please sign in to comment.