amis2/scss/components/_cards.scss

188 lines
3.0 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
.#{$ns}Cards {
2019-12-06 09:58:08 +08:00
&-toolbar {
@include clearfix();
margin: 0 var(--Cards-toolbar-marginX) var(--Cards-toolbar-marginY);
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-actions {
display: inline-block;
2019-12-06 09:58:08 +08:00
> * {
margin-right: var(--Crud-toolbar-gap);
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
&-heading {
padding: var(--gap-xs) 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
&-header {
padding: var(--Cards-toolbar-marginY) var(--Cards-toolbar-marginX);
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> * + .#{$ns}Button,
> * + .#{$ns}ButtonGroup,
> * + .#{$ns}ButtonToolbar {
margin-left: var(--Crud-toolbar-gap);
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
&-header + &-toolbar {
padding-top: 0;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-fixedTop {
position: absolute;
background: var(--white);
2019-12-06 09:58:08 +08:00
z-index: -1;
opacity: 0;
box-shadow: var(--Cards-fixedTop-boxShadow);
padding: var(--gap-sm);
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&.in {
position: fixed;
opacity: 1;
z-index: $zindex-affix;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
.#{$ns}Cards-toolbar {
margin-bottom: 0;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&:empty {
display: none;
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
&--unsaved &-heading {
background: var(--Cards--unsaved-heading-bg);
color: var(--Cards--unsaved-heading-color);
padding: var(--gap-xs) var(--gap-sm);
margin-bottom: var(--gap-sm);
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-dragTip {
2020-06-08 15:49:45 +08:00
width: 100%;
color: var(--info);
2019-12-06 09:58:08 +08:00
clear: both;
margin-top: var(--gap-xs);
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-placeholder {
background: var(--white);
color: var(--text--muted-color);
2019-12-06 09:58:08 +08:00
text-align: center;
height: var(--Cards-placeholder-height);
line-height: var(--Cards-placeholder-height);
border: var(--Card-borderWidth) solid var(--Card-borderColor);
border-radius: var(--Card-borderRadius);
2019-12-06 09:58:08 +08:00
}
2019-12-24 11:25:55 +08:00
&-body > div {
display: flex;
}
2019-12-06 09:58:08 +08:00
&--masonry {
display: block;
2019-12-06 09:58:08 +08:00
&:after {
content: none;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
column-gap: 0;
column-fill: initial;
2019-12-06 09:58:08 +08:00
> div {
width: 100%;
float: none;
break-inside: avoid;
max-width: unset;
display: inline-block;
flex: unset;
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
@include media-breakpoint-up(sm) {
.#{$ns}Cards--masonrySm1 {
column-count: 12;
}
.#{$ns}Cards--masonrySm2 {
column-count: 6;
}
.#{$ns}Cards--masonrySm3 {
column-count: 4;
}
.#{$ns}Cards--masonrySm4 {
column-count: 3;
}
.#{$ns}Cards--masonrySm6 {
column-count: 2;
}
.#{$ns}Cards--masonrySm12 {
column-count: 1;
}
.#{$ns}Cards-toolbar {
display: flex;
2020-06-08 15:49:45 +08:00
flex-wrap: wrap;
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
}
@include media-breakpoint-up(md) {
2019-12-06 09:58:08 +08:00
.#{$ns}Cards--masonryMd1 {
column-count: 12;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Cards--masonryMd2 {
column-count: 6;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Cards--masonryMd3 {
column-count: 4;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Cards--masonryMd4 {
column-count: 3;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Cards--masonryMd6 {
column-count: 2;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Cards--masonryMd12 {
column-count: 1;
}
2019-04-30 11:11:25 +08:00
}
@include media-breakpoint-up(lg) {
2019-12-06 09:58:08 +08:00
.#{$ns}Cards--masonryLg1 {
column-count: 12;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Cards--masonryLg2 {
column-count: 6;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Cards--masonryLg3 {
column-count: 4;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Cards--masonryLg4 {
column-count: 3;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Cards--masonryLg6 {
column-count: 2;
}
2019-12-06 09:58:08 +08:00
.#{$ns}Cards--masonryLg12 {
column-count: 1;
}
}