mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
update input-group style
This commit is contained in:
parent
1faaad66ea
commit
e36aafb766
@ -49,11 +49,6 @@ label {
|
||||
.input-group(~"@{css-prefix}input"; @btnClass)
|
||||
}
|
||||
|
||||
//== composed by several input
|
||||
.@{css-prefix}inputs {
|
||||
.inputs(~"@{css-prefix}input");
|
||||
}
|
||||
|
||||
// 表单下的输入框尺寸唯一: 大尺寸
|
||||
form {
|
||||
.has-feedback {
|
||||
@ -176,12 +171,11 @@ input[type="checkbox"] {
|
||||
|
||||
//== Inline Form
|
||||
// Attention: Inline form does only apply to within viewports that are at least 768px wide
|
||||
// TODO: 用 float 代替 inline-block
|
||||
// TODO: 优化
|
||||
.@{css-prefix}form-inline {
|
||||
&:extend(.clearfix all);
|
||||
@media (min-width: @screen-sm-min) {
|
||||
.@{css-prefix}form-item {
|
||||
float: left;
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px;
|
||||
|
@ -98,7 +98,13 @@
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
&-addon, &-btn, .@{inputClass} {
|
||||
> [class*="col-"] {
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
&-addon,
|
||||
&-btn,
|
||||
> .@{inputClass} {
|
||||
display: table-cell;
|
||||
|
||||
&:not(:first-child):not(:last-child) {
|
||||
@ -106,7 +112,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
&-addon, &-btn {
|
||||
&-addon,
|
||||
&-btn {
|
||||
width: 1%;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
@ -151,7 +158,8 @@
|
||||
}
|
||||
|
||||
// Reset rounded corners
|
||||
.@{inputClass}:first-child, &-addon:first-child {
|
||||
> .@{inputClass}:first-child,
|
||||
&-addon:first-child {
|
||||
border-bottom-right-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
@ -163,7 +171,7 @@
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.@{inputClass}:last-child,
|
||||
> .@{inputClass}:last-child,
|
||||
&-addon:last-child,
|
||||
&-btn .@{btnclass}{
|
||||
border-bottom-left-radius: 0;
|
||||
@ -171,13 +179,13 @@
|
||||
}
|
||||
|
||||
// Sizing options
|
||||
&-lg > .@{inputClass},
|
||||
&-lg .@{inputClass},
|
||||
&-lg > &-addon,
|
||||
&-lg > &-btn .@{btnclass} {
|
||||
.input-lg();
|
||||
}
|
||||
|
||||
&-sm > .@{inputClass},
|
||||
&-sm .@{inputClass},
|
||||
&-sm > &-addon,
|
||||
&-sm > &-btn .@{btnclass} {
|
||||
.input-sm();
|
||||
@ -187,17 +195,3 @@
|
||||
margin-top: ~"-2px \9";
|
||||
}
|
||||
}
|
||||
|
||||
.inputs(@inputClass) {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
& > &-item {
|
||||
flex: 0 1 auto;
|
||||
padding-left: 8px;
|
||||
|
||||
&:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user