From ead1ca5ce22319af76b668b88a9247829dc69c71 Mon Sep 17 00:00:00 2001 From: yoyo837 Date: Sun, 9 Feb 2020 19:14:34 +0800 Subject: [PATCH] explainAndExtraDistance --- components/form/style/index.less | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/form/style/index.less b/components/form/style/index.less index b8f0279e10..5a7981c978 100644 --- a/components/form/style/index.less +++ b/components/form/style/index.less @@ -27,6 +27,13 @@ } } +.explainAndExtraDistance(@num) when (@a>=0) { + padding-top: floor(@num); +} +.explainAndExtraDistance(@num) when (@a<0) { + margin-top: floor(@num); +} + // ================================================================ // = Item = // ================================================================ @@ -123,7 +130,7 @@ &-extra { clear: both; min-height: @form-item-margin-bottom; - padding-top: floor((@form-item-margin-bottom - @form-font-height) / 2); + .explainAndExtraDistance((@form-item-margin-bottom - @form-font-height) / 2); color: @text-color-secondary; font-size: @font-size-base; line-height: @line-height-base;