mixins.less 835 B

123456789101112131415161718192021222324
  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. .pagination-color-loop(@ruleset) when (length( @colors ) >= 1) {
  14. @length: length( @colors ) ;
  15. .looper( 1 ) ;
  16. .looper( @index ) when ( @index <= @length ) and (length(extract( @colors, @index )) = 2) {
  17. @paginationPair: extract( @colors, @index );
  18. @paginationColorName: extract( @paginationPair, 1 ) ;
  19. @paginationColorValue: extract( @paginationPair, 2 ) ;
  20. @ruleset();
  21. .looper( @index + 1 ) ;
  22. }
  23. }