/**
  $part : success, info, error
  $color : css color of the part
  $background : background color of the part
 */
@mixin toasted-theme-type($type, $color : null, $background : null){
  &.#{$type} {
    @if($color) {
      color: $color;
    }
    @if($background) {
      background-color: $background;
    }
    @content;
  }
}


/**
  $part : action, material-icons
  $color : css color of the part
  $background : background color of the part
 */
@mixin toasted-theme-part($part, $color : null, $background : null){
  .#{$part} {
    @if($color) {
      color: $color;
    }
    @if($background) {
      background-color: $background;
    }
    @content;
  }
}


/**
  $name : name of the theme
  $defaults : have the default values
 */
@mixin toasted-theme($name, $defaults : true){

  .toasted {
    &.#{$name} {
      @if($defaults) {
        padding: 0 20px;
        min-height: 38px;
        font-size: 100%;
        line-height: 1.1em;
      }
      @content;
    }

  }

}


@mixin fit-to-screen() {
  min-width: 100%;

  .toasted:first-child {
    margin-top: 0;
  }

  &.top-right {
    top: 0;
    right: 0;
  }

  &.top-left {
    top: 0;
    left: 0;
  }

  &.top-center {
    top: 0;
    left: 0;
    transform: translateX(0);
  }

  &.bottom-right {
    right: 0;
    bottom: 0;
  }

  &.bottom-left {
    left: 0;
    bottom: 0;
  }

  &.bottom-center {
    left: 0;
    bottom: 0;
    transform: translateX(0);
  }
}