adding app/assets/sass/components/_card.scss
This commit is contained in:
parent
161d5a1353
commit
1e77c2650d
3 changed files with 82 additions and 0 deletions
|
|
@ -138,6 +138,13 @@ $list-group-item-border-color: $gray-light;
|
||||||
$list-group-hover-background: $gray-lightest;
|
$list-group-hover-background: $gray-lightest;
|
||||||
$list-group-item-active-background: $brand-color;
|
$list-group-item-active-background: $brand-color;
|
||||||
|
|
||||||
|
// ----------------------------------
|
||||||
|
// List group
|
||||||
|
// ----------------------------------
|
||||||
|
|
||||||
|
$card-border-color: $gray-light;
|
||||||
|
$card-header-background: $gray-lightest;
|
||||||
|
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// Shadows
|
// Shadows
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
@import "components/icon";
|
@import "components/icon";
|
||||||
@import "components/button";
|
@import "components/button";
|
||||||
@import "components/badge";
|
@import "components/badge";
|
||||||
|
@import "components/card";
|
||||||
@import "components/section";
|
@import "components/section";
|
||||||
@import "components/spacer";
|
@import "components/spacer";
|
||||||
@import "components/pagination";
|
@import "components/pagination";
|
||||||
|
|
|
||||||
74
app/assets/sass/components/_card.scss
Normal file
74
app/assets/sass/components/_card.scss
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------
|
||||||
|
// Base style.
|
||||||
|
// ----------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
.card {
|
||||||
|
border: 1px solid $card-border-color;
|
||||||
|
|
||||||
|
&-header,
|
||||||
|
&-body {
|
||||||
|
display: block;
|
||||||
|
padding: .5em 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Contextual colors
|
||||||
|
// ----------------------------------
|
||||||
|
|
||||||
|
&-header-default {
|
||||||
|
background-color: $card-header-background;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add border between header and body if they follow eachother.
|
||||||
|
&-header + &-body {
|
||||||
|
border-top: 1px solid $card-border-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Header link
|
||||||
|
// ----------------------------------
|
||||||
|
|
||||||
|
a.card-header,
|
||||||
|
.card-header-link {
|
||||||
|
cursor: pointer;
|
||||||
|
color: $list-group-item-color;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:active,
|
||||||
|
&:focus {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: $card-header-background;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------
|
||||||
|
// Layouts
|
||||||
|
// ----------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
// Accordion
|
||||||
|
// ----------------------------------
|
||||||
|
|
||||||
|
.card-accordion {
|
||||||
|
|
||||||
|
.card {
|
||||||
|
|
||||||
|
&-header {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-body {
|
||||||
|
border-top: 1px solid $card-border-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card:not(:first-of-type) {
|
||||||
|
border-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in a new issue