UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

194 lines (161 loc) 3.92 kB
@import '../../../../lib/style/themes/default'; @import '../../../../lib/style/mixins/index'; @field-prefix-cls: ~'@{c7n-pro-prefix}-field'; .@{field-prefix-cls} { display: inline-block; width: 100%; &-row &-label, &-label label > span, &-label-vertical { overflow: hidden; font-weight: @label-font-weight; line-height: @label-line-height; white-space: @label-white-space; text-overflow: ellipsis; vertical-align: middle; } &-label { padding: @label-wrapper-padding; padding-top: 0; padding-bottom: 0; &-right { text-align: right; } &-center { text-align: center; } &-left label > span { flex: unset; } } label&-label, &-label label { display: flex; align-items: baseline; padding: @label-wrapper-padding; padding-right: 0; padding-left: 0; color: @label-color-horizontal; > span { flex: 1; } } &-wrapper { padding: @form-item-wrapper-padding; .@{c7n-pro-prefix}-checkbox-wrapper, .@{c7n-pro-prefix}-switch-wrapper { height: @input-height-base; } } label&-label-vertical { display: inline-block; padding: @label-wrapper-padding; padding-top: @label-vertical-wrapper-padding-vertical; padding-bottom: @label-vertical-wrapper-padding-vertical; color: @label-color-vertical; line-height: @label-line-height; direction: ltr; text-align: left; & + .@{field-prefix-cls}-wrapper { padding-top: 0; } } &-row &-label::after, &-label label::after { display: inline-block; color: @label-required-color; font-family: SimSun, sans-serif; line-height: 1; vertical-align: middle; content: ' '; } &-row &-required&-label::after, &-required&-label label::after { width: 0.08rem; margin-left: 0.04rem; content: '*'; } &-label-vertical&-required::after, &-label&-label-useColon::after { display: none; } &-row &-label&-label-useColon::after, &-label&-label-useColon label::after { position: relative; top: -0.01rem; display: inline-block; width: 0; margin-left: 0.02rem; color: @label-colon-color; vertical-align: baseline; content: ':'; } &-row &-label&-label-useColon::after { width: 0.04rem; } &-label-help { .icon-help_outline { position: relative; top: 0.02rem; margin-left: 0.02rem; font-size: 0.16rem; } & + .icon-help_outline { margin-left: 0.02rem; font-size: 0.16rem; & + .@{field-prefix-cls}-wrapper { padding-top: 0; } } } &-label-vertical&-label&-label-useColon { width: auto; } &-row &-required&-label-useColon::before, &-label-vertical&-required&-label::before, &-required&-label&-label-useColon label > span::before { display: inline-block; margin-right: 0.04rem; color: @label-required-color; font-size: 0.14rem; line-height: 1; content: '*'; } &-help { color: @field-help-color; font-size: @font-size-sm; // 帮助信息相对输入框应该另起一行 // display: inline-block; word-break: break-all; } &-output { padding-top: @label-output-wrapper-padding-vertical; padding-bottom: @label-output-wrapper-padding-vertical; } &-label-output label { padding-top: @form-item-wrapper-output-padding-vertical; padding-bottom: @form-item-wrapper-output-padding-vertical; } &-output-mix, &-label-output-mix label { padding: @label-wrapper-padding; } &-row { display: flex; flex-direction: row; flex-wrap: nowrap; } &-col { position: relative; flex-grow: 0; max-width: 100%; min-height: 1px; &-control { flex: 1; } & .@{field-prefix-cls}-wrapper { padding: @form-item-wrapper-padding; } } &-col &-label { display: inline-block; } }