/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
@mixin triangle-common {
  width: 0;
  height: 0;
  border-style: solid;
}

@mixin triangle-left-color($color) {
  border-color: transparent $color transparent transparent;
}

@mixin triangle-left($height, $width: $height, $color: currentColor) {
  border-width: ($height * 0.5) $width ($height * 0.5) 0;

  @include triangle-common;
  @include triangle-left-color($color);
}

@mixin triangle-top-color($color) {
  border-color: transparent transparent $color transparent;
}

@mixin triangle-top($height, $width: $height, $color: currentColor) {
  border-width: 0 ($width * 0.5) $height ($width * 0.5);

  @include triangle-common;
  @include triangle-top-color($color);
}

@mixin triangle-right-color($color) {
  border-color: transparent transparent transparent $color;
}

@mixin triangle-right($height, $width: $height, $color: currentColor) {
  border-width: ($height * 0.5) 0 ($height * 0.5) $width;

  @include triangle-common;
  @include triangle-right-color($color);
}

@mixin triangle-bottom-color($color) {
  border-color: $color transparent transparent transparent;
}

@mixin triangle-bottom($height, $width: $height, $color: currentColor) {
  border-width: $height ($width * 0.5) 0 ($width * 0.5);

  @include triangle-common;
  @include triangle-bottom-color($color);
}

@mixin triangle-bottom-right-color($color) {
  border-color: transparent transparent $color transparent;
}

@mixin triangle-bottom-right($height, $width: $height, $color: currentColor) {
  border-width: 0 0 $height $width;

  @include triangle-common;
  @include triangle-bottom-right-color($color);
}

@mixin oval($width, $height: $width) {
  width: $width;
  height: $height;
  border-radius: #{$width * 0.5} / #{$height * 0.5};
}
