signal-desktop/stylesheets/components/StoryViewer.scss
2022-11-10 21:45:52 -05:00

361 lines
6.8 KiB
SCSS

// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
.StoryViewer {
&__overlay {
background-size: contain;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: $z-index-popup-overlay;
}
&__content {
align-items: center;
backdrop-filter: blur(90px);
background: $color-black-alpha-20;
display: flex;
flex-direction: column;
height: 100%;
justify-content: center;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: $z-index-popup-overlay;
}
&__close-button {
@include button-reset;
@include modal-close-button;
@include light-theme {
@include color-svg('../images/icons/v2/x-24.svg', $color-gray-15);
}
top: var(--title-bar-drag-area-height);
right: 28px;
z-index: $z-index-above-above-base;
}
&__container {
flex-grow: 1;
overflow: hidden;
}
&__story {
max-height: 100%;
outline: none;
width: auto;
&__image {
object-fit: contain;
}
}
&__meta {
bottom: 0;
left: 50%;
min-width: 284px;
padding: 0 16px;
position: absolute;
transform: translateX(-50%);
width: clamp(0vh, 56.25vh, 100vw);
z-index: $z-index-story-meta;
&__list {
@include font-body-2;
align-items: center;
display: flex;
color: $color-white-alpha-80;
&::before {
@include color-svg(
'../images/icons/v2/stories-solid-16.svg',
$color-white-alpha-80
);
content: '';
display: block;
height: 14px;
margin-right: 6px;
width: 14px;
}
}
&--group-avatar {
margin-left: -8px;
}
&--title-container {
padding-left: 8px;
}
&--title {
@include font-body-1-bold;
color: $color-white;
display: inline;
margin-right: 8px;
}
&--timestamp {
@include font-body-2;
color: $color-white-alpha-60;
}
&__playback-bar {
display: flex;
justify-content: space-between;
user-select: none;
&__container {
align-items: center;
display: flex;
}
}
&__playback-controls {
align-items: center;
display: flex;
}
}
&__caption {
@include font-body-1;
color: $color-white;
padding: 4px 0;
margin-bottom: 24px;
&__overlay {
@include button-reset;
background: $color-black-alpha-60;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: $z-index-base;
}
}
&__actions {
display: flex;
justify-content: center;
min-height: 60px;
}
&__reply {
@include button-reset;
color: $color-gray-05;
@include keyboard-mode {
&:focus {
color: $color-ultramarine;
}
}
&__arrow {
display: flex;
align-items: center;
&::before {
content: '';
height: 20px;
margin-right: 12px;
width: 20px;
@include color-svg(
'../images/icons/v2/reply-outline-24.svg',
$color-white
);
}
}
&__chevron::after {
content: '';
display: inline-block;
height: 20px;
margin-left: 6px;
vertical-align: middle;
width: 12px;
@include color-svg(
'../images/icons/v2/chevron-right-20.svg',
$color-white
);
}
}
&__more__button {
display: flex;
justify-content: center;
align-items: center;
height: 24px;
width: 24px;
&::after {
@include color-svg('../images/icons/v2/more-horiz-24.svg', $color-white);
content: '';
height: 20px;
width: 20px;
@include keyboard-mode {
&:focus {
background-color: $color-black;
}
}
}
}
&__mute {
@include button-reset;
height: 20px;
margin: 0 24px;
width: 20px;
@include color-svg('../images/icons/v2/sound-on.svg', $color-white);
@include keyboard-mode {
&:focus {
background-color: $color-white-alpha-80;
}
}
}
&__pause {
@include button-reset;
height: 20px;
width: 20px;
@include color-svg('../images/icons/v2/pause_solid_20.svg', $color-white);
@include keyboard-mode {
&:focus {
background-color: $color-white-alpha-80;
}
}
}
&__play {
@include button-reset;
height: 20px;
width: 20px;
@include color-svg('../images/icons/v2/play_solid_20.svg', $color-white);
@include keyboard-mode {
&:focus {
background-color: $color-white-alpha-80;
}
}
}
&__unmute {
@include button-reset;
height: 20px;
margin: 0 24px;
width: 20px;
@include color-svg('../images/icons/v2/sound-off.svg', $color-white);
@include keyboard-mode {
&:focus {
background-color: $color-white-alpha-80;
}
}
}
&__soundless {
@include button-reset;
height: 20px;
margin: 0 24px;
width: 20px;
@include color-svg('../images/icons/v2/sound-none.svg', $color-white);
@include keyboard-mode {
&:focus {
background-color: $color-white-alpha-80;
}
}
}
&__progress {
display: flex;
&--container {
background: $color-white-alpha-40;
border-radius: 2px;
height: 2px;
margin: 12px 1px 0 1px;
overflow: hidden;
width: 100%;
}
&--bar {
background: $color-white;
border-radius: 2px;
height: 100%;
transform: translateX(-100%);
}
}
&__animated-emojis {
height: 100%;
position: absolute;
width: 100%;
z-index: $z-index-above-base;
}
&__arrow {
@include button-reset;
align-items: center;
display: flex;
height: 100%;
position: absolute;
width: 25%;
z-index: $z-index-above-above-base;
&::before {
content: '';
height: 24px;
opacity: 0;
width: 24px;
transition: opacity 200ms ease-in-out;
}
&--left {
justify-content: flex-start;
left: 0;
&::before {
margin-left: 24px;
@include color-svg(
'../images/icons/v2/arrow-left-32.svg',
$color-white
);
}
}
&--right {
justify-content: flex-end;
right: 0;
&::before {
margin-right: 24px;
@include color-svg(
'../images/icons/v2/arrow-right-32.svg',
$color-white
);
}
}
&--visible::before {
opacity: 1;
}
}
&__protection {
position: absolute;
width: 100%;
z-index: $z-index-base;
&--top {
background: linear-gradient($color-black-alpha-16, $color-transparent);
top: 0;
height: 80px;
}
&--bottom {
background: linear-gradient($color-transparent, $color-black-alpha-60);
bottom: 0;
height: 256px;
}
}
}