<h2>Card Horizontal</h2>
<article class="card -horizontal" style="max-width: 50rem;">
<h4 class="h4 card__title">Horizontal card</h4>
<div class="card__body">
<div>
<p>
Nunc lorem erat, molestie vel turpis eget, vehicula cursus leo ad litora torquent per conubia nostra, per inceptos himenaeos.
</p>
<p class="card__intro">
Nunc lorem erat, molestie vel turpis eget, vehicula cursus leo.
</p>
</div>
<a class="card__link" href="#">
Standalone Text Link
<svg viewBox="0 0 18 12"><use href="/main-icons-sprite.svg#arrow-right" /></svg>
</a>
</div>
</article>
<p>
To stack multiple horizontal cards, wrap them with the <code>cardList</code> molecule (see <code>molecules/cardList/cardList.html</code>).
</p>
@use '@/core' as *;
.card {
$b: &;
background-color: #ffffff;
border-radius: 1rem;
box-shadow: 0 0.25rem 0.5rem rgb(0 0 0 / 0.1);
display: flex;
flex-direction: column-reverse;
justify-content: flex-end;
overflow: hidden;
max-width: 100%;
&__imageWrapper {
aspect-ratio: 1.78;
overflow: hidden;
}
&__image {
@include image-fit(cover);
}
&__tagList {
list-style-type: none;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin-top: 0;
}
&__cta {
margin-top: auto;
display: flex;
width: 100%;
font-weight: 700;
}
&__meta {
color: var(--color-gray-500);
line-height: 1.5;
margin: 0;
}
&__metaLink {
text-underline-offset: 4px;
font-weight: 700;
}
&__metaIcon {
display: inline-block;
height: 1.25em;
width: 1.25em;
margin-right: 0.5em;
aspect-ratio: 1;
vertical-align: text-bottom;
}
.tag {
margin: 0;
}
&__title {
font-size: fluid-rems(1.5, 2);
margin: 0.5rem 0;
}
&__description {
color: var(--color-gray-600);
line-height: 1.5;
margin: 0;
}
&__content {
display: flex;
flex-direction: column;
align-items: flex-start;
padding: 1.5rem;
gap: 1rem;
height: 100%;
}
&__iconWrapper {
block-size: 6rem;
aspect-ratio: 1;
}
&__icon {
height: 100%;
}
&.-condensed {
#{$b}__description {
line-height: 1.5;
}
}
&.-flipped {
flex-direction: column;
}
&.-horizontal {
background: var(--root-background-color);
box-shadow: 0 1rem 4rem rgb(0 0 0 / 0.05);
display: grid;
gap: 1.5rem;
grid-template-columns: 1fr;
overflow: visible;
padding: 1.5rem 2rem;
@include at(md) {
align-items: start;
grid-template-columns: 300px 1fr;
}
#{$b}__title {
margin: 0;
min-width: 0;
}
#{$b}__body {
display: flex;
flex-direction: column;
gap: 1.5rem;
min-width: 0;
#{$b}__link {
font-weight: 700;
}
}
#{$b}__intro {
font-size: var(--root-font-size-sm);
margin: 0;
}
}
}