signal-desktop/stylesheets/components/TextAttachment.scss

213 lines
4.1 KiB
SCSS
Raw Normal View History

2022-04-06 01:18:07 +00:00
// 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;
2022-04-06 01:18:07 +00:00
&__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;
2022-04-06 01:18:07 +00:00
width: 720px;
}
&__text {
border-radius: 36px;
padding: 28px;
2022-08-24 21:35:32 +00:00
margin-left: 56px;
margin-right: 56px;
&--with-bg {
margin-left: 36px;
margin-right: 36px;
}
2022-04-06 01:18:07 +00:00
&__container {
overflow: hidden;
2022-06-17 00:48:57 +00:00
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;
}
2022-04-06 01:18:07 +00:00
}
}
2022-07-08 21:14:01 +00:00
&__preview-container {
position: relative;
2022-08-24 21:35:32 +00:00
margin-top: 36px;
margin-left: 56px;
margin-right: 56px;
2022-07-08 21:14:01 +00:00
}
2022-04-06 01:18:07 +00:00
&__preview {
align-items: center;
background: $color-black-alpha-40;
border-radius: 28px;
display: flex;
flex-direction: row;
2022-08-24 21:35:32 +00:00
height: 112px;
2022-04-06 01:18:07 +00:00
justify-content: center;
2022-08-24 21:35:32 +00:00
padding: 16px;
&__no-image {
margin-right: 16px;
}
&__location {
color: $color-white;
font: bold 22px Inter;
max-width: 422px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@include dark-theme {
color: $color-white;
}
.TextAttachment__preview-container--large & {
color: $color-white-alpha-60;
font: 18px Inter;
max-width: 352px;
}
}
2022-04-06 01:18:07 +00:00
2022-07-08 21:14:01 +00:00
&__remove {
backdrop-filter: blur(26px);
background: $color-black-alpha-40;
border-radius: 100%;
height: 48px;
position: absolute;
right: -16px;
top: -16px;
width: 48px;
z-index: $z-index-base;
button {
@include button-reset;
height: 24px;
position: absolute;
right: 12px;
top: 12px;
width: 24px;
@include color-svg('../images/icons/v2/x-24.svg', $color-gray-15);
}
}
2022-06-17 00:48:57 +00:00
.TextAttachment__preview-container--large & {
2022-08-24 21:35:32 +00:00
height: 140px;
2022-04-06 01:18:07 +00:00
}
2022-06-17 00:48:57 +00:00
&__no-image {
.TextAttachment__preview-container--large & {
2022-08-24 21:35:32 +00:00
height: 105px;
width: 105px;
2022-04-06 01:18:07 +00:00
}
}
2022-06-17 00:48:57 +00:00
&__content {
2022-04-06 01:18:07 +00:00
align-items: flex-start;
display: flex;
flex-direction: column;
justify-content: flex-start;
2022-06-17 00:48:57 +00:00
margin: 0;
2022-04-06 01:18:07 +00:00
max-width: 422px;
2022-06-17 00:48:57 +00:00
.TextAttachment__preview-container--large & {
2022-04-06 01:18:07 +00:00
max-width: 352px;
}
2022-06-17 00:48:57 +00:00
}
2022-04-06 01:18:07 +00:00
2022-06-17 00:48:57 +00:00
&__title {
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
2022-04-06 01:18:07 +00:00
color: $color-white;
2022-08-24 21:35:32 +00:00
display: -webkit-box;
font: bold 22px Inter;
2022-04-06 01:18:07 +00:00
overflow: hidden;
2022-08-24 21:35:32 +00:00
@include dark-theme {
color: $color-white;
2022-04-06 01:18:07 +00:00
}
}
&__tooltip {
align-items: center;
background: $color-black-alpha-90;
border-radius: 12px;
color: $color-white;
display: flex;
font-size: 13px;
font-weight: 400;
2022-04-06 01:18:07 +00:00
justify-content: center;
line-height: 18px;
2022-04-06 01:18:07 +00:00
max-width: 656px;
padding: 12px;
2022-04-06 01:18:07 +00:00
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%;
}
&__title {
font-size: 14px;
font-weight: 600;
}
2022-04-06 01:18:07 +00:00
&__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;
}
}
}
}