fix(Button): text not align center in legacy safari (#6325)

This commit is contained in:
neverland
2020-05-20 19:22:14 +08:00
committed by GitHub
parent 1f117ab723
commit bb65c62b1e
36 changed files with 415 additions and 132 deletions
+11 -4
View File
@@ -2,9 +2,7 @@
.van-button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
display: inline-block;
box-sizing: border-box;
height: @button-default-height;
margin: 0;
@@ -125,7 +123,7 @@
}
&--block {
display: flex;
display: block;
width: 100%;
}
@@ -146,6 +144,15 @@
border-radius: 0;
}
// align-items are ignored when flex container is a button in legacy safari
// see: https://bugs.webkit.org/show_bug.cgi?id=169700
&__content {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
&__icon {
min-width: 1em;
font-size: 1.2em;