Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor XY Grid cell mixins #11405

Merged
merged 31 commits into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3d2a93d
feat: change xy-cell default gutter positions according to direction
ncoden Jul 13, 2018
a7f3791
docs: fix description for `$gutter-type` in xy-cell mixin
ncoden Jul 13, 2018
a070513
feat: add `none` gutter type to xy-cell mixin
ncoden Jul 13, 2018
c6e319b
feat: add `$output` to xy-cell mixin and deprecate `$output-gutter`
ncoden Jul 13, 2018
b23dcc1
fix: add missing semicolon in xy-grid mixin
ncoden Jul 14, 2018
c8de616
refactor: deprecate xy-cell-static() and use xy-cell() to generate cl…
ncoden Jul 14, 2018
095a846
refactor: move current breakpoint resolution to its own function `-zf…
ncoden Jul 15, 2018
7eab036
feat: add support for current breakpoint to `xy-cell-offset()` and `x…
ncoden Jul 15, 2018
6887f80
docs: improve formulation for `$output` description in `xy-cell` mixin
ncoden Jul 15, 2018
5b6b785
refactor: factorize Float/XY Grid size functions into `fraction-to-pe…
ncoden Jul 15, 2018
c5d3c3f
docs: fix "xy-cell" name in "xy-cell-offset()" mixin description
ncoden Jul 16, 2018
6088b8e
fix: fix reversed "$vertical" option in "xy-cell-reset()" mixin
ncoden Jul 16, 2018
d7f18d1
refactor: move "-zf-each-breakpoint()" mixin iteration logics to "-zf…
ncoden Jul 17, 2018
f774749
feat: add functions/mixins for XY Grid cell base/size/gutters
ncoden Jul 17, 2018
c921caa
docs: add return value in `xy-cell-size` function documentation
ncoden Jul 17, 2018
54ec470
feat: refactor mixin "xy-cell-offset()" and add corresponding function
ncoden Jul 17, 2018
c968975
fix: remove extra "`" in XY cell error messages
ncoden Jul 17, 2018
fd2fdce
refactor: prefer XY cell base/gutters/size mixins to generate classes
ncoden Jul 18, 2018
ceb01d4
feat: refactor `xy-cell-base()` mixin and add corresponding function
ncoden Jul 18, 2018
fe10c9a
refactor: remove useless XY cell base generation
ncoden Jul 18, 2018
a49931c
feat: add function "zf-parse-fraction()" and improve "fraction-to-per…
ncoden Jul 18, 2018
fde3886
feat: add function "zf-is-fraction()"
ncoden Jul 18, 2018
0dea510
feat: add support of fractions in "xy-cell-base()" function and mixin.
ncoden Jul 18, 2018
4b5a1b1
docs: improve description for "$size" in XY cell mixins
ncoden Jul 18, 2018
6970e15
docs: add section about XY cell parts and related mixins in XY Grid docs
ncoden Aug 5, 2018
a15dc4b
docs: add fractions to the list of supported values in XY cell docs
ncoden Aug 5, 2018
fa616d3
Merge branch 'develop' into refactor/xy-cell
ncoden Sep 4, 2018
79de2f6
fix: use given value if no breakpoint value is found in mixin "-zf-br…
ncoden Sep 19, 2018
54dd6cc
feat: add responsive sizes/gutters to XY Grid mixins with "auto" brea…
ncoden Sep 19, 2018
995fc99
clean: remove various "@debug" in SCSS
ncoden Sep 19, 2018
c716648
fix: use Grid instead of XY-Grid config in Grid "grid-column" function
ncoden Oct 18, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: change xy-cell default gutter positions according to direction
Use `left right` gutters for horizontal cells and `top bottom` gutters for vertical cells by default

BREAKING CHANGE
  • Loading branch information
ncoden committed Jul 13, 2018
commit 3d2a93d936c56b3d5006d95758470cece5a5b7b7
9 changes: 7 additions & 2 deletions scss/xy-grid/_cell.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@
/// @param {Boolean} $gutter-output [true] - Whether or not to output gutters. Always `true` for margin gutters.
/// @param {Number|Map} $gutters [$grid-margin-gutters] - Map or single value for gutters.
/// @param {Keyword} $gutter-type [margin] - Map or single value for gutters.
/// @param {List} $gutter-position [right left] - The position to apply gutters to. Accepts `top`, `bottom`, `left`, `right` in any combination.
/// @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 name of the breakpoint size in your gutters map to get the size from. 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.
@mixin xy-cell(
$size: full,
$gutter-output: true,
$gutters: $grid-margin-gutters,
$gutter-type: margin,
$gutter-position: right left,
$gutter-position: null,
$breakpoint: null,
$vertical: false
) {
Expand All @@ -123,6 +123,11 @@
}
}

// Get the default gutter position according to cell direction
@if($gutter-position == null) {
$gutter-position: if($vertical == true, top bottom, left right);
}

// Get the gutter for the given breakpoint/value.
$gutter: -zf-get-bp-val($gutters, $breakpoint);
// If the breakpoint is a fallback, use a fallback gutter as well
Expand Down
4 changes: 2 additions & 2 deletions scss/xy-grid/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/// @param {Boolean} $gutter-output [true] - Whether or not to output gutters. Always `true` for margin 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` or `padding`.
/// @param {List} $gutter-position [right left] - The position to apply gutters to. Accepts `top`, `bottom`, `left`, `right` in any combination.
/// @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.
/// @param {Boolean} $vertical [false] - Set to true to output vertical (height) styles rather than widths.
@mixin xy-grid-layout(
Expand All @@ -22,7 +22,7 @@
$gutter-output: true,
$gutters: $grid-margin-gutters,
$gutter-type: margin,
$gutter-position: right left,
$gutter-position: null,
$breakpoint: null,
$vertical: false
) {
Expand Down