2021-02-15 07:50:28 +00:00
|
|
|
@import "../utilities/mixins"
|
|
|
|
|
2018-01-29 09:42:34 +00:00
|
|
|
$card-color: $text !default
|
2021-02-15 07:50:28 +00:00
|
|
|
$card-background-color: $scheme-main !default
|
2022-08-27 16:43:27 +00:00
|
|
|
$card-shadow: $shadow !default
|
2021-02-15 07:50:28 +00:00
|
|
|
$card-radius: 0.25rem !default
|
2018-01-29 09:42:34 +00:00
|
|
|
|
2021-02-15 07:50:28 +00:00
|
|
|
$card-header-background-color: transparent !default
|
2018-01-29 09:42:34 +00:00
|
|
|
$card-header-color: $text-strong !default
|
2021-02-15 07:50:28 +00:00
|
|
|
$card-header-padding: 0.75rem 1rem !default
|
|
|
|
$card-header-shadow: 0 0.125em 0.25em rgba($scheme-invert, 0.1) !default
|
2018-01-29 09:42:34 +00:00
|
|
|
$card-header-weight: $weight-bold !default
|
|
|
|
|
2021-02-15 07:50:28 +00:00
|
|
|
$card-content-background-color: transparent !default
|
|
|
|
$card-content-padding: 1.5rem !default
|
|
|
|
|
|
|
|
$card-footer-background-color: transparent !default
|
|
|
|
$card-footer-border-top: 1px solid $border-light !default
|
|
|
|
$card-footer-padding: 0.75rem !default
|
|
|
|
|
|
|
|
$card-media-margin: $block-spacing !default
|
2018-01-29 09:42:34 +00:00
|
|
|
|
|
|
|
.card
|
|
|
|
background-color: $card-background-color
|
2021-02-15 07:50:28 +00:00
|
|
|
border-radius: $card-radius
|
2018-01-29 09:42:34 +00:00
|
|
|
box-shadow: $card-shadow
|
|
|
|
color: $card-color
|
|
|
|
max-width: 100%
|
|
|
|
position: relative
|
|
|
|
|
2021-02-15 07:50:28 +00:00
|
|
|
%card-item
|
|
|
|
&:first-child
|
|
|
|
border-top-left-radius: $card-radius
|
|
|
|
border-top-right-radius: $card-radius
|
|
|
|
&:last-child
|
|
|
|
border-bottom-left-radius: $card-radius
|
|
|
|
border-bottom-right-radius: $card-radius
|
|
|
|
|
2018-01-29 09:42:34 +00:00
|
|
|
.card-header
|
2021-02-15 07:50:28 +00:00
|
|
|
@extend %card-item
|
|
|
|
background-color: $card-header-background-color
|
2018-01-29 09:42:34 +00:00
|
|
|
align-items: stretch
|
|
|
|
box-shadow: $card-header-shadow
|
|
|
|
display: flex
|
|
|
|
|
|
|
|
.card-header-title
|
|
|
|
align-items: center
|
|
|
|
color: $card-header-color
|
|
|
|
display: flex
|
|
|
|
flex-grow: 1
|
|
|
|
font-weight: $card-header-weight
|
2021-02-15 07:50:28 +00:00
|
|
|
padding: $card-header-padding
|
2018-01-29 09:42:34 +00:00
|
|
|
&.is-centered
|
|
|
|
justify-content: center
|
|
|
|
|
|
|
|
.card-header-icon
|
2022-08-27 16:43:27 +00:00
|
|
|
+reset
|
2018-01-29 09:42:34 +00:00
|
|
|
align-items: center
|
|
|
|
cursor: pointer
|
|
|
|
display: flex
|
|
|
|
justify-content: center
|
2021-02-15 07:50:28 +00:00
|
|
|
padding: $card-header-padding
|
2018-01-29 09:42:34 +00:00
|
|
|
|
|
|
|
.card-image
|
|
|
|
display: block
|
|
|
|
position: relative
|
2021-02-15 07:50:28 +00:00
|
|
|
&:first-child
|
|
|
|
img
|
|
|
|
border-top-left-radius: $card-radius
|
|
|
|
border-top-right-radius: $card-radius
|
|
|
|
&:last-child
|
|
|
|
img
|
|
|
|
border-bottom-left-radius: $card-radius
|
|
|
|
border-bottom-right-radius: $card-radius
|
2018-01-29 09:42:34 +00:00
|
|
|
|
|
|
|
.card-content
|
2021-02-15 07:50:28 +00:00
|
|
|
@extend %card-item
|
|
|
|
background-color: $card-content-background-color
|
|
|
|
padding: $card-content-padding
|
2018-01-29 09:42:34 +00:00
|
|
|
|
|
|
|
.card-footer
|
2021-02-15 07:50:28 +00:00
|
|
|
@extend %card-item
|
|
|
|
background-color: $card-footer-background-color
|
2018-01-29 09:42:34 +00:00
|
|
|
border-top: $card-footer-border-top
|
|
|
|
align-items: stretch
|
|
|
|
display: flex
|
|
|
|
|
|
|
|
.card-footer-item
|
|
|
|
align-items: center
|
|
|
|
display: flex
|
|
|
|
flex-basis: 0
|
|
|
|
flex-grow: 1
|
|
|
|
flex-shrink: 0
|
|
|
|
justify-content: center
|
2021-02-15 07:50:28 +00:00
|
|
|
padding: $card-footer-padding
|
2018-01-29 09:42:34 +00:00
|
|
|
&:not(:last-child)
|
2021-02-15 07:50:28 +00:00
|
|
|
+ltr-property("border", $card-footer-border-top)
|
2018-01-29 09:42:34 +00:00
|
|
|
|
|
|
|
// Combinations
|
|
|
|
|
|
|
|
.card
|
|
|
|
.media:not(:last-child)
|
2021-02-15 07:50:28 +00:00
|
|
|
margin-bottom: $card-media-margin
|