refactor(button): modify height to min-height (#1402)

This commit is contained in:
Ryan2128 2021-01-31 03:13:16 -06:00 committed by GitHub
parent 7f8817cb6b
commit e94483a1d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 11 deletions

View File

@ -7,7 +7,7 @@
@include b(button) { @include b(button) {
display: inline-block; display: inline-block;
line-height: 1; line-height: 1;
height: 40px; min-height: $--input-height;
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
background: $--button-default-background-color; background: $--button-default-background-color;
@ -138,7 +138,7 @@
@include button-variant($--button-info-font-color, $--button-info-background-color, $--button-info-border-color); @include button-variant($--button-info-font-color, $--button-info-background-color, $--button-info-border-color);
} }
@include m(medium) { @include m(medium) {
height: $--input-medium-height; min-height: $--input-medium-height;
@include button-size($--button-medium-padding-vertical, $--button-medium-padding-horizontal, $--button-medium-font-size, $--button-medium-border-radius); @include button-size($--button-medium-padding-vertical, $--button-medium-padding-horizontal, $--button-medium-font-size, $--button-medium-border-radius);
@include when(circle) { @include when(circle) {
@ -146,7 +146,7 @@
} }
} }
@include m(small) { @include m(small) {
height: $--input-small-height; min-height: $--input-small-height;
@include button-size($--button-small-padding-vertical, $--button-small-padding-horizontal, $--button-small-font-size, $--button-small-border-radius); @include button-size($--button-small-padding-vertical, $--button-small-padding-horizontal, $--button-small-font-size, $--button-small-border-radius);
@include when(circle) { @include when(circle) {
@ -154,7 +154,7 @@
} }
} }
@include m(mini) { @include m(mini) {
height: $--input-mini-height; min-height: $--input-mini-height;
@include button-size($--button-mini-padding-vertical, $--button-mini-padding-horizontal, $--button-mini-font-size, $--button-mini-border-radius); @include button-size($--button-mini-padding-vertical, $--button-mini-padding-horizontal, $--button-mini-font-size, $--button-mini-border-radius);
@include when(circle) { @include when(circle) {

View File

@ -428,13 +428,11 @@ $--notification-danger-icon-color: $--color-danger !default;
/* Input /* Input
-------------------------- */ -------------------------- */
$--input-font-size: $--font-size-base !default;
/// color||Color|0 /// color||Color|0
$--input-font-color: $--color-text-regular !default; $--input-font-color: $--color-text-regular !default;
/// height||Other|4 /// width||Other|4
$--input-width: 140px !default; $--input-width: 140px !default;
/// height||Other|4
$--input-height: 40px !default;
$--input-border: $--border-base !default; $--input-border: $--border-base !default;
$--input-border-color: $--border-color-base !default; $--input-border-color: $--border-color-base !default;
/// borderRadius||Border|2 /// borderRadius||Border|2
@ -461,6 +459,10 @@ $--input-disabled-border: $--disabled-border-base !default;
$--input-disabled-color: $--disabled-color-base !default; $--input-disabled-color: $--disabled-color-base !default;
$--input-disabled-placeholder-color: $--color-text-placeholder !default; $--input-disabled-placeholder-color: $--color-text-placeholder !default;
/// fontSize||Font|1
$--input-font-size: $--font-size-base !default;
/// height||Other|4
$--input-height: 40px !default;
/// fontSize||Font|1 /// fontSize||Font|1
$--input-medium-font-size: 14px !default; $--input-medium-font-size: 14px !default;
/// height||Other|4 /// height||Other|4

View File

@ -7,7 +7,7 @@
position: relative; position: relative;
color: $--color-text-regular; color: $--color-text-regular;
font-size: $--font-size-base; font-size: $--font-size-base;
line-height: 40px; line-height: $--input-height;
@include m(mini) { @include m(mini) {
line-height: $--input-mini-height; line-height: $--input-mini-height;

View File

@ -76,7 +76,7 @@
font-size: $--font-size-base; font-size: $--font-size-base;
display: inline-block; display: inline-block;
width: 100%; width: 100%;
line-height: 40px; line-height: $--input-height;
@include scroll-bar; @include scroll-bar;
& .el-input__clear { & .el-input__clear {

View File

@ -11,7 +11,7 @@
@include b(select) { @include b(select) {
display: inline-block; display: inline-block;
position: relative; position: relative;
line-height: 40px; line-height: $--input-height;
@include e(popper) { @include e(popper) {
@include picker-popper( @include picker-popper(