amis/scss/components/_cards.scss

189 lines
2.9 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();
padding: $Cards-toolbar-paddingY $Cards-toolbar-paddingX;
margin-bottom: $gap-base;
}
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: $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: $gap-xs 0;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-header {
padding: $Cards-toolbar-paddingY $Cards-toolbar-paddingX;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
> * + .#{$ns}Button,
> * + .#{$ns}ButtonGroup,
> * + .#{$ns}ButtonToolbar {
margin-left: $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: $white;
z-index: -1;
opacity: 0;
box-shadow: $Cards-fixedTop-boxShadow;
padding: $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: $Cards--unsaved-heading-bg;
color: $Cards--unsaved-heading-color;
padding: $gap-xs $gap-sm;
margin-bottom: $gap-sm;
}
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: $info;
2019-12-06 09:58:08 +08:00
clear: both;
margin-top: $gap-xs;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-placeholder {
background: $white;
color: $text--muted-color;
text-align: center;
height: $Cards-placeholder-height;
line-height: $Cards-placeholder-height;
2019-12-06 09:58:08 +08:00
border: $Card-borderWidth solid $Card-borderColor;
border-radius: $Card-borderRadius;
}
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;
}
}