Function

@nN, @Nn

The step of a sequence as a ratio between 0 and 1. @nN is @n / @N, @Nn is (@N - @n + 1) / @N.

Syntax

  • @m10(@nN), @m10(@nN(<operation>, ...)), @m10(@nN(<easing>, <operation>, ...))
  • @m10(@Nn), @m10(@Nn(<operation>, ...)), @m10(@Nn(<easing>, <operation>, ...))

Easing and operations work as for @iI. The first step is 1 / @N, the last is 1.

Examples

@grid: 1 / 60vmin;
background: radial-gradient(
  @m10(
    #000 @nN(*100%),
    #0000 @nN(*100%)
  )
);

Easing makes the rings denser towards the edge:

@grid: 1 / 60vmin;
@content: @svg(
  viewBox: -5 -5 10 10;
  circle*15 {
    r: @nN(ease-out, *4.5);
    fill: none;
    stroke: #000;
    stroke-width: .1;
  }
);

See also