N3-components/N3-components

View on GitHub
src/style/toast.less

Summary

Maintainability
Test Coverage
.@{prefix-cls}-toast {
  position: fixed;
  border-radius: 25px;
  padding: 2px 25px .3em;
  transition-property: opacity;
  transition-duration: 800ms;
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  color: @whiteColor;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  cursor: default;
  z-index: 1500;

  &-default {
    background: @alertDefaultColor;
  }
  &-primary {
    background: @primaryColor;
  }
  &-success {
    background: @successColor;
  }
  &-info {
    background: @infoColor;
  }
  &-warning {
    background: @warningColor;
  }
  &-danger {
    background: @dangerColor;
  }
}

.@{prefix-cls}-toast-center {
  margin: 0 auto;
  left: 50%;
  top: 50%;
}

.@{prefix-cls}-toast-top {
  top: @toastTop;
  margin: 0 auto;
  left: 50%;
}

.@{prefix-cls}-toast-bottom {
  bottom: @toastBottom;
  margin: 0 auto;
  left: 50%;
  top:initial;
}

.@{prefix-cls}-toast-top-right {
  top: @toastTop;
  right: @toastRight;
  left: initial;
}

.@{prefix-cls}-toast-top-left {
  top: @toastTop;
  left: @toastLeft;
}

.@{prefix-cls}-toast-bottom-right {
  bottom: @toastBottom;
  right: @toastRight;
  left: initial;
  top:initial;
}

.@{prefix-cls}-toast-bottom-left {
  top: initial;
  bottom: @toastBottom;
  left: @toastLeft;
}