@paddingArray: 0 0, 1 2px, 2 5px, 3 12px, 4 15px, 5 20px, 6 30px, 7 50px, 8 100px;

.paddingNmargin(@iterator:1) when(@iterator <= length(@paddingArray)) {
  @name: extract(extract(@paddingArray, @iterator), 1);

  .p-@{name} {
    padding: extract(extract(@paddingArray, @iterator), 2);
  }
  .pl-@{name},
  .pl-between-@{name} + .pl-between-@{name} {
    padding-left: extract(extract(@paddingArray, @iterator), 2);
  }
  .pr-@{name} {
    padding-right: extract(extract(@paddingArray, @iterator), 2);
  }
  .pt-@{name} {
    padding-top: extract(extract(@paddingArray, @iterator), 2);
  }
  .pb-@{name} {
    padding-bottom: extract(extract(@paddingArray, @iterator), 2);
  }
  .px-@{name} {
    padding-right: extract(extract(@paddingArray, @iterator), 2);
    padding-left: extract(extract(@paddingArray, @iterator), 2);
  }
  .py-@{name} {
    padding-top: extract(extract(@paddingArray, @iterator), 2);
    padding-bottom: extract(extract(@paddingArray, @iterator), 2);
  }

  .m-@{name} {
    margin: extract(extract(@paddingArray, @iterator), 2);
  }
  .ml-@{name} {
    margin-left: extract(extract(@paddingArray, @iterator), 2);
  }
  .mr-@{name} {
    margin-right: extract(extract(@paddingArray, @iterator), 2);
  }
  .mt-@{name} {
    margin-top: extract(extract(@paddingArray, @iterator), 2);
  }
  .mb-@{name} {
    margin-bottom: extract(extract(@paddingArray, @iterator), 2);
  }
  .mx-@{name} {
    margin-right: extract(extract(@paddingArray, @iterator), 2);
    margin-left: extract(extract(@paddingArray, @iterator), 2);
  }
  .my-@{name} {
    margin-top: extract(extract(@paddingArray, @iterator), 2);
    margin-bottom: extract(extract(@paddingArray, @iterator), 2);
  }

  .paddingNmargin(@iterator + 1);
}
.paddingNmargin();

@colorArray: primary @primary-color, success @success-color, warning @warning-color, error @error-color,
  muted @normal-color, white @white, transparent transparent;

.color(@iterator:1) when(@iterator <= length(@colorArray)) {
  @name: extract(extract(@colorArray, @iterator), 1);

  .text-@{name} {
    color: extract(extract(@colorArray, @iterator), 2) !important;
  }

  .bg-@{name} {
    background-color: extract(extract(@colorArray, @iterator), 2) !important;
  }

  .color(@iterator + 1);
}
.color();

@fontArray: lg 2rem, sm @font-size-sm, xl 3rem, h1 @heading-1-size, h2 @heading-2-size,
  h3 @heading-3-size, h3 @heading-3-size;

.fontSize(@iterator:1) when(@iterator <= length(@fontArray)) {
  @name: extract(extract(@fontArray, @iterator), 1);

  .font-@{name} {
    font-size: extract(extract(@fontArray, @iterator), 2) !important;
  }

  .fontSize(@iterator + 1);
}
.fontSize();

.font-weight-lighter {
  font-weight: lighter !important;
}

@borderArray: 0 0, 1 2px;

.borderWidth(@iterator:1) when(@iterator <= length(@borderArray)) {
  @name: extract(extract(@borderArray, @iterator), 1);

  .border-left-@{name} {
    border-left-width: extract(extract(@borderArray, @iterator), 2) !important;
  }
  .border-right-@{name} {
    border-right-width: extract(extract(@borderArray, @iterator), 2) !important;
  }
  .border-top-@{name} {
    border-top-width: extract(extract(@borderArray, @iterator), 2) !important;
  }
  .border-bottom-@{name} {
    border-bottom-width: extract(extract(@borderArray, @iterator), 2) !important;
  }

  .border-@{name} {
    border-width: extract(extract(@borderArray, @iterator), 2) !important;
  }

  .borderWidth(@iterator + 1);
}
.borderWidth();