Skip to content
This repository
Browse code

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

…ted in #171 (comment)
  • Loading branch information...
commit a82d31c0326f82cbdc3be1c7d6e01f4e789545ad 1 parent 2f16b19
Rémi Barraquand authored April 04, 2013
6  docs/source/guides/reference.html.md
Source Rendered
@@ -356,7 +356,7 @@ Provide the column-width of each element,
356 356
 and Susy will determine the positioning for you.
357 357
 
358 358
     :::scss
359  
-    // isolate-grid(<$columns> [, <$context>, <$from>, <$nth-selector>, <$style>])
  359
+    // isolate-grid(<$columns> [, <$context>, <$selector>, <$from>, <$style>])
360 360
     .gallery-item {
361 361
       @include isolate-grid(3);
362 362
     }
@@ -364,10 +364,10 @@ and Susy will determine the positioning for you.
364 364
 - `<$columns>`: The number of _Columns_ for each item to span.
365 365
 - `<$context>`: Current nesting _Context_.
366 366
   Default: `$total-columns`.
  367
+- `<$selector>`: either 'child' or 'of-type'.
  368
+  Default: `child`.
367 369
 - `<$from>`: The origin direction of your document flow.
368 370
   Default: `$from-direction`.
369  
-- `<$nth-selector>`: either 'child' or 'of-type'.
370  
-  Default: `child`.
371 371
 - `<$style>`: Optionally return `static` lengths for grid calculations.
372 372
   Default: `$container-style`.
373 373
 
6  sass/susy/_isolation.scss
@@ -21,13 +21,13 @@
21 21
 //
22 22
 // $columns       : The column-width of each item on the grid;
23 23
 // $context       : [optional] The context (columns spanned by parent).
  24
+// $selector      : [child | of-type | last-of-type ] (default is 'child')
24 25
 // $from          : The start direction of your layout (e.g. 'left' for ltr languages)
25  
-// $nth-selector  : [optional] change between 'child' or 'of-type' (default is 'child')
26 26
 @mixin isolate-grid(
27 27
   $columns,
28 28
   $context: $total-columns,
  29
+  $selector: 'child',
29 30
   $from: $from-direction,
30  
-  $nth-selector: 'child',
31 31
   $style: fix-static-misalignment()
32 32
 ) {
33 33
   $to: opposite-position($from);
@@ -39,7 +39,7 @@
39 39
 
40 40
   @for $item from 1 through $line {
41 41
     $nth: '#{$line}n + #{$item}';
42  
-    &:nth-#{$nth-selector}(#{$nth}) {
  42
+    &:#{format-nth($nth,$selector)} {
43 43
       margin-#{$from}: space($location - 1, $context, $style);
44 44
       @if $location == 1 { clear: $from; }
45 45
 

0 notes on commit a82d31c

Please sign in to comment.
Something went wrong with that request. Please try again.