1 | @plugin './plugin.js';
|
2 | .navigation-color-loop(@ruleset) when (length( @colors ) >= 1) {
|
3 | @length: length( @colors ) ;
|
4 | .looper( 1 ) ;
|
5 | .looper( @index ) when ( @index <= @length ) and (length(extract( @colors, @index )) = 2) {
|
6 | @navPair: extract( @colors, @index );
|
7 | @navColorName: extract( @navPair, 1 ) ;
|
8 | @navColorValue: extract( @navPair, 2 ) ;
|
9 | @ruleset();
|
10 | .looper( @index + 1 ) ;
|
11 | }
|
12 | }
|
13 |
|
14 | .pagination-color-loop(@ruleset) when (length( @colors ) >= 1) {
|
15 | @length: length( @colors ) ;
|
16 | .looper( 1 ) ;
|
17 | .looper( @index ) when ( @index <= @length ) and (length(extract( @colors, @index )) = 2) {
|
18 | @paginationPair: extract( @colors, @index );
|
19 | @paginationColorName: extract( @paginationPair, 1 ) ;
|
20 | @paginationColorValue: extract( @paginationPair, 2 ) ;
|
21 | @ruleset();
|
22 | .looper( @index + 1 ) ;
|
23 | }
|
24 | }
|