Browse Source

Fix form item height vertical align

pull/913/head
afc163 9 years ago
parent
commit
0a4758acf4
  1. 2
      components/form/FormItem.jsx
  2. 15
      style/components/form.less
  3. 4
      style/mixins/input.less

2
components/form/FormItem.jsx

@ -41,7 +41,7 @@ class FormItem extends React.Component {
);
}
return (
<div className={classes}>
<div className={this.props.prefixCls + '-item-control ' + classes}>
{c1}{c2}
</div>
);

15
style/components/form.less

@ -71,6 +71,11 @@ input[type="checkbox"] {
margin-bottom: @form-item-margin-bottom;
color: #666;
&-control {
min-height: 32px;
line-height: 32px;
}
&.@{css-prefix}form-item-with-help {
margin-bottom: @form-item-margin-bottom - @font-size-base * @line-height-base;
}
@ -90,13 +95,6 @@ input[type="checkbox"] {
}
}
.@{css-prefix}form-text,
.@{css-prefix}form-split {
margin: 0!important;
padding-top: 7px;
padding-bottom: 7px;
}
.@{css-prefix}form-text {
display: inline-block;
padding-right: 8px;
@ -279,8 +277,7 @@ form {
.@{css-prefix}form-horizontal,
.@{css-prefix}form-inline {
label {
padding-top: 7px;
padding-bottom: 7px;
line-height: 32px;
> input[type="radio"],
> input[type="checkbox"] {
margin-right: 5px;

4
style/mixins/input.less

@ -132,6 +132,10 @@
vertical-align: middle;
}
&-wrap > * {
display: block;
}
.@{inputClass} {
position: relative;
z-index: 2;

Loading…
Cancel
Save