%main
%section.cards
%div.card
%div.content
%div.cover
%img(src="https://alistapart.com/d/_made/d/ALA_406_Axiomatic-Owls_1920_971_81.jpg")
%div.description
%h3.title Title of this element (which is getting longer and longer)
%p.meta Some description and some more words
%div.card
%div.content
%div.cover
%img(src="https://alistapart.com/d/_made/d/ALA_406_Axiomatic-Owls_1920_971_81.jpg")
%div.description
%h3.title Title of this element (which is getting longer and longer)
%p.meta Some description and some more words
%div.card
%div.content
%div.cover
%img(src="https://alistapart.com/d/_made/d/ALA_406_Axiomatic-Owls_1920_971_81.jpg")
%div.description
%h3.title Title of this element (which is getting longer and longer)
%p.meta Some description and some more words
%div.card
%div.content
%div.cover
%img(src="https://alistapart.com/d/_made/d/ALA_406_Axiomatic-Owls_1920_971_81.jpg")
%div.description
%h3.title Title of this element (which is getting longer and longer)
%p.meta Some description and some more words
%div.card
%div.content
%div.cover
%img(src="https://alistapart.com/d/_made/d/ALA_406_Axiomatic-Owls_1920_971_81.jpg")
%div.description
%h3.title Title of this element (which is getting longer and longer)
%p.meta Some description and some more words
%div.card
%div.content
%div.cover
%img(src="https://alistapart.com/d/_made/d/ALA_406_Axiomatic-Owls_1920_971_81.jpg")
%div.description
%h3.title Title of this element (which is getting longer and longer)
%p.meta Some description and some more words
%footer
View Compiled
$c_zumthor: #cfd2d8;
$c_glitter: #e8eef8;
$card_radius: .25rem;
$card-container-background: $c_zumthor;
$card-background: #f2f2f2;
@mixin unstyled-list {
list-style-type: none;
margin: 0;
padding: 0;
}
@mixin flex-row {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
}
@mixin flex-row-bar {
@include flex-row;
justify-content: space-between;
align-items: centered;
}
@mixin flex-row-centered {
@include flex-row;
justify-content: center;
align-items: centered;
}
@mixin flex-col {
display: flex;
flex-flow: column;
}
@mixin divider {
&::before {
display: block;
content: "";
width: calc(25vw - 2rem);
height: 0;
margin-top: 1rem;
padding-top: 1.6rem;
border-top: 0.4rem solid;
}
}
html , body {
font-size: 2vw;
box-sizing: border-box;
font-family: system, -apple-system, 'Helvetica Neue', sans-serif;
}
*, *::before, *::after {
box-sizing: inherit;
}
body {
display: flex;
flex-flow: column;
}
.cards {
display: flex;
flex-flow: row wrap;
// justify-content: center;
align-content: flex-start;
background-color: $card-container-background;
padding: 1vw;
}
.card {
height: 0;
padding-bottom: 22%;
position: relative;
width: calc(100% / 4 - 2vw);
margin: 1vw;
border-radius: $card_radius;
border: .75px solid rgba(0,0,0,0.15);
box-shadow: 0px 3px 15px -5px rgba(0,0,0,0.15);
background-color: $card-background;
.content {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
border-radius: $card_radius;
display: flex;
flex-flow: column;
justify-content: flex-start;
overflow: hidden;
.cover {
height: auto;
overflow: hidden;
background-color: white;
img {
height: auto;
height: 20vmax;
margin-left: -10vmax;
}
}
.description {
@include flex-col;
background-color: rgba(255,255,255,0.15);
padding: 0.5rem;
margin: 0;
.title {
font-size: 1rem;
margin-top: 0;
margin-bottom: 0.25rem;
font-weight: 500;
}
.meta {
font-size: 0.83rem;
font-weight: 400;
margin: 0 0 0.25rem 0;
}
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.