-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Expand file tree
/
Copy path_layout.scss
More file actions
38 lines (34 loc) · 1.72 KB
/
Copy path_layout.scss
File metadata and controls
38 lines (34 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Foundation for Sites
// https://get.foundation
// Licensed under MIT Open Source
////
/// @group xy-grid
////
@use "sass:math";
/// Sizes child elements so that `$n` number of items appear on each row.
///
/// @param {Number} $n - Number of elements to display per row.
/// @param {String} $selector ['.cell'] - Selector(s) to use for child elements.
/// @param {Boolean} $gutter-output [null] - [DEPRECATED] Whether or not to output gutters.
/// @param {Number|Map} $gutters [$grid-margin-gutters] - Map or single value for gutters.
/// @param {Keyword} $gutter-type [margin] - Type of gutter to output. Accepts `margin`, `padding` or `none`.
/// @param {List} $gutter-position [null] - The position to apply gutters to. Accepts `top`, `bottom`, `left`, `right` in any combination. By default `right left` for horizontal cells and `top bottom` for vertical cells.
/// @param {String} $breakpoint [null] - The breakpoint to use for the cell generation. If using with the `breakpoint()` mixin this will be set automatically unless manually entered.
/// @param {Boolean} $vertical [false] - Set to true to output vertical (height) styles rather than widths.
/// @param {List} $output [(base size gutters)] - Cell parts to output. You will need to generate others parts of the cell seperately, it may not work correctly otherwise.
@mixin xy-grid-layout(
$n,
$selector: '.cell',
$gutter-output: null,
$gutters: $grid-margin-gutters,
$gutter-type: margin,
$gutter-position: null,
$breakpoint: null,
$vertical: false,
$output: (base size gutters)
) {
$size: math.percentage(divide(1, $n));
& > #{$selector} {
@include xy-cell($size, $gutter-output, $gutters, $gutter-type, $gutter-position, $breakpoint, $vertical, $output);
}
}