118 lines
1.7 KiB
Sass
Raw Normal View History

.card-deck
// Custom, as of bootstrap 4.1.3 there is no way to do this.
2018-09-11 17:45:33 +02:00
&.card-deck-responsive
2018-09-11 15:14:51 +02:00
@extend .row
.card
2018-09-11 15:14:51 +02:00
@extend .col-md-3
+media-xs
flex: 1 0 50%
max-width: 50%
+media-sm
flex: 1 0 33%
max-width: 33%
+media-md
flex: 1 0 25%
max-width: 25%
+media-lg
flex: 1 0 20%
max-width: 20%
2018-09-15 05:50:10 +02:00
&.card-deck-vertical
2018-09-12 19:00:16 +02:00
@extend .flex-column
flex-wrap: initial
.card
@extend .w-100
@extend .flex-row
flex: initial
max-width: 100%
.card-img-top
@extend .rounded-0
.embed-responsive
@extend .mr-2
max-width: 120px
.card-body
@extend .overflow-hidden
.card-padless
.card
2018-09-11 15:14:51 +02:00
@extend .border-0
.card-body
2018-09-11 15:14:51 +02:00
@extend .px-0
2018-09-11 15:14:51 +02:00
.card-image-fade
&:hover
2018-09-11 15:14:51 +02:00
.card-img-top
opacity: .9
.card.asset
color: $color-text
2018-09-11 15:14:51 +02:00
&:hover
text-decoration: none
&.free
overflow: hidden
&:after
+ribbon
content: 'FREE'
padding: 2px 50px
.card-body
2018-09-11 15:14:51 +02:00
position: relative // for placing the progress
.card-text
font-size: $font-size-xs
.card-img-top
2018-09-11 15:14:51 +02:00
background-color: $color-background
background-size: cover
background-position: center
2018-09-11 15:14:51 +02:00
2018-09-11 19:45:42 +02:00
$card-progress-height: 5px
2018-09-11 15:14:51 +02:00
.progress
2018-09-11 19:45:42 +02:00
height: $card-progress-height
2018-09-11 15:14:51 +02:00
position: absolute
2018-09-11 19:45:42 +02:00
top: -$card-progress-height
2018-09-11 15:14:51 +02:00
width: 100%
.card-img-top
&.card-icon
display: flex
align-items: center
justify-content: center
font-size: 2em
i
opacity: .2
/* Tiny label for cards. e.g. 'WATCHED' on videos. */
.card-label
background-color: rgba($black, .5)
border-radius: 3px
color: $white
display: block
font-size: $font-size-xxs
left: 5px
top: -27px // enough to be above the progress-bar
position: absolute
padding: 1px 5px
z-index: 1
2018-09-12 19:00:16 +02:00
.card
&.active
.card-title
color: $primary