Skip to content

Parity (odd/even) feature #11

Open
@woble

Description

@woble
/* 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions