@lyra/components
Version:
Basic UX components
144 lines (123 loc) • 2.44 kB
CSS
@import 'part:@lyra/base/theme/variables-style';
.root {
display: flex;
user-select: none;
height: 5em;
box-sizing: border-box;
max-width: 100%;
}
.top {
display: flex;
min-width: 0;
justify-content: space-between;
}
.heading {
display: block;
min-width: 0;
}
.content {
flex-grow: 1;
min-width: 0;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.title {
composes: base from 'part:@lyra/base/theme/typography/text-blocks-style';
composes: ellipsis;
color: inherit;
font-weight: 500;
text-transform: none;
margin: 0;
padding: 0;
min-width: 0;
}
.subtitle {
color: inherit;
margin: 0;
padding: 0;
margin-top: -0.25em;
font-size: 0.8em;
font-weight: 300;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.description {
padding: 0;
margin: 0;
margin-top: 0.25em;
font-size: 0.75em;
line-height: 1em;
overflow: hidden;
height: 2em;
}
.media {
flex-basis: 5em;
flex-grow: 1;
min-width: 5em;
width: 5em;
max-width: 5em;
overflow: hidden;
position: relative;
margin-right: var(--small-padding);
box-sizing: border-box;
background-color: var(--gray-lighter);
border: 1px solid color(var(--gray-lighter) lightness(-3%));
display: flex;
align-items: center;
justify-content: center;
@nest & > img {
display: block;
width: 5em;
height: 5em;
}
@nest & svg {
font-size: 3rem;
color: var(--gray);
}
}
.status {
color: var(--gray-darker-transparent);
}
.mediaString {
composes: absoluteCenter from 'part:@lyra/base/theme/layout/positioning-style';
padding: 5px;
font-size: var(--font-size-small);
color: var(--gray);
}
.placeholder {
composes: root;
@nest & .top {
flex-direction: column;
height: 100%;
}
@nest & .content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
}
@nest & .title {
width: 80%;
color: transparent;
background-color: var(--preview-placeholder-color);
}
@nest & .subtitle {
width: 70%;
color: transparent;
background-color: var(--preview-placeholder-color);
}
@nest & .description {
width: 90%;
color: transparent;
background-color: var(--preview-placeholder-color);
}
@nest & .media {
border-color: transparent;
color: transparent;
background-color: var(--preview-placeholder-color);
}
}