@lyra/components
Version:
Basic UX components
169 lines (141 loc) • 2.72 kB
CSS
@import 'part:@lyra/base/theme/variables-style';
:root {
--placeholder-gradient: linear-gradient(
90deg,
color(var(--text-color) a(10%)),
color(var(--text-color) a(5%)) 10%,
color(var(--text-color) a(10%))
);
}
.root {
display: block;
max-width: 100%;
position: relative;
}
.heading {
display: flex;
justify-content: space-between;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.title {
composes: heading5 from 'part:@lyra/base/theme/typography/headings-style';
composes: ellipsis;
text-transform: none;
color: inherit;
margin: 0;
padding: 0 ;
min-width: 0;
line-height: 1.3em;
}
.subtitle {
font-size: 0.75em;
text-transform: none;
font-weight: 300;
margin: 0;
padding: 0;
margin-bottom: 0.5em;
color: inherit;
}
.date {
margin-left: auto;
text-align: right;
flex-grow: 1;
}
.mediaContainer {
display: block;
background-color: var(--preview-placeholder-text-color);
}
.media {
position: relative;
width: 100%;
overflow: hidden;
background-image: var(--placeholder-gradient);
@nest & img {
display: block;
width: 100%;
height: auto;
}
}
.mediaString {
composes: absoluteCenter from 'part:@lyra/base/theme/layout/positioning-style';
padding: 5px;
font-size: var(--font-size-small);
color: var(--gray);
}
.mediaPadding {
position: relative;
}
.mediaContent {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
.mediaContentRelative {
position: relative;
}
.description {
font-size: var(--font-size-xsmall);
color: inherit;
font-weight: 400;
padding: 0;
margin: 0;
}
.meta {
margin: 1em;
background-color: inherit;
}
.img {
display: block;
width: 100%;
height: auto;
}
.imgLandscape {
composes: img;
}
.imgPortrait {
composes: img;
}
.placeholder {
composes: root;
position: relative;
@nest & .media {
background-image: var(--placeholder-gradient);
}
@nest & .meta {
position: relative;
}
@nest & .title {
background-image: var(--placeholder-gradient);
width: 70%;
height: 0.8em;
margin-bottom: 0.2em;
}
@nest & .subtitle {
background-image: var(--placeholder-gradient);
height: 1em;
}
@nest & .date {
background-image: var(--placeholder-gradient);
width: 4rem;
height: 0.8em;
margin-bottom: 0.2em;
}
@nest & .description_1 {
background-image: var(--placeholder-gradient);
width: calc(100% - 2rem);
height: 0.8em;
margin-bottom: 0.2em;
}
@nest & .description_2 {
background-image: var(--placeholder-gradient);
width: calc(50% - 2rem);
height: 0.8em;
margin-bottom: 0.2em;
}
}