2019-11-05 12:49:13 +01:00
|
|
|
// Mixin and colors
|
|
|
|
|
2019-11-06 10:25:46 +01:00
|
|
|
$card-color-default: white;
|
|
|
|
|
|
|
|
@mixin card-self-contained() {
|
|
|
|
@include card-container();
|
|
|
|
background-color:$card-color-default;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin card-container() {
|
2019-11-05 13:24:51 +01:00
|
|
|
@include border-radius();
|
|
|
|
box-shadow: $large-shadow;
|
|
|
|
border: none;
|
2019-11-05 14:24:23 +01:00
|
|
|
margin-bottom: $baselinerem;
|
2019-11-06 10:25:46 +01:00
|
|
|
background-color:transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin card-element() {
|
|
|
|
border:0;
|
|
|
|
border-radius:0;
|
|
|
|
background-color:$card-color-default;
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
@include border-radius-top($border-radius);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
@include border-radius-bottom($border-radius);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:only-child {
|
|
|
|
@include border-radius();
|
|
|
|
}
|
2019-11-05 13:24:51 +01:00
|
|
|
}
|
|
|
|
|
2019-11-05 13:37:02 +01:00
|
|
|
@mixin card-relief {
|
2019-11-06 10:25:46 +01:00
|
|
|
.card-body:last-child {
|
|
|
|
box-shadow: $large-shadow, $inset-shadow;
|
|
|
|
}
|
|
|
|
|
2019-11-05 13:24:51 +01:00
|
|
|
box-shadow: $large-shadow, $inset-shadow;
|
|
|
|
}
|
|
|
|
|
2019-11-06 12:18:15 +01:00
|
|
|
// CARD COLORIZATION
|
|
|
|
|
|
|
|
@mixin colorize-card() {
|
|
|
|
@each $name, $color in list-colors() {
|
|
|
|
&-#{$name} { @include card-color(get-color($name), #FFF, #000); }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin card-color($background-color, $light-color, $dark-color) {
|
|
|
|
& > .card-header, & > .card-footer { @include background-color($background-color, $light-color, $dark-color); }
|
|
|
|
&.card-colored > .card-body { @include background-color($background-color, $light-color, $dark-color); }
|
|
|
|
}
|
|
|
|
|
|
|
|
// ALERT COLORIZATION
|
|
|
|
|
|
|
|
@mixin colorize-alert() {
|
|
|
|
@each $name, $color in list-colors() {
|
|
|
|
&-#{$name} { @include alert-color(get-color($name)); }
|
|
|
|
}
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin alert-color($background-color) {
|
|
|
|
background-color: lighten($background-color, 35%);
|
2019-11-06 12:18:15 +01:00
|
|
|
@if (luminance($background-color) > 128 * 0.8) {
|
|
|
|
color: darken($background-color, 70%);
|
|
|
|
a, .alert-link {
|
|
|
|
color:darken($background-color, 70%);
|
|
|
|
font-weight:bold;
|
|
|
|
}
|
|
|
|
} @else {
|
|
|
|
color: lighten($background-color, 80%);
|
|
|
|
a, .alert-link {
|
|
|
|
color:lighten($background-color, 85%);
|
|
|
|
font-weight:bold;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* 10.1 - Cards */
|
|
|
|
|
|
|
|
.card {
|
2019-11-06 10:25:46 +01:00
|
|
|
@include card-container();
|
2019-11-05 12:49:13 +01:00
|
|
|
|
2019-11-05 13:24:51 +01:00
|
|
|
h1, h2, h3, h4, h5, h6, h7, h8, h9, h10 {
|
|
|
|
color:#333;
|
|
|
|
text-shadow: 0px 0px 0px rgba(0, 0, 0, 0);
|
|
|
|
}
|
2019-11-06 12:18:15 +01:00
|
|
|
|
|
|
|
@include colorize-card();
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|
|
|
|
|
2019-11-06 10:25:46 +01:00
|
|
|
.card-body {
|
|
|
|
@include card-element();
|
|
|
|
}
|
|
|
|
|
2019-11-05 12:49:13 +01:00
|
|
|
/* 10.1.1 - Headers */
|
|
|
|
|
2019-11-06 10:25:46 +01:00
|
|
|
.card-header, .card-footer {
|
|
|
|
@include card-element();
|
2019-11-05 13:24:51 +01:00
|
|
|
@include borders();
|
|
|
|
font-size:1.1em;
|
|
|
|
box-shadow: $inset-relief;
|
|
|
|
text-shadow: 0px 1px 1px rgba(0,0,0,0.3);
|
2019-11-05 12:49:13 +01:00
|
|
|
font-weight:600;
|
2019-11-05 13:24:51 +01:00
|
|
|
border-radius: 0;
|
|
|
|
|
|
|
|
h1, h2, h3, h4, h5, h6, h7, h8, h9, h10 {
|
|
|
|
font-size:1em;
|
|
|
|
text-shadow: 0px -1px 0px rgba(0,0,0,0.3);
|
|
|
|
padding:0px;
|
|
|
|
margin:0px;
|
|
|
|
color:#FFF;
|
|
|
|
font-weight:600;
|
|
|
|
line-height:1.5em;
|
|
|
|
}
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* 10.1.2 - Meta */
|
|
|
|
|
|
|
|
.card-meta {
|
2019-11-06 10:25:46 +01:00
|
|
|
padding:1em;
|
|
|
|
@include card-element();
|
2019-11-05 12:49:13 +01:00
|
|
|
border-bottom: $border-size solid rgba(0,0,0,0.2);
|
|
|
|
|
|
|
|
&.media {
|
|
|
|
-ms-flex-align: center !important;
|
|
|
|
align-items: center !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.media-left .media-object {
|
|
|
|
height: 64px;
|
|
|
|
width: 64px;
|
|
|
|
border-radius: 10px;
|
2019-11-05 14:24:23 +01:00
|
|
|
margin-right: $baselinerem;
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
author {
|
|
|
|
display:block;
|
|
|
|
font-weight:600;
|
|
|
|
}
|
|
|
|
|
|
|
|
time {
|
|
|
|
display:block;
|
|
|
|
font-style:italic;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 10.1.3 - Lists */
|
|
|
|
|
2019-11-06 10:25:46 +01:00
|
|
|
.list-group {
|
|
|
|
@include card-element();
|
|
|
|
}
|
|
|
|
|
2019-11-05 12:49:13 +01:00
|
|
|
.list-group-item {
|
|
|
|
border: none;
|
|
|
|
background-color:transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
a.list-group-item:hover {
|
|
|
|
border-style:none;
|
|
|
|
border-width:0px;
|
|
|
|
border-radius:0px;
|
|
|
|
background-color:rgba(0,0,0,0.1);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 10.2 - Breadcrumb */
|
|
|
|
|
|
|
|
.breadcrumb {
|
2019-11-05 13:24:51 +01:00
|
|
|
@include card-relief();
|
2019-11-05 12:49:13 +01:00
|
|
|
@include li-no-margin();
|
2019-11-05 13:24:51 +01:00
|
|
|
background-color:#eeeeec;
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* 10.3 - Alerts */
|
|
|
|
|
|
|
|
.alert {
|
2019-11-06 10:25:46 +01:00
|
|
|
@include card-self-contained();
|
2019-11-05 12:49:13 +01:00
|
|
|
color:rgba(0, 0, 0, 0.7);
|
|
|
|
|
2019-11-06 12:18:15 +01:00
|
|
|
@include colorize-alert();
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|