LukyVj / family.scss

Family.scss is a set of Sass mixins which will help you to manage the style of :nth-child'ified elements, in an easy way.
http://lukyvj.github.io/family.scss
MIT License
2.31k stars 128 forks source link

Every N after X #67

Closed lachieh closed 1 year ago

lachieh commented 8 years ago

This possibly relates to issue #37, but it may also want to be a separate function. It'd be great to have a function to select every Nth item after the Xth child.

For example:

li {
    @include n-after(3,6)
    ....
}

would return

li:nth-child(3n+9) {
  ....
}

Note that it's +9, instead of +6 because +6 would highlight every 3rd including the 6th, instead of starting after. I've used this before for targeting the second row and on.

In addition, n-before in the same format would also be helpful, utilizing :nth-last-child instead of nth-child

LukyVj commented 8 years ago

Hi! Sorry for the late response!

Yeah, the idea of #37 ( and #61 ) is exactly the following :

... select every Nth item after the Xth child.

Thank you for your in depth explanations, and your participation. I don't really have time this week to take care of all the requests and issues fixing, but I'll definitely make a huge improvement for the next release, adding those new mixins ( which should be the v1.1.0 if everything goes as expected )

LukyVj commented 8 years ago

On it :)

mzdr commented 6 years ago

Hey @LukyVj @jolidog, would you mind giving this a final push? :)

LukyVj commented 6 years ago

Hello @mzdr Yeah actually this totally got lost in my todo and as you may realize, I totally forgot about this.

I'm currently drowning into work, so if one of you feels like making a PR for it, I would gladly approve and merge it :)

mzdr commented 6 years ago

Hey @LukyVj,

it’s all cool. I was hoping that @jolidog may finalize his PR #78? I think there is just a couple of conflicts left, as you wrote, which need to be solved.

lachieh commented 6 years ago

I've just made another PR as #92. This is an extension of #78 but the only thing I added is the merge conflict.