From 3a8a986458971c9b6f1b666e41ef7ccba6221318 Mon Sep 17 00:00:00 2001 From: 07akioni <07akioni2@gmail.com> Date: Tue, 17 Nov 2020 02:28:08 +0800 Subject: [PATCH] refactor(form-item): fix styles --- src/form/src/styles/themed-size.cssr.js | 4 +--- src/form/styles/_common.js | 17 ++++++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/form/src/styles/themed-size.cssr.js b/src/form/src/styles/themed-size.cssr.js index 3a7dec713..00700cc1c 100644 --- a/src/form/src/styles/themed-size.cssr.js +++ b/src/form/src/styles/themed-size.cssr.js @@ -28,10 +28,8 @@ export default c([ lineHeight: pxfy(depx(blankHeight) + 6) }) ]), - cB('form-item-control', { - marginBottom: blankHeight - }), cB('form-item-feedback-wrapper', { + minHeight: $local[createKey('feedbackHeight', size)], fontSize: feedbackFontSize }) ]) diff --git a/src/form/styles/_common.js b/src/form/styles/_common.js index 4b7cc9a1f..f6964d34e 100644 --- a/src/form/styles/_common.js +++ b/src/form/styles/_common.js @@ -2,19 +2,22 @@ export default { blankHeightSmall: '28px', blankHeightMedium: '34px', blankHeightLarge: '40px', + feedbackHeightSmall: '1.25em', + feedbackHeightMedium: '1.25em', + feedbackHeightLarge: '1.25em', feedbackFontSizeSmall: '13px', feedbackFontSizeMedium: '13px', feedbackFontSizeLarge: '14px', - labelFontSizeLeftSmall: '14px', - labelFontSizeLeftMedium: '14px', - labelFontSizeLeftLarge: '15px', - labelFontSizeTopSmall: '13px', - labelFontSizeTopMedium: '13px', - labelFontSizeTopLarge: '14px', + labelFontSizeSmallLeft: '14px', + labelFontSizeMediumLeft: '14px', + labelFontSizeLargeLeft: '15px', + labelFontSizeSmallTop: '13px', + labelFontSizeMediumTop: '13px', + labelFontSizeLargeTop: '14px', labelHeightSmall: '18px', labelHeightMedium: '18px', labelHeightLarge: '20px', - labelPaddingVertical: '0 0 8px 2px', + labelPaddingVertical: '0 0 0 2px', labelPaddingHorizontal: '0 12px 0 0', labelTextAlignHorizontal: 'right' }