Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Import Bourbon's grid functions

  • Loading branch information...
commit df715a9debfab3995672b83fc7c5890bc30ed751 1 parent ff730fc
@kaishin kaishin authored
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;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.