/// Set paddings for button.
///
/// Given a size of button and a size of picto, this mixin will calculate
/// automaticaly the paddings.
///
/// @group buttons
///
/// @parameter {Number} $button-size - button size
/// @parameter {Number} $icon-width  - icon width
/// @parameter {Number} $icon-height - icon height
///
/// @example scss - Usage
///   @include k-buttonPadding(40px, 14px, 12px);
///
/// @example css - CSS output
///   padding: 0.875rem 0.8125rem;

@mixin k-buttonPadding (
  $button-size,
  $icon-width,
  $icon-height
) {
  // Button element default settings.
  $button-size: k-px-to-rem($button-size);

  // Calculate padding around svg picto.
  $button-padding-x: ($button-size - $icon-width) / 2;
  $button-padding-y: ($button-size - $icon-height) / 2;

  padding: $button-padding-y $button-padding-x;
}
