Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parity (odd/even) feature #11

Open
woble opened this issue Jul 19, 2016 · 1 comment
Open

Parity (odd/even) feature #11

woble opened this issue Jul 19, 2016 · 1 comment
Labels

Comments

@woble
Copy link

woble commented Jul 19, 2016

/* Check if there's an even number of children */
.element:nth-last-child(even):first-child,
.element:nth-last-child(even):first-child ~ .element {
    ...
}

/* Check if there's an odd number of children */
.element:nth-last-child(odd):first-child,
.element:nth-last-child(odd):first-child ~ .element {
    ...
}

I suppose the syntax can be :total-even and :total-odd.

@pascalduez
Copy link
Owner

Hi,

why not, I can think of real world usages for this.
I'm in the (slow) process of re-factoring the code base to tackle #8. So this would happen next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants