holakit
Version:
Yet another design-driven UI component set.
65 lines (50 loc) • 2.02 kB
CSS
/*
Basic Card
Card components are blocks by default. We don't suggest using them as inlines or
inline-blocks. Normally you would just wrap cards in card stack or get them in
layouts so they won't get too wide. In some cases you want to wrap cards directly
in containers: Fine, but don't do it every where, since cards can be too wide for
desktop users. In the following example page, we explictly get a max width for
demostration purpose.
Cards can't be too narrow too; Because we have great padding around cards, if you
get 4 or more columns in a container, the whole page may looks too messy, and
lines in each column will be too short for a comfortable reading experience.
Of course titles are accepted in cards and you will use them frequently. We also
get head images for cards, and even pure image cards. Go ahead and make your app
vivid.
We have patched cards for being used in links; Feel free to use them as
clickable items, but don't use them as buttons. For example, you can use linked
cards as article items in a list page of blog, but don't use a card titled "Click
Here" as an action button. Card always contains some actual data, instead of pure
commands / verbs.
Markup: card.html
Styleguide Components - Cards - Basic
*/
.hola-card {
padding: var(--hola-card-padding);
background: #fff;
box-shadow: 0 0 25px rgba(0, 0, 0, 0.1);
color: var(--hola-text-dark-color);
background-size: cover;
background-position: center;
}
a .hola-card * {
text-decoration: none;
color: inherit;
}
.hola-card p {
line-height: 22px;
}
.hola-card-title {
margin-bottom: var(--hola-element-gap);
}
.hola-card.hola-card-with-image .hola-image:first-child {
margin: calc(0rem - var(--hola-card-padding))
calc(0rem - var(--hola-card-padding)) 2rem
calc(0rem - var(--hola-card-padding));
width: calc(100% + 2 * var(--hola-card-padding));
}
.hola-card.hola-card-full-image img {
margin: calc(0rem - var(--hola-card-padding));
width: calc(100% + 2 * var(--hola-card-padding));
}