| 1 |
/* |
| 2 |
Set images and videos to fit a certain way. |
| 3 |
*/ |
| 4 |
|
| 5 |
// Cover both height and width |
| 6 |
.embed-item-cover-xy{ |
| 7 |
object-fit: cover; |
| 8 |
height: 100%; |
| 9 |
} |
| 10 |
|
| 11 |
// give priority to width |
| 12 |
.embed-item-cover-x{ |
| 13 |
height: auto !important; |
| 14 |
} |
| 15 |
|
| 16 |
// give priority to height |
| 17 |
.embed-item-cover-y{ |
| 18 |
object-fit: contain; |
| 19 |
height: 100%; |
| 20 |
width: auto; |
| 21 |
max-width: none; |
| 22 |
} |
| 23 |
|
| 24 |
// Contain the image without distorting |
| 25 |
.embed-item-contain{ |
| 26 |
object-fit: contain; |
| 27 |
} |
| 28 |
|
| 29 |
|
| 30 |
// embed item has action |
| 31 |
.embed-has-action{ |
| 32 |
transition: all .3s ease-in-out; |
| 33 |
i,svg.svg-inline--fa{ |
| 34 |
position: absolute; |
| 35 |
top: 50%; |
| 36 |
left: 50%; |
| 37 |
transform: translate(-50%, -50%) scale(0.3); |
| 38 |
color: #fff; |
| 39 |
font-size: 1.5em; |
| 40 |
opacity: 0; |
| 41 |
transition: all .3s ease-in-out; |
| 42 |
} |
| 43 |
|
| 44 |
img{ |
| 45 |
filter: brightness(100%); |
| 46 |
transition: all .3s ease-in-out; |
| 47 |
} |
| 48 |
|
| 49 |
&:hover{ |
| 50 |
img{ |
| 51 |
filter: brightness(75%); |
| 52 |
transition: all .3s ease-in-out; |
| 53 |
} |
| 54 |
i,svg.svg-inline--fa{ |
| 55 |
opacity: 0.8; |
| 56 |
transform: translate(-50%, -50%) scale(1); |
| 57 |
transition: all .3s ease-in-out; |
| 58 |
} |
| 59 |
} |
| 60 |
} |