styles: 优化form label的line-height的计算方式 (#6847)

* styles: 优化form label的line-height的计算方式

* styles: 优化form label的line-height的计算方式

---------

Co-authored-by: qinhaoyan <30946345+qinhaoyan@users.noreply.github.com>
This commit is contained in:
qkiroc 2023-05-11 14:17:02 +08:00 committed by GitHub
parent 32b13db819
commit fdc3872491
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 5 deletions

View File

@ -1630,7 +1630,7 @@
--Form-item-fontColor: var(--Form-item-color);
--Form-item-fontSize: var(--fonts-size-7);
--Form-item-fontWeight: var(--fonts-weight-6);
--Form-item-lineHeight: var(--fonts-lineHeight-2);
--Form-item-lineHeight: var(--fonts-lineHeight-1);
--Form-item-star-color: var(--colors-error-5);
--Form-item-star-size: var(--sizes-size-7);
--Form-description-color: var(--colors-neutral-text-5);

View File

@ -262,7 +262,14 @@
}
> .#{$ns}Form-label {
line-height: px2rem(32px);
padding-top: calc(
(
var(--Form-input-height) - var(--Form-item-lineHeight) *
var(--Form-item-fontSize)
) / 2
);
word-break: break-word;
line-height: var(--Form-item-lineHeight);
margin: 0;
margin-right: var(--Form--horizontal-label-gap);
flex-shrink: 0;
@ -318,8 +325,14 @@
vertical-align: top;
> .#{$ns}Form-label {
height: px2rem(32px);
line-height: px2rem(32px);
padding-top: calc(
(
var(--Form-input-height) - var(--Form-item-lineHeight) *
var(--Form-item-fontSize)
) / 2
);
word-break: break-word;
line-height: var(--Form-item-lineHeight);
margin: 0;
margin-right: var(--Form-mode-inline-label-gap);