aboutsummaryrefslogtreecommitdiff
path: root/themes/hugo-pt2021/assets/bulma-0.9.3/sass/components/card.sass
blob: 73387f38ee242188e3a42b82ddc381246f2ce62e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
@import "../utilities/mixins"

$card-color: $text !default
$card-background-color: $scheme-main !default
$card-shadow: $shadow !default
$card-radius: 0.25rem !default

$card-header-background-color: transparent !default
$card-header-color: $text-strong !default
$card-header-padding: 0.75rem 1rem !default
$card-header-shadow: 0 0.125em 0.25em rgba($scheme-invert, 0.1) !default
$card-header-weight: $weight-bold !default

$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

.card
  background-color: $card-background-color
  border-radius: $card-radius
  box-shadow: $card-shadow
  color: $card-color
  max-width: 100%
  position: relative

%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

.card-header
  @extend %card-item
  background-color: $card-header-background-color
  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
  padding: $card-header-padding
  &.is-centered
    justify-content: center

.card-header-icon
  +reset
  align-items: center
  cursor: pointer
  display: flex
  justify-content: center
  padding: $card-header-padding

.card-image
  display: block
  position: relative
  &: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

.card-content
  @extend %card-item
  background-color: $card-content-background-color
  padding: $card-content-padding

.card-footer
  @extend %card-item
  background-color: $card-footer-background-color
  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
  padding: $card-footer-padding
  &:not(:last-child)
    +ltr-property("border", $card-footer-border-top)

// Combinations

.card
  .media:not(:last-child)
    margin-bottom: $card-media-margin