Skip to content

Commit

Permalink
Fix #10; Update source file
Browse files Browse the repository at this point in the history
  • Loading branch information
LukyVj committed May 30, 2016
1 parent 5e07ac8 commit 27c936d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions source/src/family.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
/// @content [Write the style you want to apply to the children, and it will be added within the @content directive]
/// @param {number} $num - id of the child
@mixin first($num) {
&:nth-child(-n + #{$num}) {
@content;
@if $num == 1 {
&:first-child {
@content;
}
}
@else {
&:nth-child(-n + #{$num}) {
@content;
}
}
}

Expand Down

0 comments on commit 27c936d

Please sign in to comment.