mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-15 04:42:23 +08:00
fix(input): compatibility of line-height on safari
This commit is contained in:
parent
4a1abc1323
commit
e8f23b0d96
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user