@use "variables";

/**
* This file defines mixins.
*/

/**
* Define basic style for <a> tag, using variables.
*/
@mixin a() {
  a {
    color: variables.$link-color;
    text-decoration: variables.$link-decoration;

    &:hover {
      color: variables.$link-color-hover;
      text-decoration: variables.$link-decoration-hover;
    }

    &:active {
      color: variables.$link-color-active;
    }

    &.rs-selected {
      font-weight: bold;
    }
  }
}

/**
* Load fonts.
*/
@mixin loadFonts($paths...) {
  @each $family in $paths {
    @font-face {
      font-family: #{$family};
      src: url('#{$family}.eot');
      src:
        url('#{$family}.woff2') format('woff2'),
        url('#{$family}.woff') format('woff');
      font-weight: normal;
      font-style: normal;
    }
  }
}

/**
* Create a simple @keyframes animation.
*/
@mixin keyframes($name, $propName, $start, $end) {
  @keyframes #{$name} {
    0% {
      #{$propName}: $start;
    }

    100% {
      #{$propName}: $end;
    }
  }
}
