Permalink
Browse files

renaming -selector variable to and moving the option before as sugges…

…ted in #171 (comment)
  • Loading branch information...
1 parent 2f16b19 commit a82d31c0326f82cbdc3be1c7d6e01f4e789545ad @barraq barraq committed Apr 4, 2013
Showing with 6 additions and 6 deletions.
  1. +3 −3 docs/source/guides/reference.html.md
  2. +3 −3 sass/susy/_isolation.scss
@@ -356,18 +356,18 @@ Provide the column-width of each element,
and Susy will determine the positioning for you.
:::scss
- // isolate-grid(<$columns> [, <$context>, <$from>, <$nth-selector>, <$style>])
+ // isolate-grid(<$columns> [, <$context>, <$selector>, <$from>, <$style>])
.gallery-item {
@include isolate-grid(3);
}
- `<$columns>`: The number of _Columns_ for each item to span.
- `<$context>`: Current nesting _Context_.
Default: `$total-columns`.
+- `<$selector>`: either 'child' or 'of-type'.
+ Default: `child`.
- `<$from>`: The origin direction of your document flow.
Default: `$from-direction`.
-- `<$nth-selector>`: either 'child' or 'of-type'.
- Default: `child`.
- `<$style>`: Optionally return `static` lengths for grid calculations.
Default: `$container-style`.
@@ -21,13 +21,13 @@
//
// $columns : The column-width of each item on the grid;
// $context : [optional] The context (columns spanned by parent).
+// $selector : [child | of-type | last-of-type ] (default is 'child')
// $from : The start direction of your layout (e.g. 'left' for ltr languages)
-// $nth-selector : [optional] change between 'child' or 'of-type' (default is 'child')
@mixin isolate-grid(
$columns,
$context: $total-columns,
+ $selector: 'child',
$from: $from-direction,
- $nth-selector: 'child',
$style: fix-static-misalignment()
) {
$to: opposite-position($from);
@@ -39,7 +39,7 @@
@for $item from 1 through $line {
$nth: '#{$line}n + #{$item}';
- &:nth-#{$nth-selector}(#{$nth}) {
+ &:#{format-nth($nth,$selector)} {
margin-#{$from}: space($location - 1, $context, $style);
@if $location == 1 { clear: $from; }

0 comments on commit a82d31c

Please sign in to comment.