sass/susy/language/susy/_rows.scss in susy-2.0.0.alpha.4 vs sass/susy/language/susy/_rows.scss in susy-2.0.0.alpha.5
- old
+ new
@@ -4,103 +4,131 @@
// Row
// ---
// Apply to any layout element that should force a new layout row.
// - [$flow] : ltr | rtl
@mixin row(
- $flow: $flow
+ $flow: susy-get(flow)
) {
- @include pie-clearfix;
- clear: from($flow);
+ @include susy-clearfix;
+ clear: both;
}
// Unrow
// -----
// Cancel the row() effect, e.g. when using media queries.
-// - [$flow] : ltr | rtl
+// - [$flow]: ltr | rtl
@mixin unrow {
clear: none;
&:after {
content: none;
display: inline;
clear: none;
}
}
+// Full
+// ----
+// - [$span]: <span settings>
+@mixin full(
+ $span: $susy
+) {
+ $span: parse-span($span);
+
+ @include row(span-get(flow, $span));
+ @if is-split($span) and not span-get(is-container, $span) {
+ @include gutters($span);
+ }
+ float: none;
+ width: auto;
+}
+
// First
// -----
-// - [$flow] : ltr | rtl
+// - [$grid]: <settings>
@mixin first(
- $flow: $flow
+ $grid: $susy
) {
- @include float-first($flow);
+ $grid: parse-grid($grid);
+ $flow: susy-get(flow, $grid);
+ $split: if(susy-get(gutter-position, $grid) == split, true, false);
+
+ @if not $split {
+ @include float-first($flow);
+ }
}
-// Alpha
-// -----
-// - [$flow] : ltr | rtl
@mixin alpha(
- $flow: $flow
+ $grid: $susy
) {
- @include float-first($flow);
+ @include first($grid);
}
// Nth-First
// ---------
// - [$value] : first | last | only | <math>
// - [$type] : child | last-child | of-type | last-of-type
@mixin nth-first(
$value: first,
- $type: child
+ $type: child,
+ $grid: $susy
) {
- &:#{format-nth($value,$type)} { @include first(); }
+ &:#{format-nth($value,$type)} { @include first($grid); }
}
// Nth-Alpha
// ---------
// - [$value] : first | last | only | <math>
// - [$type] : child | last-child | of-type | last-of-type
@mixin nth-alpha(
$value: first,
- $type: child
+ $type: child,
+ $grid: $susy
) {
- @include nth-first($value, $type);
+ @include nth-first($value, $type, $grid);
}
// Last
-// ----
-// - [$flow] : ltr | rtl
+// -----
+// - [$grid]: <settings>
@mixin last(
- $flow: $flow
+ $grid: $susy
) {
- @include float-last($flow);
+ $grid: parse-grid($grid);
+ $output: (
+ flow: susy-get(flow, $grid),
+ margin: if(susy-get(gutter-position, $grid) == split, gutters($grid), 0),
+ );
+
+ @include float-last($output...);
}
-// Omega
-// -----
-// - [$flow] : ltr | rtl
@mixin omega(
- $flow: $flow
+ $grid: $susy
) {
- @include float-last($flow);
+ @include last($grid);
}
// Nth-Last
// --------
-// - [$value] : first | last | only | <math>
-// - [$type] : child | last-child | of-type | last-of-type
+// - [$value] : first | last | only | <math>
+// - [$type] : child | last-child | of-type | last-of-type
+// - [$grid] : <settings>
@mixin nth-last(
$value: last,
- $type: child
+ $type: child,
+ $grid: $susy
) {
- &:#{format-nth($value,$type)} { @include last(); }
+ &:#{format-nth($value,$type)} { @include last($grid); }
}
// Nth-Omega
// ---------
-// - [$value] : first | last | only | <math>
-// - [$type] : child | last-child | of-type | last-of-type
+// - [$value] : first | last | only | <math>
+// - [$type] : child | last-child | of-type | last-of-type
+// - [$grid] : <settings>
@mixin nth-omega(
$value: last,
- $type: child
+ $type: child,
+ $grid: $susy
) {
- @include nth-last($value, $type);
+ @include nth-last($value, $type, $grid);
}