@plugin './plugin.js';
.navigation-color-loop(@ruleset) when (length( @colors ) >= 1) {
  @length: length( @colors ) ;
  .looper( 1 ) ;
  .looper( @index ) when ( @index <= @length ) and (length(extract( @colors, @index )) = 2) {
    @navPair: extract( @colors, @index );
    @navColorName: extract( @navPair, 1 ) ;
    @navColorValue: extract( @navPair, 2 ) ;
    @ruleset();
    .looper( @index + 1 ) ;
  }
}

.pagination-color-loop(@ruleset) when (length( @colors ) >= 1) {
  @length: length( @colors ) ;
  .looper( 1 ) ;
  .looper( @index ) when ( @index <= @length ) and (length(extract( @colors, @index )) = 2) {
    @paginationPair: extract( @colors, @index );
    @paginationColorName: extract( @paginationPair, 1 ) ;
    @paginationColorValue: extract( @paginationPair, 2 ) ;
    @ruleset();
    .looper( @index + 1 ) ;
  }
}
