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 | @include box-shadow($card-box-shadow);
|
17 |
|
18 | > hr {
|
19 | margin-right: 0;
|
20 | margin-left: 0;
|
21 | }
|
22 |
|
23 | > .list-group {
|
24 | border-top: inherit;
|
25 | border-bottom: inherit;
|
26 |
|
27 | &:first-child {
|
28 | border-top-width: 0;
|
29 | @include border-top-radius($card-inner-border-radius);
|
30 | }
|
31 |
|
32 | &:last-child {
|
33 | border-bottom-width: 0;
|
34 | @include border-bottom-radius($card-inner-border-radius);
|
35 | }
|
36 | }
|
37 |
|
38 |
|
39 |
|
40 | > .card-header + .list-group,
|
41 | > .list-group + .card-footer {
|
42 | border-top: 0;
|
43 | }
|
44 | }
|
45 |
|
46 | .card-body {
|
47 |
|
48 |
|
49 | flex: 1 1 auto;
|
50 | padding: $card-spacer-y $card-spacer-x;
|
51 | color: $card-color;
|
52 | }
|
53 |
|
54 | .card-title {
|
55 | margin-bottom: $card-title-spacer-y;
|
56 | }
|
57 |
|
58 | .card-subtitle {
|
59 | margin-top: -$card-title-spacer-y * .5;
|
60 | margin-bottom: 0;
|
61 | }
|
62 |
|
63 | .card-text:last-child {
|
64 | margin-bottom: 0;
|
65 | }
|
66 |
|
67 | .card-link {
|
68 | &:hover {
|
69 | text-decoration: if($link-hover-decoration == underline, none, null);
|
70 | }
|
71 |
|
72 | + .card-link {
|
73 | margin-left: $card-spacer-x;
|
74 | }
|
75 | }
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 | .card-header {
|
82 | padding: $card-cap-padding-y $card-cap-padding-x;
|
83 | margin-bottom: 0;
|
84 | color: $card-cap-color;
|
85 | background-color: $card-cap-bg;
|
86 | border-bottom: $card-border-width solid $card-border-color;
|
87 |
|
88 | &:first-child {
|
89 | @include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
|
90 | }
|
91 | }
|
92 |
|
93 | .card-footer {
|
94 | padding: $card-cap-padding-y $card-cap-padding-x;
|
95 | color: $card-cap-color;
|
96 | background-color: $card-cap-bg;
|
97 | border-top: $card-border-width solid $card-border-color;
|
98 |
|
99 | &:last-child {
|
100 | @include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius);
|
101 | }
|
102 | }
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 | .card-header-tabs {
|
110 | margin-right: -$card-cap-padding-x * .5;
|
111 | margin-bottom: -$card-cap-padding-y;
|
112 | margin-left: -$card-cap-padding-x * .5;
|
113 | border-bottom: 0;
|
114 |
|
115 | @if $nav-tabs-link-active-bg != $card-bg {
|
116 | .nav-link.active {
|
117 | background-color: $card-bg;
|
118 | border-bottom-color: $card-bg;
|
119 | }
|
120 | }
|
121 | }
|
122 |
|
123 | .card-header-pills {
|
124 | margin-right: -$card-cap-padding-x * .5;
|
125 | margin-left: -$card-cap-padding-x * .5;
|
126 | }
|
127 |
|
128 |
|
129 | .card-img-overlay {
|
130 | position: absolute;
|
131 | top: 0;
|
132 | right: 0;
|
133 | bottom: 0;
|
134 | left: 0;
|
135 | padding: $card-img-overlay-padding;
|
136 | @include border-radius($card-inner-border-radius);
|
137 | }
|
138 |
|
139 | .card-img,
|
140 | .card-img-top,
|
141 | .card-img-bottom {
|
142 | width: 100%;
|
143 | }
|
144 |
|
145 | .card-img,
|
146 | .card-img-top {
|
147 | @include border-top-radius($card-inner-border-radius);
|
148 | }
|
149 |
|
150 | .card-img,
|
151 | .card-img-bottom {
|
152 | @include border-bottom-radius($card-inner-border-radius);
|
153 | }
|
154 |
|
155 |
|
156 |
|
157 |
|
158 |
|
159 |
|
160 | .card-group {
|
161 |
|
162 |
|
163 | > .card {
|
164 | margin-bottom: $card-group-margin;
|
165 | }
|
166 |
|
167 | @include media-breakpoint-up(sm) {
|
168 | display: flex;
|
169 | flex-flow: row wrap;
|
170 |
|
171 |
|
172 | > .card {
|
173 |
|
174 | flex: 1 0 0%;
|
175 | margin-bottom: 0;
|
176 |
|
177 | + .card {
|
178 | margin-left: 0;
|
179 | border-left: 0;
|
180 | }
|
181 |
|
182 |
|
183 | @if $enable-rounded {
|
184 | &:not(:last-child) {
|
185 | @include border-end-radius(0);
|
186 |
|
187 | .card-img-top,
|
188 | .card-header {
|
189 |
|
190 | border-top-right-radius: 0;
|
191 | }
|
192 | .card-img-bottom,
|
193 | .card-footer {
|
194 |
|
195 | border-bottom-right-radius: 0;
|
196 | }
|
197 | }
|
198 |
|
199 | &:not(:first-child) {
|
200 | @include border-start-radius(0);
|
201 |
|
202 | .card-img-top,
|
203 | .card-header {
|
204 |
|
205 | border-top-left-radius: 0;
|
206 | }
|
207 | .card-img-bottom,
|
208 | .card-footer {
|
209 |
|
210 | border-bottom-left-radius: 0;
|
211 | }
|
212 | }
|
213 | }
|
214 | }
|
215 | }
|
216 | }
|