@import '../common/style/var.less'; .van-toast { display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: content-box; color: @toast-text-color; font-size: @toast-font-size; line-height: @toast-line-height; // allow newline charactor white-space: pre-wrap; word-break: break-all; background-color: @toast-background-color; border-radius: @toast-border-radius; &__container { position: fixed; top: 50%; left: 50%; // hack for avoid max-width when use left & fixed width: fit-content; max-width: @toast-max-width; transform: translate(-50%, -50%); } &--text { min-width: @toast-text-min-width; padding: @toast-text-padding; } &--icon { width: @toast-default-width; min-height: @toast-default-min-height; padding: @toast-default-padding; .van-toast__icon { font-size: @toast-icon-size; } .van-toast__text { padding-top: 5px; } } &__loading { margin: 10px 0; } &--top { transform: translate(0, -30vh); } &--bottom { transform: translate(0, 30vh); } }