@ohayojp.com/components
Version:
Common business components of ohayojp.
170 lines (140 loc) • 2.93 kB
text/less
@import '../../../theme/theme-default.less';
@sv-prefix: ~'.sv';
@{sv-prefix} {
display: block;
+ @{sv-prefix} {
margin-top: @sv-bottom;
}
&__container {
display: block;
// offset the padding-bottom of last row
.@{ant-prefix}-row {
margin-bottom: -@sv-bottom;
overflow: hidden;
}
}
&__item {
&-fixed {
display: flex;
@{sv-prefix}__label {
flex: 0 0 auto;
overflow: hidden;
text-align: right;
text-overflow: ellipsis;
}
@{sv-prefix}__detail {
flex: 1 0 0;
}
}
}
&__title {
display: block;
float: none;
clear: both;
width: 100%;
margin-bottom: @sv-bottom;
color: @heading-color;
font-weight: 500;
font-size: 14px;
}
&__label {
display: table-cell;
// margin-right: 8px;
padding-bottom: @sv-bottom;
color: @sv-label-color;
line-height: 22px;
white-space: nowrap;
&:not(@{sv-prefix}__label-empty) {
&::after {
position: relative;
top: -0.5px;
margin: 0 8px 0 2px;
content: ':';
}
}
&-optional {
margin-left: @sv-optional-margin;
color: @sv-label-optional-color;
&-no-text {
margin-left: 0;
}
> .anticon {
margin-left: @sv-optional-margin;
}
}
}
&__detail {
// contents 对 ie, edge 不支持,但对于子组件的支持会更友好
display: table-cell;
width: 100%;
padding-bottom: @sv-bottom;
color: @sv-detail-color;
line-height: 22px;
word-break: break-all;
}
&__type {
&-primary @{sv-prefix}__detail {
color: @sv-type-primary-color;
}
&-success @{sv-prefix}__detail {
color: @sv-type-success-color;
}
&-danger @{sv-prefix}__detail {
color: @sv-type-danger-color;
}
&-warning @{sv-prefix}__detail {
color: @sv-type-warning-color;
}
}
&__default {
&::before {
content: @sv-default-text;
}
~ @{sv-prefix}__unit {
display: none ;
}
}
&__unit {
display: inline;
margin-left: @sv-unit-margin;
color: @sv-unit-color;
}
&__small {
// offset the padding-bottom of last row
.@{ant-prefix}-row {
margin-bottom: -8px;
}
@{sv-prefix}__title {
margin-bottom: 12px;
color: @text-color;
}
@{sv-prefix}__label,
@{sv-prefix}__detail {
padding-bottom: 8px;
}
}
&__large {
@{sv-prefix}__title {
font-size: 16px;
}
}
&__horizontal {
@{sv-prefix}__label-width {
display: flex;
justify-content: flex-end;
@{sv-prefix}__label-text {
overflow: hidden;
text-overflow: ellipsis;
}
}
}
&__vertical {
@{sv-prefix}__label {
padding-bottom: 8px;
}
@{sv-prefix}__label,
@{sv-prefix}__detail {
display: block;
}
}
}