/// Set width/height and border-radius to get a rounded button.
///
/// Given a size of button, this mixin will compute
/// automatically the width/height and the border-radius.
///
/// @group buttons
///
/// @parameter {Number} $button-size - button size
///
/// @example scss - Usage
///   @include k-buttonRoundedImage(40px);
///
/// @example css - CSS output
///    width: 2.5rem;
///    height: 2.5rem;
///    border-radius: 1.25rem;

@mixin k-buttonRoundedImage($button-size) {
  // Validations
  $button-size: k-required($button-size, 'button-size');
  $button-size: k-number-definition($button-size, 'px');

  // Button element default settings.
  $button-size: k-px-to-rem($button-size);

  // The button element is rounded. So the radius is the button size / 2.
  $button-radius: $button-size / 2;

  width: $button-size;
  height: $button-size;
  border-radius: $button-radius;
}
