Selector

@odd

A checkerboard: the cells where column + row is even, the complement of @even. On a grid with an odd number of columns these are exactly the odd indexes.

Syntax

  • @odd { }

For index parity use @nth(odd).

Examples

@grid: 5 / 60vmin;
@content: @i;

@odd {
  background: #000;
  color: #fff;
}

On a 4×4 grid the selected indexes alternate, the same as @even the other way around:

@grid: 4 / 60vmin;
@content: @i;

@odd {
  background: #000;
  color: #fff;
}

See also