1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | $card-background: $white !default;
|
12 |
|
13 |
|
14 |
|
15 | $card-font-color: $body-font-color !default;
|
16 |
|
17 |
|
18 |
|
19 | $card-divider-background: $light-gray !default;
|
20 |
|
21 |
|
22 |
|
23 | $card-border: 1px solid $light-gray !default;
|
24 |
|
25 |
|
26 |
|
27 | $card-shadow: none !default;
|
28 |
|
29 |
|
30 |
|
31 | $card-border-radius: $global-radius !default;
|
32 |
|
33 |
|
34 |
|
35 | $card-padding: $global-padding !default;
|
36 |
|
37 |
|
38 |
|
39 | $card-margin-bottom: $global-margin !default;
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | @mixin card-container(
|
49 | $background: $card-background,
|
50 | $color: $card-font-color,
|
51 | $margin: $card-margin-bottom,
|
52 | $border: $card-border,
|
53 | $radius: $card-border-radius,
|
54 | $shadow: $card-shadow
|
55 | ) {
|
56 | @if $global-flexbox {
|
57 | display: flex;
|
58 | flex-direction: column;
|
59 | flex-grow: 1;
|
60 | }
|
61 |
|
62 | margin-bottom: $margin;
|
63 |
|
64 | border: $border;
|
65 | border-radius: $radius;
|
66 |
|
67 | background: $background;
|
68 | box-shadow: $shadow;
|
69 |
|
70 | overflow: hidden;
|
71 | color: $color;
|
72 |
|
73 | & > :last-child {
|
74 | margin-bottom: 0;
|
75 | }
|
76 | }
|
77 |
|
78 |
|
79 | @mixin card-divider(
|
80 | $background: $card-divider-background,
|
81 | $padding: $card-padding
|
82 | ) {
|
83 | @if $global-flexbox {
|
84 | flex: 0 1 auto;
|
85 | display: flex;
|
86 | }
|
87 |
|
88 | padding: $padding;
|
89 | background: $background;
|
90 |
|
91 | & > :last-child {
|
92 | margin-bottom: 0;
|
93 | }
|
94 | }
|
95 |
|
96 |
|
97 | @mixin card-section(
|
98 | $padding: $card-padding
|
99 | ) {
|
100 | @if $global-flexbox {
|
101 | flex: 1 0 auto;
|
102 | }
|
103 |
|
104 | padding: $padding;
|
105 |
|
106 | & > :last-child {
|
107 | margin-bottom: 0;
|
108 | }
|
109 | }
|
110 |
|
111 | @mixin foundation-card {
|
112 | .card {
|
113 | @include card-container;
|
114 | }
|
115 |
|
116 | .card-divider {
|
117 | @include card-divider;
|
118 | }
|
119 |
|
120 | .card-section {
|
121 | @include card-section;
|
122 | }
|
123 |
|
124 |
|
125 |
|
126 | .card-image {
|
127 | min-height: 1px;
|
128 | }
|
129 | }
|