Controls

This package is deprecated

Mixins

button-common

Deprecated!

Kept to avoid breaking change

@mixin button-common() { ... }@mixin button-common() { 
  @include kib-core-spacing(padding, none, vertical);
  @include kib-typography.style-as-type('button');

  position: relative;
  display: inline-flex;
  height: settings.$button-height;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 0;
  border-radius: settings.$button-radius;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  transform: translate(0);
  user-select: none;

  /* Custom outline around button shown on focus */
  &::after {
    $distance: unit.rem(-4px);

    position: absolute;
    z-index: -1;
    top: $distance;
    left: $distance;
    right: $distance;
    bottom: $distance;
    border: unit.rem(2px) solid currentColor;
    border-radius: settings.$button-radius + kib-core-dimensions-get('tiny');
    color: inherit;
    content: '';
    opacity: 0;
    transition: opacity 100ms ease-out;
  }
 }
Description

Common button styles

Parameters

None.

Requires

splash

Deprecated!

Kept to avoid breaking change

@mixin splash() { ... }@mixin splash() { 
  background-color: var(--splash-background);
  color: var(--splash-text-color);

  &::after {
    border-color: var(--splash-background);
  }

  &:focus {
    background-color: var(--splash-background-focus);
  }

  &:hover {
    background-color: var(--splash-background-hover);
    color: var(--splash-text-color);
  }

  &:active {
    background-color: var(--splash-background-active);
  }
 }
Description

Set splash color on small button

Parameters

None.

splash-secondary

Deprecated!

Kept to avoid breaking change

@mixin splash-secondary() { ... }@mixin splash-secondary() { 
  background-color: var(--splash-background);
  box-shadow: inset 0 0 0 settings.$secondary-border-width var(--splash-border);
  color: var(--splash-text-color);

  &::after {
    border-color: var(--splash-border);
  }

  &:focus {
    background-color: var(--splash-background-focus);
  }

  &:hover {
    background-color: var(--splash-background-hover);
    color: var(--splash-text-color);
  }

  &:active {
    background-color: var(--splash-background-active);
  }
 }
Description

Set splash color on small secondary button

Parameters

None.

Requires

Variables

button-disabled-opacity

Deprecated!

Kept to avoid breaking change

$button-disabled-opacity: 0.5 !default;
Description

Default background color when active (pressed)

Type

Number

Author
  • CDS

button-height

Deprecated!

Kept to avoid breaking change

$button-height: kib-core-dimensions-get('huge') + kib-core-dimensions-get('small') !default;
Description

Default button height

Type

Number

Used by
Author
  • CDS

button-radius

Deprecated!

Kept to avoid breaking change

$button-radius: kib-core-dimensions-get('huge') !default;
Description

Common button radius

Type

Number

Used by
Author
  • CDS

secondary-border-width

Deprecated!

Kept to avoid breaking change

$secondary-border-width: unit.rem(2px) !default;
Description

Secondary variant border width

Type

Number

Author
  • CDS