/*
 * Copyright (c) 2019-present Sonatype, Inc.
 * This program and the accompanying materials are made available under
 * the terms of the Eclipse Public License 2.0 which accompanies this
 * distribution and is available at https://www.eclipse.org/legal/epl-2.0/.
 */

// Icon buttons should appear smaller in certain contexts such as lists and table rows
@mixin small-icon-btn($extra-vertical-padding: 0px) {
  padding-top: calc(var(--nx-spacing-base) - var(--nx-border-width-alt) - #{$extra-vertical-padding});
  padding-bottom: calc(var(--nx-spacing-base) - var(--nx-border-width-alt) - #{$extra-vertical-padding});
  width: calc(1em * var(--nx-line-height) + 2 * var(--nx-spacing-base));
}

@mixin bordered-btn-focus-outline($type) {
  outline: var(--nx-focus-outline-width) solid var(--nx-color-#{$type}-button-focus-outline);
  outline-offset: calc(
    0px - var(--nx-border-width-alt) - var(--nx-focus-outline-offset) - var(--nx-focus-outline-width)
  );
}
