@mixin htags($factor: 1) {
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: $headingcolor;
    font-family: $headingfont;
    font-weight: normal;
  }
  @for $i from 1 through 6 {
    //sass-lint:disable-block space-around-operator
    h#{$i} {
      $value: nth($headersizes, $i);
      $size: if(($value * $factor) < 1, 1, $value * $factor);
      font-size: $size * 0.7rem;
      margin-bottom: (nth($headermargins, $i) * 1rem);
      line-height: $size * 0.8rem;

      @include bp($desktop) {
        font-size: $size * 1rem;
        margin-bottom: (nth($headermargins, $i) * 1rem);
        line-height: $size+0.3 * 1.4rem;
      }
    }
  }
}

@include htags(1);
