_private.scss 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. $parent-columns: $grid-columns !default;
  2. $fg-column: $column;
  3. $fg-gutter: $gutter;
  4. $fg-max-columns: $grid-columns;
  5. $container-display-table: false !default;
  6. $layout-direction: nil !default;
  7. @function flex-grid($columns, $container-columns: $fg-max-columns) {
  8. $width: $columns * $fg-column + ($columns - 1) * $fg-gutter;
  9. $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
  10. @return percentage($width / $container-width);
  11. }
  12. @function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) {
  13. $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
  14. @return percentage($gutter / $container-width);
  15. }
  16. @function grid-width($n) {
  17. @return $n * $gw-column + ($n - 1) * $gw-gutter;
  18. }
  19. @function get-parent-columns($columns) {
  20. @if $columns != $grid-columns {
  21. $parent-columns: $columns !global;
  22. } @else {
  23. $parent-columns: $grid-columns !global;
  24. }
  25. @return $parent-columns;
  26. }
  27. @function is-display-table($container-is-display-table, $display) {
  28. $display-table: false;
  29. @if $container-is-display-table == true {
  30. $display-table: true;
  31. } @else if $display == table {
  32. $display-table: true;
  33. }
  34. @return $display-table;
  35. }