Allowing to change the nth-selector (nth-child or nth-of-type) for the mixin isolate-grid #171

Merged
merged 3 commits into from Apr 4, 2013

Conversation

Projects
None yet
2 participants
Contributor

barraq commented Mar 28, 2013

I find that it is interesting to be able to change the nth-selector in the isolate-grid mixin.
For instance in the following example:

<section class="wrapper">
    <header><h2>section header</h2></header>
    <section class="someclass">... some content ...</section>
    <section class="someclass">... some content ...</section>
    <section class="someclass">... some content ...</section>
</section>
section.wrapper section.someclass {
    @include isolate-grid(x/3, x, $nth-selector: 'of-type');
}

Therefore I just added the parameter $nth-selector in the mixin.

Best,
Rémi

Owner

mirisuzanne commented Mar 28, 2013

Following the same pattern as nth-omega would lead me to call the variable simply $selector and call it before $from in the argument list. Can you make those changes? Can you also add a test for this?

The tests are pretty simple: just add the scss, compile, and make sure the css output looks right - then commit both.

Contributor

barraq commented Mar 29, 2013

no problem, i'll do the changes and the tests ;) I keep you posted when it is done,
cheers

Contributor

barraq commented Apr 4, 2013

hi @ericam I did as you asked: renamed $nth-selector to $selector, moved the option before $from, and adding test. Everything is ok. Cheers

mirisuzanne added a commit that referenced this pull request Apr 4, 2013

Merge pull request #171 from barraq/master
Allowing to change the nth-selector (nth-child or nth-of-type) for the mixin isolate-grid

@mirisuzanne mirisuzanne merged commit 96309d6 into oddbird:master Apr 4, 2013

Owner

mirisuzanne commented Apr 4, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment