1 |
|
2 |
|
3 |
|
4 |
|
5 | .card {
|
6 | position: relative;
|
7 | display: flex;
|
8 | flex-direction: column;
|
9 | min-width: 0;
|
10 | height: $card-height;
|
11 | word-wrap: break-word;
|
12 | background-color: $card-bg;
|
13 | background-clip: border-box;
|
14 | border: $card-border-width solid $card-border-color;
|
15 | @include border-radius($card-border-radius);
|
16 |
|
17 | > hr {
|
18 | margin-right: 0;
|
19 | margin-left: 0;
|
20 | }
|
21 |
|
22 | > .list-group {
|
23 | border-top: inherit;
|
24 | border-bottom: inherit;
|
25 |
|
26 | &:first-child {
|
27 | border-top-width: 0;
|
28 | @include border-top-radius($card-inner-border-radius);
|
29 | }
|
30 |
|
31 | &:last-child {
|
32 | border-bottom-width: 0;
|
33 | @include border-bottom-radius($card-inner-border-radius);
|
34 | }
|
35 | }
|
36 | }
|
37 |
|
38 | .card-body {
|
39 |
|
40 |
|
41 | flex: 1 1 auto;
|
42 |
|
43 |
|
44 | min-height: 1px;
|
45 | padding: $card-spacer-x;
|
46 | color: $card-color;
|
47 | }
|
48 |
|
49 | .card-title {
|
50 | margin-bottom: $card-spacer-y;
|
51 | }
|
52 |
|
53 | .card-subtitle {
|
54 | margin-top: -$card-spacer-y / 2;
|
55 | margin-bottom: 0;
|
56 | }
|
57 |
|
58 | .card-text:last-child {
|
59 | margin-bottom: 0;
|
60 | }
|
61 |
|
62 | .card-link {
|
63 | @include hover() {
|
64 | text-decoration: none;
|
65 | }
|
66 |
|
67 | + .card-link {
|
68 | margin-left: $card-spacer-x;
|
69 | }
|
70 | }
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 | .card-header {
|
77 | padding: $card-spacer-y $card-spacer-x;
|
78 | margin-bottom: 0;
|
79 | color: $card-cap-color;
|
80 | background-color: $card-cap-bg;
|
81 | border-bottom: $card-border-width solid $card-border-color;
|
82 |
|
83 | &:first-child {
|
84 | @include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
|
85 | }
|
86 |
|
87 | + .list-group {
|
88 | .list-group-item:first-child {
|
89 | border-top: 0;
|
90 | }
|
91 | }
|
92 | }
|
93 |
|
94 | .card-footer {
|
95 | padding: $card-spacer-y $card-spacer-x;
|
96 | color: $card-cap-color;
|
97 | background-color: $card-cap-bg;
|
98 | border-top: $card-border-width solid $card-border-color;
|
99 |
|
100 | &:last-child {
|
101 | @include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius);
|
102 | }
|
103 | }
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 | .card-header-tabs {
|
111 | margin-right: -$card-spacer-x / 2;
|
112 | margin-bottom: -$card-spacer-y;
|
113 | margin-left: -$card-spacer-x / 2;
|
114 | border-bottom: 0;
|
115 | }
|
116 |
|
117 | .card-header-pills {
|
118 | margin-right: -$card-spacer-x / 2;
|
119 | margin-left: -$card-spacer-x / 2;
|
120 | }
|
121 |
|
122 |
|
123 | .card-img-overlay {
|
124 | position: absolute;
|
125 | top: 0;
|
126 | right: 0;
|
127 | bottom: 0;
|
128 | left: 0;
|
129 | padding: $card-img-overlay-padding;
|
130 | }
|
131 |
|
132 | .card-img,
|
133 | .card-img-top,
|
134 | .card-img-bottom {
|
135 | flex-shrink: 0;
|
136 | width: 100%;
|
137 | }
|
138 |
|
139 | .card-img,
|
140 | .card-img-top {
|
141 | @include border-top-radius($card-inner-border-radius);
|
142 | }
|
143 |
|
144 | .card-img,
|
145 | .card-img-bottom {
|
146 | @include border-bottom-radius($card-inner-border-radius);
|
147 | }
|
148 |
|
149 |
|
150 |
|
151 |
|
152 | .card-deck {
|
153 | .card {
|
154 | margin-bottom: $card-deck-margin;
|
155 | }
|
156 |
|
157 | @include media-breakpoint-up(sm) {
|
158 | display: flex;
|
159 | flex-flow: row wrap;
|
160 | margin-right: -$card-deck-margin;
|
161 | margin-left: -$card-deck-margin;
|
162 |
|
163 | .card {
|
164 |
|
165 | flex: 1 0 0%;
|
166 | margin-right: $card-deck-margin;
|
167 | margin-bottom: 0;
|
168 | margin-left: $card-deck-margin;
|
169 | }
|
170 | }
|
171 | }
|
172 |
|
173 |
|
174 |
|
175 |
|
176 |
|
177 |
|
178 | .card-group {
|
179 |
|
180 |
|
181 | > .card {
|
182 | margin-bottom: $card-group-margin;
|
183 | }
|
184 |
|
185 | @include media-breakpoint-up(sm) {
|
186 | display: flex;
|
187 | flex-flow: row wrap;
|
188 |
|
189 |
|
190 | > .card {
|
191 |
|
192 | flex: 1 0 0%;
|
193 | margin-bottom: 0;
|
194 |
|
195 | + .card {
|
196 | margin-left: 0;
|
197 | border-left: 0;
|
198 | }
|
199 |
|
200 |
|
201 | @if $enable-rounded {
|
202 | &:not(:last-child) {
|
203 | @include border-right-radius(0);
|
204 |
|
205 | .card-img-top,
|
206 | .card-header {
|
207 |
|
208 | border-top-right-radius: 0;
|
209 | }
|
210 | .card-img-bottom,
|
211 | .card-footer {
|
212 |
|
213 | border-bottom-right-radius: 0;
|
214 | }
|
215 | }
|
216 |
|
217 | &:not(:first-child) {
|
218 | @include border-left-radius(0);
|
219 |
|
220 | .card-img-top,
|
221 | .card-header {
|
222 |
|
223 | border-top-left-radius: 0;
|
224 | }
|
225 | .card-img-bottom,
|
226 | .card-footer {
|
227 |
|
228 | border-bottom-left-radius: 0;
|
229 | }
|
230 | }
|
231 | }
|
232 | }
|
233 | }
|
234 | }
|
235 |
|
236 |
|
237 |
|
238 |
|
239 |
|
240 |
|
241 | .card-columns {
|
242 | .card {
|
243 | margin-bottom: $card-columns-margin;
|
244 | }
|
245 |
|
246 | @include media-breakpoint-up(sm) {
|
247 | column-count: $card-columns-count;
|
248 | column-gap: $card-columns-gap;
|
249 | orphans: 1;
|
250 | widows: 1;
|
251 |
|
252 | .card {
|
253 | display: inline-block;
|
254 | width: 100%;
|
255 | }
|
256 | }
|
257 | }
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 | .accordion {
|
265 | > .card {
|
266 | overflow: hidden;
|
267 |
|
268 | &:not(:last-of-type) {
|
269 | border-bottom: 0;
|
270 | @include border-bottom-radius(0);
|
271 | }
|
272 |
|
273 | &:not(:first-of-type) {
|
274 | @include border-top-radius(0);
|
275 | }
|
276 |
|
277 | > .card-header {
|
278 | @include border-radius(0);
|
279 | margin-bottom: -$card-border-width;
|
280 | }
|
281 | }
|
282 | }
|