2014-08-06 02:12:24 +02:00
|
|
|
//
|
|
|
|
// Base styles
|
|
|
|
//
|
|
|
|
|
|
|
|
.card {
|
|
|
|
position: relative;
|
2015-05-28 23:07:34 +02:00
|
|
|
margin-bottom: $card-spacer-y;
|
2015-08-20 13:59:42 +02:00
|
|
|
background-color: #fff;
|
2015-05-29 10:59:54 +02:00
|
|
|
border: $card-border-width solid $card-border-color;
|
2015-05-28 23:07:34 +02:00
|
|
|
@include border-radius($card-border-radius);
|
|
|
|
}
|
|
|
|
|
|
|
|
.card-block {
|
|
|
|
padding: $card-spacer-x;
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
2015-05-28 23:07:34 +02:00
|
|
|
|
2014-08-06 02:12:24 +02:00
|
|
|
.card-title {
|
2015-05-28 23:07:34 +02:00
|
|
|
margin-bottom: $card-spacer-y;
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
2015-05-28 23:07:34 +02:00
|
|
|
|
|
|
|
.card-subtitle {
|
|
|
|
margin-top: -($card-spacer-y / 2);
|
2014-08-06 02:12:24 +02:00
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2015-05-28 23:07:34 +02:00
|
|
|
|
|
|
|
.card-text:last-child {
|
|
|
|
margin-bottom: 0;
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
2015-05-28 23:07:34 +02:00
|
|
|
|
|
|
|
// .card-actions {
|
|
|
|
// padding: $card-spacer-y $card-spacer-x;
|
|
|
|
|
|
|
|
// .card-link + .card-link {
|
|
|
|
// margin-left: $card-spacer-x;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
2015-01-01 10:05:01 +01:00
|
|
|
.card-link {
|
|
|
|
@include hover {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
2014-08-06 02:12:24 +02:00
|
|
|
|
2015-05-28 23:07:34 +02:00
|
|
|
+ .card-link {
|
|
|
|
margin-left: $card-spacer-x;
|
|
|
|
}
|
|
|
|
}
|
2014-08-06 02:12:24 +02:00
|
|
|
|
2015-05-28 23:07:34 +02:00
|
|
|
@if $enable-rounded {
|
|
|
|
.card {
|
|
|
|
> .list-group:first-child {
|
|
|
|
.list-group-item:first-child {
|
|
|
|
border-radius: $card-border-radius $card-border-radius 0 0;
|
|
|
|
}
|
|
|
|
}
|
2014-08-06 02:12:24 +02:00
|
|
|
|
2015-05-28 23:07:34 +02:00
|
|
|
> .list-group:last-child {
|
|
|
|
.list-group-item:last-child {
|
|
|
|
border-radius: 0 0 $card-border-radius $card-border-radius;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-05-28 04:00:11 +02:00
|
|
|
//
|
2015-05-28 23:07:34 +02:00
|
|
|
// Optional textual caps
|
2015-05-28 04:00:11 +02:00
|
|
|
//
|
|
|
|
|
2015-05-28 23:07:34 +02:00
|
|
|
.card-header {
|
|
|
|
padding: $card-spacer-y $card-spacer-x;
|
2015-05-29 10:59:54 +02:00
|
|
|
background-color: $card-cap-bg;
|
|
|
|
border-bottom: $card-border-width solid $card-border-color;
|
2015-05-28 04:00:11 +02:00
|
|
|
|
2015-05-28 23:07:34 +02:00
|
|
|
&:first-child {
|
2015-05-29 10:59:54 +02:00
|
|
|
@include border-radius($card-border-radius-inner $card-border-radius-inner 0 0);
|
2015-05-28 23:07:34 +02:00
|
|
|
}
|
2015-05-28 04:00:11 +02:00
|
|
|
}
|
|
|
|
|
2015-05-28 23:07:34 +02:00
|
|
|
.card-footer {
|
|
|
|
padding: $card-spacer-y $card-spacer-x;
|
2015-05-29 10:59:54 +02:00
|
|
|
background-color: $card-cap-bg;
|
|
|
|
border-top: $card-border-width solid $card-border-color;
|
2015-05-28 23:07:34 +02:00
|
|
|
|
|
|
|
&:last-child {
|
2015-05-29 10:59:54 +02:00
|
|
|
@include border-radius(0 0 $card-border-radius-inner $card-border-radius-inner);
|
2015-05-28 23:07:34 +02:00
|
|
|
}
|
2015-05-28 04:00:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-08-06 02:12:24 +02:00
|
|
|
//
|
|
|
|
// Background variations
|
|
|
|
//
|
|
|
|
|
|
|
|
.card-primary {
|
2014-12-02 23:02:35 +01:00
|
|
|
background-color: $brand-primary;
|
|
|
|
border-color: $brand-primary;
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
.card-success {
|
2014-12-02 23:02:35 +01:00
|
|
|
background-color: $brand-success;
|
|
|
|
border-color: $brand-success;
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
.card-info {
|
2014-12-02 23:02:35 +01:00
|
|
|
background-color: $brand-info;
|
|
|
|
border-color: $brand-info;
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
.card-warning {
|
2014-12-02 23:02:35 +01:00
|
|
|
background-color: $brand-warning;
|
|
|
|
border-color: $brand-warning;
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
.card-danger {
|
2014-12-02 23:02:35 +01:00
|
|
|
background-color: $brand-danger;
|
|
|
|
border-color: $brand-danger;
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Inverse text within a card for use with dark backgrounds
|
|
|
|
//
|
|
|
|
|
|
|
|
.card-inverse {
|
|
|
|
.card-header,
|
|
|
|
.card-footer {
|
|
|
|
border-bottom: .075rem solid rgba(255,255,255,.2);
|
|
|
|
}
|
|
|
|
.card-header,
|
|
|
|
.card-footer,
|
|
|
|
.card-title,
|
|
|
|
.card-blockquote {
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
.card-link,
|
|
|
|
.card-text,
|
|
|
|
.card-blockquote > footer {
|
|
|
|
color: rgba(255,255,255,.65);
|
|
|
|
}
|
2015-01-01 10:05:01 +01:00
|
|
|
.card-link {
|
|
|
|
@include hover-focus {
|
|
|
|
color: #fff;
|
|
|
|
}
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Blockquote
|
|
|
|
//
|
|
|
|
|
|
|
|
.card-blockquote {
|
|
|
|
padding: 0;
|
|
|
|
margin-bottom: 0;
|
2014-12-11 21:05:29 +01:00
|
|
|
border-left: 0;
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Card image
|
|
|
|
.card-img {
|
2015-05-28 23:07:34 +02:00
|
|
|
// margin: -1.325rem;
|
2014-12-02 23:02:35 +01:00
|
|
|
@include border-radius(.25rem);
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
.card-img-overlay {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
padding: 1.25rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Card image caps
|
|
|
|
.card-img-top {
|
2014-12-02 23:02:35 +01:00
|
|
|
@include border-radius(.25rem .25rem 0 0);
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
.card-img-bottom {
|
2014-12-02 23:02:35 +01:00
|
|
|
@include border-radius(0 0 .25rem .25rem);
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Card set
|
|
|
|
//
|
|
|
|
|
2015-05-28 23:07:34 +02:00
|
|
|
@if $enable-flex {
|
2015-09-06 18:36:19 +02:00
|
|
|
@include media-breakpoint-up(sm) {
|
|
|
|
.card-deck {
|
|
|
|
display: flex;
|
|
|
|
flex-flow: row wrap;
|
|
|
|
margin-right: -.625rem;
|
|
|
|
margin-left: -.625rem;
|
|
|
|
|
|
|
|
.card {
|
|
|
|
flex: 1 0 0;
|
|
|
|
margin-right: .625rem;
|
|
|
|
margin-left: .625rem;
|
|
|
|
}
|
2015-05-28 23:07:34 +02:00
|
|
|
}
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
2015-05-28 23:07:34 +02:00
|
|
|
} @else {
|
2015-09-06 18:36:19 +02:00
|
|
|
@include media-breakpoint-up(sm) {
|
|
|
|
.card-deck {
|
|
|
|
display: table;
|
|
|
|
table-layout: fixed;
|
|
|
|
border-spacing: 1.25rem 0;
|
|
|
|
|
|
|
|
.card {
|
|
|
|
display: table-cell;
|
|
|
|
width: 1%;
|
|
|
|
vertical-align: top;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.card-deck-wrapper {
|
|
|
|
margin-right: -1.25rem;
|
|
|
|
margin-left: -1.25rem;
|
2015-05-28 23:07:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-08-06 02:12:24 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// Card groups
|
|
|
|
//
|
|
|
|
|
2015-09-06 18:36:19 +02:00
|
|
|
@include media-breakpoint-up(sm) {
|
|
|
|
.card-group {
|
2015-05-28 19:37:12 +02:00
|
|
|
@if $enable-flex {
|
2015-09-06 18:36:19 +02:00
|
|
|
display: flex;
|
|
|
|
flex-flow: row wrap;
|
2015-05-28 19:37:12 +02:00
|
|
|
} @else {
|
2015-09-06 18:36:19 +02:00
|
|
|
display: table;
|
|
|
|
width: 100%;
|
|
|
|
table-layout: fixed;
|
2015-05-28 19:37:12 +02:00
|
|
|
}
|
2014-08-06 02:12:24 +02:00
|
|
|
|
2015-09-06 18:36:19 +02:00
|
|
|
.card {
|
|
|
|
@if $enable-flex {
|
|
|
|
flex: 1 0 0;
|
|
|
|
} @else {
|
|
|
|
display: table-cell;
|
|
|
|
vertical-align: top;
|
|
|
|
}
|
2015-05-28 23:07:34 +02:00
|
|
|
|
2015-09-06 18:36:19 +02:00
|
|
|
+ .card {
|
|
|
|
margin-left: 0;
|
|
|
|
border-left: 0;
|
2015-05-28 23:07:34 +02:00
|
|
|
}
|
2015-09-06 18:36:19 +02:00
|
|
|
|
|
|
|
// Handle rounded corners
|
|
|
|
@if $enable-rounded {
|
|
|
|
&:first-child {
|
|
|
|
.card-img-top {
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
}
|
|
|
|
.card-img-bottom {
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
}
|
2015-05-28 23:07:34 +02:00
|
|
|
}
|
2015-09-06 18:36:19 +02:00
|
|
|
&:last-child {
|
|
|
|
.card-img-top {
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
}
|
|
|
|
.card-img-bottom {
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
}
|
2015-05-28 23:07:34 +02:00
|
|
|
}
|
2015-05-29 10:59:54 +02:00
|
|
|
|
2015-09-06 18:36:19 +02:00
|
|
|
&:not(:first-child):not(:last-child) {
|
2015-05-29 10:59:54 +02:00
|
|
|
border-radius: 0;
|
2015-09-06 18:36:19 +02:00
|
|
|
|
|
|
|
.card-img-top,
|
|
|
|
.card-img-bottom {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
2015-05-29 10:59:54 +02:00
|
|
|
}
|
2015-05-28 23:07:34 +02:00
|
|
|
}
|
|
|
|
}
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Card
|
|
|
|
//
|
|
|
|
|
2015-09-06 18:36:19 +02:00
|
|
|
@include media-breakpoint-up(sm) {
|
|
|
|
.card-columns {
|
|
|
|
column-count: 3;
|
|
|
|
column-gap: 1.25rem;
|
2014-08-06 02:12:24 +02:00
|
|
|
|
2015-09-06 18:36:19 +02:00
|
|
|
.card {
|
|
|
|
display: inline-block;
|
|
|
|
width: 100%; // Don't let them exceed the column width
|
|
|
|
}
|
2014-08-06 02:12:24 +02:00
|
|
|
}
|
|
|
|
}
|