You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
2.8 KiB
CSS

5 years ago
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
color: #888;
font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-style: normal;
font-weight: 400;
letter-spacing: 0;
padding: 1rem;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-moz-font-feature-settings: "liga" on;
}
img {
height: auto;
max-width: 100%;
vertical-align: middle;
}
.btn {
background-color: #fff;
border: 1px solid #ccc;
color: #696969;
padding: 0.5rem;
text-transform: lowercase;
cursor: pointer;
transition: 0.3s;
border-radius: 0.4rem;
}
.btn:hover {
color: #fff;
background-color: #000;
}
.btn--block {
display: block;
width: 100%;
}
.cards {
display: -webkit-box;
display: flex;
flex-wrap: wrap;
list-style: none;
margin: 0;
padding: 0;
}
.cards__item {
display: -webkit-box;
display: flex;
padding: 1rem;
}
@media (min-width: 40rem) {
.cards__item {
width: 50%;
}
}
@media (min-width: 66rem) {
.cards__item {
width: 33.3333%;
}
}
@media (min-width: 80rem) {
.cards__item {
width: 25%;
}
}
.card {
background-color: #fff;
border-radius: 0.25rem;
box-shadow: 0 20px 40px -14px rgba(0,0,0,0.25);
display: -webkit-box;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
flex-direction: column;
overflow: hidden;
}
.card:hover .card__image {
-webkit-filter: contrast(100%);
filter: contrast(100%);
}
.card__content {
display: -webkit-box;
display: flex;
-webkit-box-flex: 1;
flex: 1 1 auto;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
flex-direction: column;
padding: 1rem;
}
.card__image {
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
filter: contrast(70%);
overflow: hidden;
position: relative;
transition: filter 0.5s cubic-bezier(0.43, 0.41, 0.22, 0.91);
}
.card__image::before {
content: "";
display: block;
padding-top: 56.25%;
}
@media (min-width: 40rem) {
.card__image::before {
padding-top: 66.6%;
}
}
.card__image--flowers {
background-image: url("https://dazedimg-dazedgroup.netdna-ssl.com/2000/azure/dazed-prod/1190/1/1191449.jpg");
}
.card__image--river {
background-image: url("https://cdn.instructables.com/FJH/KEM0/HG85C7F5/FJHKEM0HG85C7F5.LARGE.jpg?auto=webp&frame=1&width=2100");
}
.card__image--record {
background-image: url("/public/tile.jpg");
}
.card__image--fence {
background-image: url("https://www.filterforge.com/filters/12126.jpg");
}
.card__title {
color: #696969;
font-size: 1.25rem;
font-weight: 300;
letter-spacing: 2px;
text-transform: uppercase;
}
.card__text {
-webkit-box-flex: 1;
flex: 1 1 auto;
font-size: 0.875rem;
line-height: 1.5;
margin-bottom: 1.25rem;
}