.card { background-color: $white; border-radius: 2px; box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06), 0 0 3px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.18); display: block; display: flex; margin-top: $margin-md; margin-bottom: $margin-md; position: relative; &[href]:focus, &[href]:hover { text-decoration: none; } .card-wrap & { margin-top: 0; } } // colour @each $color in $palette-list-class { $i: index($palette-list-class, $color); .card-#{$color} { background-color: nth($palette-list-color, $i); color: nth($palette-list-text, $i); a, a:focus, a:hover { color: inherit; } } } .card-action { border-top: 1px solid $black-divider; min-height: $nav-height; position: relative; @include clearfix(); &:first-child { border-top: 0; } } .card-action-btn { margin: (($nav-height - $btn-height) / 2) ($grid-gutter / 2); white-space: nowrap; .btn + .btn { margin-left: ($grid-gutter / 2); } } .card-header { border-bottom: 1px solid $black-divider; display: flex; min-height: $header-height; position: relative; &:last-child { border-bottom: 0; } } .card-header-side { min-width: 0; padding-top: (($header-height - $line-height) / 2); padding-bottom: (($header-height - $line-height) / 2); &.pull-left { order: -1; padding-left: $grid-gutter; } &.pull-right { order: 1; padding-right: $grid-gutter; } } .card-heading { display: block; font-size: $font-size-h4; line-height: $line-height-h4; margin-top: $margin-md; margin-bottom: $margin-md; .card-header & { margin-top: 0; margin-bottom: 0; } } .card-img { display: block; overflow: hidden; position: relative; &:first-child { border-radius: 2px 2px 0 0; } &:last-child { border-radius: 0 0 2px 2px; } img { display: block; height: auto; margin-right: auto; margin-left: auto; } } .card-img-heading { background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5)); color: $white-text-solid; font-size: $font-size-h4; line-height: $line-height-h4; margin: 0; padding: $margin-sm $grid-gutter; position: absolute; bottom: 0; left: 0; width: 100%; } .card-inner { margin: $margin-md $grid-gutter; min-width: 0; position: relative; .card-header & { flex: 1; font-size: $font-size-h5; line-height: $line-height-h5; margin-top: (($header-height - $line-height-h5) / 2); margin-bottom: (($header-height - $line-height-h5) / 2); } } .card-main { flex: 1; min-width: 0; } .card-side { background-color: $offwhite-solid; border-radius: 2px 0 0 2px; max-width: 33.33333%; padding-right: $grid-gutter; padding-left: $grid-gutter; &[href] { color: inherit; &:focus, &:hover { text-decoration: none; } } &.card-side-img { overflow: hidden; padding-right: 0; padding-left: 0; } &.pull-right { border-radius: 0 2px 2px 0; order: 1; } } // colour @each $color in $palette-list-class { $i: index($palette-list-class, $color); .card-#{$color} .card-side { background-color: nth($palette-list-dark, $i); color: nth($palette-list-text-dark, $i); } } .card-wrap { margin-top: $margin-md; margin-bottom: ($margin-md * -1); @include clearfix(); }