components/sass/media/_index.scss

193 lines
2.6 KiB
SCSS
Raw Normal View History

// C O N T A I N E R S
.media-grid {
display: grid;
// set your own grid-gap
// example → grid-gap: var(--spacing-s);
// set your own grid-template
// example → @include create-grid(4);
.media {
width: 100%;
cursor: pointer;
vertical-align: top;
}
}
2018-11-29 00:36:23 +01:00
.media-list { // sass-lint:disable-line no-empty-rulesets
}
2018-11-29 00:36:23 +01:00
.media-row { // sass-lint:disable-line no-empty-rulesets
}
.media {
2018-11-29 00:36:23 +01:00
position: relative;
2018-12-06 18:48:18 +01:00
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
// M O D I F I E R S
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media--large {
display: flex;
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__info {
width: calc(100% - 20rem);
2018-12-31 21:10:58 +01:00
margin-left: var(--spacing-s);
}
2018-12-06 18:48:18 +01:00
.media__thumb {
width: 40rem;
2018-12-31 21:10:58 +01:00
margin-bottom: var(--spacing-s);
2018-12-06 18:48:18 +01:00
}
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media--placeholder {
> * {
@include placeholder;
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__channel,
.media__date,
.media__title {
min-height: 1rem;
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__channel {
width: 70%;
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__date {
width: 30%;
}
2018-12-06 18:48:18 +01:00
.media__title {
width: 100%;
}
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media--small {
display: flex;
justify-content: space-between;
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
&:not(:last-of-type) {
2018-12-31 21:10:58 +01:00
margin-bottom: var(--spacing-s);
2018-12-06 18:48:18 +01:00
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__info {
width: 50%;
2018-12-31 21:10:58 +01:00
padding-left: var(--spacing-s);
2018-12-06 18:48:18 +01:00
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__properties {
bottom: -1.5rem; left: calc(-100% - 1.5rem);
position: absolute;
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__thumb {
width: 50%;
2018-11-29 00:36:23 +01:00
}
2018-12-06 18:48:18 +01:00
.media__title {
height: 3rem;
line-height: 1.33;
}
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media--wide { // .media--search-result
display: flex;
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
&:not(:last-of-type) {
2018-12-31 21:10:58 +01:00
margin-bottom: var(--spacing-m);
2018-12-06 18:48:18 +01:00
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__info {
width: calc(100% - 20rem);
2018-12-31 21:10:58 +01:00
margin-left: var(--spacing-s);
2018-12-06 18:48:18 +01:00
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__properties {
bottom: -5.5rem; left: -20rem;
position: absolute;
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__text { // .media__subtext
2018-12-31 21:10:58 +01:00
padding-top: var(--spacing-s);
2018-12-06 18:48:18 +01:00
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__thumb {
width: 20rem;
}
2018-12-06 18:48:18 +01:00
.media__title {
font-size: 1.5rem;
}
}
2018-12-06 18:48:18 +01:00
// C H I L D R E N
2018-12-06 18:48:18 +01:00
.media__actions {
display: flex;
2018-12-31 21:10:58 +01:00
padding-top: var(--spacing-m);
padding-bottom: var(--spacing-m);
2018-12-06 18:48:18 +01:00
}
2018-12-06 18:48:18 +01:00
.media__content { // sass-lint:disable-line no-empty-rulesets
}
2018-12-06 18:48:18 +01:00
.media__date { // sass-lint:disable-line no-empty-rulesets
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__info {
word-wrap: break-word;
2018-12-06 18:48:18 +01:00
[data-mode="dark"] & {
border-color: rgba($lbry-gray-5, 0.2);
}
2018-12-06 18:48:18 +01:00
}
2018-12-06 18:48:18 +01:00
.media__message {
2018-12-31 21:10:58 +01:00
padding: var(--spacing-s);
2018-12-06 18:48:18 +01:00
white-space: normal;
}
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
.media__properties {
vertical-align: top;
2018-11-29 00:36:23 +01:00
2018-12-06 18:48:18 +01:00
> *:not(:last-child) {
2018-12-31 21:10:58 +01:00
margin-right: var(--spacing-xs);
}
2018-12-06 18:48:18 +01:00
&:not(:empty) {
display: inline-block;
}
2018-12-06 18:48:18 +01:00
}
2018-12-06 18:48:18 +01:00
.media__property { // sass-lint:disable-line no-empty-rulesets
}
2018-12-06 18:48:18 +01:00
.media__subtitle {
position: relative;
}
2018-12-06 18:48:18 +01:00
.media__text {
[data-mode="dark"] & {
color: $lbry-white;
}
2018-12-06 18:48:18 +01:00
}
2018-12-06 18:48:18 +01:00
.media__thumb {
@include thumbnail;
}
.media__title {
font-weight: 600;
white-space: normal;
}