lbry-desktop/ui/scss/component/_media.scss
Rafael b3ed0027ff SwipeableDrawer improvements
Fix css stuf

Split mobile and small popout window styles

Fix failed logic that broke desktop player
2022-02-08 12:35:40 -05:00

180 lines
3.4 KiB
SCSS

// M E D I A
// T H U M B
.media__thumb {
@include thumbnail;
position: relative;
border-radius: var(--border-radius);
object-fit: cover;
background-color: var(--color-placeholder-background);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
// M E D I A
// T I T L E
.media__uri {
position: absolute;
transform: translateY(-130%);
display: flex;
font-size: var(--font-xsmall);
color: var(--color-text-subtitle);
font-weight: var(--font-weight-base);
@media (max-width: $breakpoint-small) {
position: static;
transform: none;
margin-bottom: var(--spacing-xs);
max-width: 100%;
white-space: nowrap;
}
}
// M E D I A
// S U B T I T L E
.media__subtitle {
align-self: flex-start;
color: var(--color-text-subtitle);
font-size: var(--font-small);
}
.media__subtitle--centered {
@extend .media__subtitle;
align-self: auto;
align-items: center;
display: flex;
}
.media__subtitle--between {
@extend .media__subtitle;
display: flex;
justify-content: space-between;
align-items: flex-end;
flex-direction: row;
flex-wrap: wrap;
@media (max-width: $breakpoint-medium) {
display: block;
}
}
.media__info-text {
word-break: break-word;
&:not(:last-of-type) {
margin-bottom: var(--spacing-m);
}
&.media__info-text--constrained {
max-width: 50rem;
}
}
.media__info-text--expanded {
margin-top: var(--spacing-m);
max-width: 50rem;
max-height: auto;
@media (max-width: $breakpoint-small) {
margin-top: 0px;
}
}
.media__info-text--contracted {
@extend .media__info-text--expanded;
overflow: hidden;
.mediaInfo__description {
max-height: 5rem;
}
}
@media (max-width: $breakpoint-small) {
.mediaInfo__description {
margin-top: var(--spacing-s);
}
}
.media__info-text--fade {
overflow-wrap: anywhere;
// both needed for compatibility
-webkit-mask-image: -webkit-gradient(linear, left 55%, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0)));
mask-image: -webkit-gradient(linear, left 55%, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0)));
}
.media__info-expand {
margin-top: var(--spacing-s);
}
.media__info-text-preview {
@extend .media__info-text;
max-height: 5rem;
overflow: auto;
padding: var(--spacing-xxs) 0; // for scrollbar to auto-hide
}
.media__actions {
@include font-sans;
position: relative;
display: flex;
flex-wrap: wrap;
margin-top: 0;
> *:not(:last-child) {
margin-right: var(--spacing-m);
}
@media (max-width: $breakpoint-small) {
justify-content: space-around !important;
margin: 0;
padding: 0;
div {
margin: 0 !important;
}
.button--file-action {
margin: 0 !important;
padding: var(--spacing-xxs);
width: 3.1rem;
height: 3.5rem;
.button__content {
flex-direction: column;
justify-content: space-between;
.button__label {
margin: 0;
margin-top: var(--spacing-xxs);
font-size: var(--font-xxsmall);
}
}
}
.button--file-action--menu {
width: unset;
height: 2rem;
}
.icon--Plus {
top: -2px;
}
}
}
.media__details {
@extend .help;
font-size: var(--font-xxsmall);
display: flex;
flex-direction: column;
margin-bottom: var(--spacing-s);
&:not(:last-child) {
margin-bottom: var(--spacing-s);
}
}