2021-09-14 15:15:39 +08:00
|
|
|
@use 'sass:math';
|
|
|
|
|
2019-06-28 10:20:55 +08:00
|
|
|
.#{$ns}Form-groupColumn {
|
2020-12-21 10:08:40 +08:00
|
|
|
margin-bottom: var(--gap-sm);
|
2019-06-28 10:20:55 +08:00
|
|
|
}
|
|
|
|
|
2019-04-30 11:11:25 +08:00
|
|
|
@include media-breakpoint-up(md) {
|
2019-12-06 09:58:08 +08:00
|
|
|
.#{$ns}Form-group {
|
2020-12-21 10:08:40 +08:00
|
|
|
margin-bottom: var(--Form-item-gap);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2021-10-28 17:09:26 +08:00
|
|
|
&:last-child {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
.#{$ns}Form-value > & {
|
2020-12-21 10:08:40 +08:00
|
|
|
margin-bottom: var(--Form-input-marginBottom);
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&--hor {
|
|
|
|
display: flex;
|
2020-11-19 17:12:45 +08:00
|
|
|
flex-wrap: wrap;
|
2021-01-28 18:56:22 +08:00
|
|
|
margin-left: calc(var(--Form-group-gutterWidth) / -2);
|
|
|
|
margin-right: calc(var(--Form-group-gutterWidth) / -2);
|
2019-12-06 09:58:08 +08:00
|
|
|
align-items: flex-start;
|
|
|
|
|
|
|
|
&.v-middle {
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.v-bottom {
|
|
|
|
align-items: flex-end;
|
|
|
|
}
|
|
|
|
|
|
|
|
> * {
|
2021-01-28 18:56:22 +08:00
|
|
|
padding-left: calc(var(--Form-group-gutterWidth) / 2);
|
|
|
|
padding-right: calc(var(--Form-group-gutterWidth) / 2);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
> .#{$ns}Form-item--inline {
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .#{$ns}Form-item,
|
|
|
|
> div > .#{$ns}Form-item {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Form-input > .#{$ns}Form-group {
|
2019-06-28 10:20:55 +08:00
|
|
|
margin-bottom: 0;
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&--lg {
|
2021-01-28 18:56:22 +08:00
|
|
|
margin-left: calc(var(--Form-group--lg-gutterWidth) / -2);
|
|
|
|
margin-right: calc(var(--Form-group--lg-gutterWidth) / -2);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
|
|
> * {
|
2021-01-28 18:56:22 +08:00
|
|
|
padding-left: calc(var(--Form-group--lg-gutterWidth) / 2);
|
|
|
|
padding-left: calc(var(--Form-group--lg-gutterWidth) / 2);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--md {
|
2021-01-28 18:56:22 +08:00
|
|
|
margin-left: calc(var(--Form-group--md-gutterWidth) / -2);
|
|
|
|
margin-right: calc(var(--Form-group--md-gutterWidth) / -2);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
|
|
> * {
|
2021-01-28 18:56:22 +08:00
|
|
|
padding-left: calc(var(--Form-group--md-gutterWidth) / 2);
|
|
|
|
padding-right: calc(var(--Form-group--md-gutterWidth) / 2);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--sm {
|
2021-01-28 18:56:22 +08:00
|
|
|
margin-left: calc(var(--Form-group--sm-gutterWidth) / -2);
|
|
|
|
margin-right: calc(var(--Form-group--sm-gutterWidth) / -2);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
|
|
> * {
|
2021-01-28 18:56:22 +08:00
|
|
|
padding-left: calc(var(--Form-group--sm-gutterWidth) / 2);
|
|
|
|
padding-right: calc(var(--Form-group--sm-gutterWidth) / 2);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--xs {
|
2021-01-28 18:56:22 +08:00
|
|
|
margin-left: calc(var(--Form-group--xs-gutterWidth) / -2);
|
|
|
|
margin-right: calc(var(--Form-group--xs-gutterWidth) / -2);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
|
|
> * {
|
2021-01-28 18:56:22 +08:00
|
|
|
padding-left: calc(var(--Form-group--xs-gutterWidth) / 2);
|
|
|
|
padding-right: calc(var(--Form-group--xs-gutterWidth) / 2);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Form-groupColumn {
|
|
|
|
flex-basis: 0;
|
|
|
|
flex-grow: 1;
|
2021-08-04 16:53:52 +08:00
|
|
|
width: 100%;
|
2019-12-06 09:58:08 +08:00
|
|
|
max-width: 100%;
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
@for $i from (1) through $Form--horizontal-columns {
|
|
|
|
.#{$ns}Form-groupColumn--#{$i} {
|
2021-09-14 15:15:39 +08:00
|
|
|
flex: 0 0 percentage(math.div($i, $Form--horizontal-columns));
|
|
|
|
max-width: percentage(math.div($i, $Form--horizontal-columns));
|
2019-12-06 09:58:08 +08:00
|
|
|
min-height: 1px;
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2021-08-04 16:53:52 +08:00
|
|
|
|
|
|
|
.#{$ns}Form-groupColumn--auto {
|
|
|
|
flex: 0 0 auto;
|
|
|
|
width: auto;
|
|
|
|
max-width: 100%;
|
|
|
|
min-height: 1px;
|
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
}
|