bulma/sass/components/card.sass

102 lines
3.2 KiB
Sass
Raw Normal View History

2020-08-15 12:25:39 +00:00
$card-color: var(--text, #{$text}) !default
$card-background-color: var(--scheme-main, #{$scheme-main}) !default
$card-shadow-color: rgba(var(--scheme-invert-rgb, #{bulmaToRGB($black)}), 0.1) !default
$card-shadow-color-bis: rgba(var(--scheme-invert-rgb, #{bulmaToRGB($black)}), 0.02) !default
$card-shadow: 0 0.5em 1em -0.125em $card-shadow-color, 0 0px 0 1px $card-shadow-color-bis !default
$card-radius: 0 !default
2017-07-13 18:44:35 +00:00
$card-header-background-color: transparent !default
2020-08-15 12:25:39 +00:00
$card-header-color: var(--text-strong, #{$text-strong}) !default
2019-09-19 17:08:42 +00:00
$card-header-padding: 0.75rem 1rem !default
2020-08-15 12:25:39 +00:00
$card-header-shadow-color: rgba(var(--scheme-invert-rgb, #{bulmaToRGB($black)}), 0.1) !default
$card-header-shadow: 0 0.125em 0.25em $card-header-shadow-color !default
$card-header-weight: var(--weight-bold, #{$weight-bold}) !default
2017-07-13 18:44:35 +00:00
$card-content-background-color: transparent !default
2019-05-17 12:50:39 +00:00
$card-content-padding: 1.5rem !default
$card-footer-background-color: transparent !default
2019-09-19 17:08:42 +00:00
$card-footer-border-top: 1px solid $border-light !default
2019-05-17 12:50:39 +00:00
$card-footer-padding: 0.75rem !default
2020-08-15 12:25:39 +00:00
$card-media-margin: var(--block-spacing, #{$block-spacing}) !default
2017-07-13 18:44:35 +00:00
.card
2020-08-15 12:25:39 +00:00
--card-background-color: #{$card-background-color}
--card-shadow: #{$card-shadow}
--card-color: #{$card-color}
--card-radius: #{$card-radius}
--card-header-background-color: #{$card-header-background-color}
--card-header-shadow: #{$card-header-shadow}
--card-header-color: #{$card-header-color}
--card-header-weight: #{$card-header-weight}
--card-header-padding: #{$card-header-padding}
--card-header-padding: #{$card-header-padding}
--card-content-background-color: #{$card-content-background-color}
--card-content-padding: #{$card-content-padding}
--card-footer-background-color: #{$card-footer-background-color}
--card-footer-border-top: #{$card-footer-border-top}
--card-footer-padding: #{$card-footer-padding}
--card-media-margin: #{$card-media-margin}
background-color: var(--card-background-color)
box-shadow: var(--card-shadow)
color: var(--card-color)
2017-07-13 18:44:35 +00:00
max-width: 100%
position: relative
2020-08-15 12:25:39 +00:00
border-radius: var(--card-radius)
overflow: hidden
2017-07-13 18:44:35 +00:00
2016-03-25 13:38:40 +00:00
.card-header
2020-08-15 12:25:39 +00:00
background-color: var(--card-header-background-color)
2016-03-25 13:38:40 +00:00
align-items: stretch
2020-08-15 12:25:39 +00:00
box-shadow: var(--card-header-shadow)
2016-03-25 13:38:40 +00:00
display: flex
.card-header-title
2016-10-30 17:35:39 +00:00
align-items: center
2020-08-15 12:25:39 +00:00
color: var(--card-header-color)
2016-03-25 13:38:40 +00:00
display: flex
2016-07-31 10:45:56 +00:00
flex-grow: 1
2020-08-15 12:25:39 +00:00
font-weight: var(--card-header-weight)
padding: var(--card-header-padding)
2017-09-18 22:36:41 +00:00
&.is-centered
justify-content: center
2016-03-25 13:38:40 +00:00
.card-header-icon
align-items: center
2016-03-25 13:38:40 +00:00
cursor: pointer
display: flex
justify-content: center
2020-08-15 12:25:39 +00:00
padding: var(--card-header-padding)
2016-03-25 13:38:40 +00:00
2016-01-24 00:03:43 +00:00
.card-image
display: block
position: relative
.card-content
2020-08-15 12:25:39 +00:00
background-color: var(--card-content-background-color)
padding: var(--card-content-padding)
2016-01-24 00:03:43 +00:00
.card-footer
2020-08-15 12:25:39 +00:00
background-color: var(--card-footer-background-color)
border-top: var(--card-footer-border-top)
align-items: stretch
display: flex
.card-footer-item
2016-03-25 13:38:40 +00:00
align-items: center
display: flex
2016-12-23 12:45:52 +00:00
flex-basis: 0
2016-07-31 10:45:56 +00:00
flex-grow: 1
2016-10-30 17:35:39 +00:00
flex-shrink: 0
2016-03-25 13:38:40 +00:00
justify-content: center
2020-08-15 12:25:39 +00:00
padding: var(--card-footer-padding)
&:not(:last-child)
2020-01-22 09:14:04 +00:00
+ltr-property("border", $card-footer-border-top)
2017-07-13 18:44:35 +00:00
// Combinations
.card
.media:not(:last-child)
2020-08-15 12:25:39 +00:00
margin-bottom: var(--card-media-margin)