mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] Toast: line wrap in iOS (#2142)
This commit is contained in:
parent
8cd3c5a8a6
commit
7f19b4dc18
@ -75,3 +75,19 @@
|
|||||||
// Tab
|
// Tab
|
||||||
@tabs-line-height: 44px;
|
@tabs-line-height: 44px;
|
||||||
@tabs-card-height: 30px;
|
@tabs-card-height: 30px;
|
||||||
|
|
||||||
|
// Toast
|
||||||
|
@toast-max-width: 70%;
|
||||||
|
@toast-font-size: 14px;
|
||||||
|
@toast-text-color: @white;
|
||||||
|
@toast-line-height: 20px;
|
||||||
|
@toast-border-radius: 4px;
|
||||||
|
@toast-background-color: rgba(0, 0, 0, .7);
|
||||||
|
@toast-icon-size: 50px;
|
||||||
|
@toast-text-min-width: 96px;
|
||||||
|
@toast-text-padding: 8px 12px;
|
||||||
|
@toast-default-padding: 15px;
|
||||||
|
@toast-default-width: 90px;
|
||||||
|
@toast-default-min-height: 90px;
|
||||||
|
@toast-position-top-distance: 50px;
|
||||||
|
@toast-position-bottom-distance: 50px;
|
||||||
|
@ -5,18 +5,18 @@
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
color: @white;
|
color: @toast-text-color;
|
||||||
max-width: 80%;
|
max-width: @toast-max-width;
|
||||||
font-size: 14px;
|
font-size: @toast-font-size;
|
||||||
line-height: 20px;
|
line-height: @toast-line-height;
|
||||||
border-radius: 4px;
|
border-radius: @toast-border-radius;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
box-sizing: border-box;
|
justify-content: center;
|
||||||
|
box-sizing: content-box;
|
||||||
transform: translate3d(-50%, -50%, 0);
|
transform: translate3d(-50%, -50%, 0);
|
||||||
background-color: rgba(0, 0, 0, .7);
|
background-color: @toast-background-color;
|
||||||
|
|
||||||
// hack for avoid max-width when use left & fixed
|
// hack for avoid max-width when use left & fixed
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
@ -30,17 +30,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&--text {
|
&--text {
|
||||||
min-width: 120px;
|
padding: @toast-text-padding;
|
||||||
padding: 8px 12px;
|
min-width: @toast-text-min-width;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--default {
|
&--default {
|
||||||
width: 120px;
|
width: @toast-default-width;
|
||||||
min-height: 120px;
|
padding: @toast-default-padding;
|
||||||
padding: 15px;
|
min-height: @toast-default-min-height;
|
||||||
|
|
||||||
.van-toast__icon {
|
.van-toast__icon {
|
||||||
font-size: 50px;
|
font-size: @toast-icon-size;
|
||||||
}
|
}
|
||||||
|
|
||||||
.van-loading {
|
.van-loading {
|
||||||
@ -48,17 +48,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.van-toast__text {
|
.van-toast__text {
|
||||||
font-size: 14px;
|
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--top {
|
&--top {
|
||||||
top: 50px;
|
top: @toast-position-top-distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--bottom {
|
&--bottom {
|
||||||
top: auto;
|
top: auto;
|
||||||
bottom: 50px;
|
bottom: @toast-position-bottom-distance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user