@lp, @lr
The last value picked by @p, @pn or @pd, and the last value produced by @r, @ri or @rn.
Syntax
- @lp, @lp(<n>)
- @lr, @lr(<n>)
- n
- How far back to look:
1is the most recent value,2the one before. Default1.
Lookback is per render: @lp(2) is the pick before the last one.
The stacks are shared across every pick or random call in that render.
Examples
Reusing a random size for both dimensions:
@grid: 5 / 60vmin _1px;
background: #000;
@size: @r(30%, 90%) @lr;
margin: auto; Matching a border to the picked color:
@grid: 5 / 60vmin _1px;
background: linear-gradient(
@pd(45deg, -45deg),
@p(#2a9d8f, #e9c46a, #f4a261, #e76f51),
#fff,
@lp
); @grid: 6 / 60vmin _2px;
border: 2px solid @p(#000, #e6437d, #ebbf4d);
background: @lp;
border-radius: @p(0, 50%);
@cell(random) {
background: #fff;
}