// xl尺寸
$b-design-checkbox-xl-size: $s-6;
$b-design-checkbox-xl-icon-size: $s-6;

// large尺寸
$b-design-checkbox-l-size: 18px;
$b-design-checkbox-l-icon-size: 18px;

// medium尺寸
$b-design-checkbox-m-size: $s-4;
$b-design-checkbox-m-icon-size: $s-4;

// small尺寸
$b-design-checkbox-s-size: $s-3;
$b-design-checkbox-s-icon-size: 10px;

@mixin checkbox-sizing($checkbox-size, $checkbox-circle-size) {
  #{$checkbox-prefix} {
    input[type="checkbox"] {
      width: $checkbox-size;
      height: $checkbox-size;
    }
  }

  #{$checkbox-prefix}-inner {
    width: $checkbox-size;
    height: $checkbox-size;

    > .#{$css-prefix}icon {
      line-height: $checkbox-size;
      left: calc((#{$checkbox-size} - #{$checkbox-circle-size}) / 2);

      @if (get-compiling-value($checkbox-circle-size) == 12) {
        margin-top: 1px;
      }
      @include icon-size($checkbox-circle-size, 0px);
    }
  }

  &.checked,
  &.checked.focused {
    > #{$checkbox-prefix} {
      > #{$checkbox-prefix}-inner {
        > .#{$css-prefix}icon {
          @include icon-size($checkbox-circle-size, 0px); /* font-size < 12px的时候进行覆盖。 */
        }
      }
    }
  }

  &.indeterminate,
  &.indeterminate.focused {
    > #{$checkbox-prefix} {
      > #{$checkbox-prefix}-inner {
        > .#{$css-prefix}icon {
          @include icon-size($checkbox-circle-size, 0px); /* font-size < 12px的时候进行覆盖。 */
        }
      }
    }
  }
}
