amis/scss/components/form/_fieldset.scss

129 lines
1.9 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
%fieldSetBase {
2019-12-06 09:58:08 +08:00
position: relative;
&:after {
content: '';
pointer-events: none;
border: 1px solid $borderColor;
position: absolute;
z-index: 0;
top: 11px;
left: 0;
bottom: 0;
right: 0;
}
> legend {
position: absolute;
top: 0;
left: 0;
display: inline-block;
border: 0;
width: auto;
z-index: 1;
background: $Fieldset-legend-bgColor;
border-left: 0 !important;
}
.collapse {
2019-04-30 11:11:25 +08:00
position: relative;
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
}
fieldset.#{$ns}Collapse {
2019-12-06 09:58:08 +08:00
> legend {
font-weight: $fontWeightNormal;
padding: $gap-xs 0;
font-size: $fontSizeMd;
color: $text--loud-color;
border-left: $primary px2rem(4px) solid;
line-height: 1.2;
margin: 8px 0 28px;
padding: 0 0 0 14px;
cursor: pointer;
border-bottom: 0;
}
&--xs {
@extend %fieldSetBase;
padding: 20px 5px 5px 5px;
> legend {
left: 5px;
font-size: $fontSizeXs;
padding: 0 3px;
margin: 0 0 0 -3px;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&:after {
top: 6px;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&--sm {
@extend %fieldSetBase;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
padding: 25px 10px 10px 10px;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> legend {
left: 10px;
font-size: $fontSizeSm;
padding: 0 5px;
margin: 0 0 0 -5px;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&:after {
top: 6px;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&--base {
@extend %fieldSetBase;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
padding: 30px 15px 15px 15px;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> legend {
left: 15px;
font-size: $fontSizeBase;
padding: 0 8px;
margin: 0 0 0 -8px;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&:after {
top: 7px;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&--md {
@extend %fieldSetBase;
padding: 30px 20px 20px 20px;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> legend {
left: 20px;
font-size: $fontSizeMd;
padding: 0 10px;
margin: 0 0 0 -10px;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&:after {
top: 7px;
2019-04-30 11:11:25 +08:00
}
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 {
@extend %fieldSetBase;
padding: 40px 30px 30px 30px;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> legend {
left: 30px;
font-size: $fontSizeLg;
padding: 0 15px;
margin: 0 0 0 -15px;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&:after {
top: 9px;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
}