2019-05-24 20:09:35 +08:00
|
|
|
@import './mixins/mixins.scss';
|
|
|
|
|
2019-11-13 00:02:42 +08:00
|
|
|
@mixin card-size-mixin ($size) {
|
|
|
|
@include m($size + '-size') {
|
|
|
|
@include m(content-segmented) {
|
2019-12-22 23:19:08 +08:00
|
|
|
& > {
|
|
|
|
@include e(content) {
|
2020-03-04 23:38:19 +08:00
|
|
|
padding-top: map-get($--n-card-margin-bottom, $size);
|
2019-11-13 00:02:42 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-11-15 17:44:43 +08:00
|
|
|
@include m(content-soft-segmented) {
|
2019-12-22 23:19:08 +08:00
|
|
|
& > {
|
|
|
|
@include e(content) {
|
2020-03-04 23:38:19 +08:00
|
|
|
padding-bottom: map-get($--n-card-margin-bottom, $size);
|
|
|
|
margin: 0 map-get($--n-card-margin-left, $size);
|
|
|
|
padding-top: map-get($--n-card-margin-bottom, $size);
|
2019-11-15 17:44:43 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-11-29 14:45:32 +08:00
|
|
|
@include m(footer-segmented) {
|
2019-12-22 23:19:08 +08:00
|
|
|
& > {
|
|
|
|
@include e(footer) {
|
2020-03-04 23:38:19 +08:00
|
|
|
padding-top: map-get($--n-card-margin-bottom, $size);
|
2019-11-13 00:02:42 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-11-29 14:45:32 +08:00
|
|
|
@include m(footer-soft-segmented) {
|
2019-12-22 23:19:08 +08:00
|
|
|
& > {
|
|
|
|
@include e(footer) {
|
2020-03-04 23:38:19 +08:00
|
|
|
padding-bottom: map-get($--n-card-margin-bottom, $size);
|
|
|
|
margin: 0 map-get($--n-card-margin-left, $size);
|
|
|
|
padding-top: map-get($--n-card-margin-bottom, $size);
|
2019-11-15 17:44:43 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-03-02 12:09:48 +08:00
|
|
|
& > {
|
|
|
|
@include b(card-header) {
|
2020-03-04 23:38:19 +08:00
|
|
|
padding:
|
|
|
|
map-get($--n-card-margin-top, $size)
|
|
|
|
map-get($--n-card-margin-left, $size)
|
|
|
|
map-get($--n-card-margin-bottom, $size)
|
|
|
|
map-get($--n-card-margin-left, $size);
|
2020-03-02 12:09:48 +08:00
|
|
|
@include e(main) {
|
|
|
|
font-size: map-get($--n-card-font-size, $size);
|
|
|
|
}
|
|
|
|
@include e(extra) {
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
2019-11-13 00:02:42 +08:00
|
|
|
}
|
2020-03-02 12:09:48 +08:00
|
|
|
@include e(content, footer) {
|
2020-03-04 23:38:19 +08:00
|
|
|
padding: 0 map-get($--n-card-margin-left, $size) map-get($--n-card-margin-bottom, $size) map-get($--n-card-margin-left, $size) ;
|
2020-03-02 12:09:48 +08:00
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
@include e(action) {
|
|
|
|
background-color: $--card-action-background-color;
|
|
|
|
padding: map-get($--n-card-margin-bottom, $size) map-get($--n-card-margin-left, $size);
|
2019-11-13 00:02:42 +08:00
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
}
|
2019-05-24 20:09:35 +08:00
|
|
|
}
|
2019-11-13 00:02:42 +08:00
|
|
|
}
|
2019-05-24 20:09:35 +08:00
|
|
|
|
2019-11-13 00:02:42 +08:00
|
|
|
@include themes-mixin {
|
|
|
|
@include b(card) {
|
2019-11-29 14:45:32 +08:00
|
|
|
@include once {
|
|
|
|
display: block;
|
2019-11-13 00:02:42 +08:00
|
|
|
width: 100%;
|
2019-11-29 14:45:32 +08:00
|
|
|
box-sizing: border-box;
|
|
|
|
position: relative;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier, background-color .3s $--n-ease-in-out-cubic-bezier, border-color .3s $--n-ease-in-out-cubic-bezier;
|
2020-02-28 22:57:10 +08:00
|
|
|
border-radius: $--n-card-border-radius;
|
2019-11-29 14:45:32 +08:00
|
|
|
@include card-size-mixin('small');
|
|
|
|
@include card-size-mixin('medium');
|
|
|
|
@include card-size-mixin('large');
|
|
|
|
@include card-size-mixin('huge');
|
|
|
|
@include b(card-cover) {
|
2020-03-04 23:38:19 +08:00
|
|
|
$border-radius: $--n-card-border-radius - 1px;
|
|
|
|
overflow: hidden;
|
|
|
|
border-radius: $border-radius $border-radius 0 0;
|
2019-11-13 00:02:42 +08:00
|
|
|
width: 100%;
|
2019-11-29 14:45:32 +08:00
|
|
|
img {
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
}
|
2019-11-13 00:02:42 +08:00
|
|
|
}
|
|
|
|
}
|
2019-11-29 14:45:32 +08:00
|
|
|
background-color: $--card-background-color;
|
|
|
|
color: $--card-text-color;
|
|
|
|
@include m(bordered) {
|
|
|
|
border: 1px solid $--card-border-color;
|
|
|
|
}
|
2019-12-22 23:19:08 +08:00
|
|
|
@include m(action-segmented) {
|
2020-01-27 20:00:39 +08:00
|
|
|
& > {
|
|
|
|
@include e(action) {
|
|
|
|
&:not(:first-child) {
|
|
|
|
border-top: 1px solid $--card-border-color;
|
|
|
|
}
|
2019-11-13 00:02:42 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-11-15 17:44:43 +08:00
|
|
|
@include m(content-segmented, content-soft-segmented) {
|
2020-01-27 20:00:39 +08:00
|
|
|
& > {
|
|
|
|
@include e(content) {
|
|
|
|
@include once {
|
|
|
|
transition: border-color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
}
|
|
|
|
&:not(:first-child) {
|
|
|
|
border-top: 1px solid $--card-border-color;
|
|
|
|
}
|
2019-11-13 00:02:42 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-11-29 14:45:32 +08:00
|
|
|
@include m(footer-segmented, footer-soft-segmented) {
|
2020-01-27 20:00:39 +08:00
|
|
|
& > {
|
|
|
|
@include e(footer) {
|
|
|
|
@include once {
|
|
|
|
transition: border-color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
}
|
|
|
|
&:not(:first-child) {
|
|
|
|
border-top: 1px solid $--card-border-color;
|
|
|
|
}
|
2019-11-13 00:02:42 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-02-13 20:24:09 +08:00
|
|
|
@include once {
|
|
|
|
& > {
|
|
|
|
@include e(content) {
|
|
|
|
box-sizing: border-box;
|
2020-02-22 14:11:34 +08:00
|
|
|
line-height: 1.75;
|
2020-02-13 20:24:09 +08:00
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
@include e(footer) {
|
|
|
|
box-sizing: border-box;
|
2020-02-22 14:11:34 +08:00
|
|
|
line-height: 1.75;
|
2020-02-13 20:24:09 +08:00
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-01-27 20:00:39 +08:00
|
|
|
& > {
|
|
|
|
@include b(card-header) {
|
2019-11-29 14:45:32 +08:00
|
|
|
@include once {
|
2020-01-27 20:00:39 +08:00
|
|
|
box-sizing: border-box;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2019-11-29 14:45:32 +08:00
|
|
|
}
|
2020-01-27 20:00:39 +08:00
|
|
|
@include e(main) {
|
|
|
|
@include once {
|
2020-02-27 23:02:58 +08:00
|
|
|
font-weight: $--n-strong-weight;
|
2020-01-27 20:00:39 +08:00
|
|
|
font-size: 18px;
|
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
color: $--card-title-text-color;
|
2019-11-29 14:45:32 +08:00
|
|
|
}
|
2020-01-27 20:00:39 +08:00
|
|
|
@include e(extra) {
|
|
|
|
@include once {
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 14px;
|
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
}
|
|
|
|
color: $--card-text-color;
|
|
|
|
}
|
|
|
|
@include e(close-mark) {
|
|
|
|
@include once {
|
|
|
|
cursor: pointer;
|
|
|
|
transition: fill .3s $--n-ease-in-out-cubic-bezier;
|
|
|
|
}
|
|
|
|
fill: $--card-close-fill;
|
2019-11-29 14:45:32 +08:00
|
|
|
}
|
2019-11-15 17:44:43 +08:00
|
|
|
}
|
2020-01-27 20:00:39 +08:00
|
|
|
@include e(action) {
|
|
|
|
@include once {
|
|
|
|
box-sizing: border-box;
|
|
|
|
transition: background-color .3s $--n-ease-in-out-cubic-bezier, border-color .3s $--n-ease-in-out-cubic-bezier;
|
2020-02-22 14:11:34 +08:00
|
|
|
line-height: 1.75;
|
2020-01-27 20:00:39 +08:00
|
|
|
font-size: 14px;
|
|
|
|
background-clip: padding-box;
|
|
|
|
}
|
|
|
|
background-color: $--card-action-background-color;
|
2019-11-29 14:45:32 +08:00
|
|
|
}
|
2019-11-13 00:02:42 +08:00
|
|
|
}
|
2019-05-24 20:09:35 +08:00
|
|
|
}
|
|
|
|
}
|