fix(input): compatibility of line-height on safari

This commit is contained in:
07akioni 2019-09-15 13:20:19 +08:00
parent 4a1abc1323
commit e8f23b0d96
3 changed files with 13 additions and 28 deletions

View File

@ -152,7 +152,7 @@
} }
} }
&.n-base-picker--large-size { &.n-base-picker--large-size {
font-size: 14px; font-size: 15px;
.n-base-picker__placeholder { .n-base-picker__placeholder {
height: $large-height; height: $large-height;
line-height: $large-height; line-height: $large-height;

View File

@ -37,6 +37,8 @@
box-sizing: border-box; box-sizing: border-box;
border: none; border: none;
font-size: inherit; font-size: inherit;
padding-left: 14px;
padding-right: 14px;
border-radius: $input-border-radius; border-radius: $input-border-radius;
outline: none; outline: none;
color: #fff; color: #fff;
@ -64,17 +66,11 @@
} }
@include m(small-size) { @include m(small-size) {
font-size: $small-input-font-size; font-size: $small-input-font-size;
&:not(.n-input--textarea) { $height: round($small-input-font-size * 1.5);
height: $small-height;
line-height: $small-height;
}
@include e(input) { @include e(input) {
height: $small-height; height: $small-height;
line-height: $small-height;
padding: 0 14px;
} }
@include e(textarea, textarea-mirror) { @include e(input, textarea, textarea-mirror) {
$height: round($small-input-font-size * 1.5);
line-height: $height; line-height: $height;
font-size: $small-input-font-size; font-size: $small-input-font-size;
padding-top: ($small-height - $height) / 2; padding-top: ($small-height - $height) / 2;
@ -82,18 +78,12 @@
} }
} }
@include m(medium-size) { @include m(medium-size) {
font-size: $default-input-font-size; font-size: $medium-input-font-size;
&:not(.n-input--textarea) { $height: round($medium-input-font-size * 1.5);
height: $default-height;
line-height: $default-height;
}
@include e(input) { @include e(input) {
height: $default-height; height: $medium-height;
line-height: $default-height;
padding: 0 14px;
} }
@include e(textarea, textarea-mirror) { @include e(input, textarea, textarea-mirror) {
$height: round($medium-input-font-size * 1.5);
line-height: $height; line-height: $height;
font-size: $medium-input-font-size; font-size: $medium-input-font-size;
padding-top: ($medium-height - $height) / 2; padding-top: ($medium-height - $height) / 2;
@ -102,17 +92,11 @@
} }
@include m(large-size) { @include m(large-size) {
font-size: $large-input-font-size; font-size: $large-input-font-size;
&:not(.n-input--textarea) { $height: round($large-input-font-size * 1.5);
height: $large-height;
line-height: $large-height;
}
@include e(input) { @include e(input) {
height: $large-height; height: $large-height;
line-height: $large-height;
padding: 0 14px;
} }
@include e(textarea, textarea-mirror) { @include e(input, textarea, textarea-mirror) {
$height: round($large-input-font-size * 1.5);
line-height: $height; line-height: $height;
font-size: $large-input-font-size; font-size: $large-input-font-size;
padding-top: ($large-height - $height) / 2; padding-top: ($large-height - $height) / 2;
@ -162,6 +146,7 @@
} }
} }
@include e(textarea, textarea-mirror) { @include e(textarea, textarea-mirror) {
box-sizing: border-box;
font-family: inherit; font-family: inherit;
font-size: inherit; font-size: inherit;
line-height: 1.5; line-height: 1.5;

View File

@ -23,7 +23,7 @@
@include m(large-size) { @include m(large-size) {
line-height: 40px; line-height: 40px;
height: 40px; height: 40px;
font-size: 16px; font-size: 15px;
} }
} }