Selector

@even

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

Syntax

  • @even { }

Checkerboard parity keeps the pattern alternating on every row. For index parity use @nth(even).

Examples

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

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

On a 4×4 grid the selected indexes alternate between even and odd from row to row:

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

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

See also