sturobson / Sassifaction

A Sass mixin library
The Unlicense
178 stars 13 forks source link

Unknown `children-of-ie-nth` function #11

Closed KittyGiraudel closed 10 years ago

KittyGiraudel commented 10 years ago

What is children-of-ie-nth referring to in https://github.com/sturobson/Sassifaction/blob/e0f0b285300a03e84d194633407da52bea2d1694/sass/base/mixins/_children-of-ie.scss#L18? I can't seem to find this function in the project.

sturobson commented 10 years ago

This is a direct rip from @scottkellum's method here - https://github.com/Team-Sass/toolkit/blob/1.x.x/compass/stylesheets/toolkit/_children-of-ie.scss - taken verbatim, so I'm unsure.

KittyGiraudel commented 10 years ago

Yeah, but @scottkellum has declared a custom Ruby function for this: https://github.com/Team-Sass/toolkit/blob/f49a9f72c7bedeb338bad0b43d1a566ad62037de/compass/lib/toolkit.rb.

As far as I know, you didn't.

sturobson commented 10 years ago

Ah, so, I don't need it? As I'm not doing anything w/ Ruby but afaik the mixin works still, delete the line to move forward?

KittyGiraudel commented 10 years ago

I think you should only keep the @if part to handle simple cases of :nth-child.

scottkellum commented 10 years ago

You need Ruby for some of the fancy stuff.

sturobson commented 10 years ago

But in this most basic form -

@function nth-child($n) { $nth-child: first-child; @for $i from 2 through $n { $nth-child: append($nth-child, #{"+*"}); } @return #{":"}$nth-child; }

Right?

KittyGiraudel commented 10 years ago

Sounds good. I'm not the biggest fan of the syntax but that does the job.