Signal-Desktop/stylesheets/components/TextAttachment.scss

166 lines
3.3 KiB
SCSS

// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
.TextAttachment {
max-height: 100%;
max-width: 100%;
display: flex;
justify-content: center;
align-items: center;
&__story {
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
overflow: hidden;
user-select: none;
height: 1280px;
max-height: 1280px;
max-width: 720px;
min-height: 1280px;
min-width: 720px;
width: 720px;
}
&__text {
border-radius: 36px;
padding: 28px;
margin-left: 72px;
margin-right: 72px;
&__container {
-webkit-box-orient: vertical;
-webkit-line-clamp: 13;
display: -webkit-box;
overflow: hidden;
user-select: none;
}
&__textarea {
background: inherit;
border: none;
padding: 0;
resize: none;
text-align: center;
width: 100%;
&:disabled {
color: inherit;
cursor: inherit;
}
&:focus {
border: none;
outline: none;
}
}
}
&__preview {
align-items: center;
background: $color-black-alpha-40;
border-radius: 28px;
display: flex;
flex-direction: row;
height: 122px;
justify-content: center;
margin-left: 72px;
margin-right: 72px;
padding: 34px;
.TextAttachment__preview-container--large & {
height: 192px;
}
&__no-image {
.TextAttachment__preview-container--large & {
height: 144px;
width: 144px;
}
}
&__content {
align-items: flex-start;
display: flex;
flex-direction: column;
justify-content: flex-start;
margin: 0;
max-width: 422px;
.TextAttachment__preview-container--large & {
max-width: 352px;
}
}
&__title {
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
color: $color-gray-05;
display: -webkit-box;
font: bold 30px Inter;
overflow: hidden;
}
&__location {
color: $color-white;
font: bold 30px Inter;
max-width: 422px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.TextAttachment__preview-container--large & {
color: $color-white-alpha-60;
font: 24px Inter;
max-width: 352px;
}
}
&__tooltip {
align-items: center;
background: $color-black-alpha-90;
border-radius: 12px;
color: $color-white;
display: flex;
font-size: 30px;
justify-content: center;
line-height: 32px;
max-width: 656px;
padding: 24px 32px;
position: absolute;
text-decoration: none;
z-index: $z-index-above-base;
&::after {
border-color: black transparent transparent transparent;
border-style: solid;
border-width: 14px;
content: '';
left: 50%;
margin-left: -14px;
position: absolute;
top: 100%;
}
&__url {
margin-top: 4px;
max-width: 566px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&__arrow {
@include color-svg(
'../images/icons/v2/chevron-right-24.svg',
$color-white
);
height: 24px;
width: 24px;
}
}
}
}